refactor(daemon): compose claim-recovery gateways at the process root

Merged
TH
2mo ago
+341-89

Summary

Stacked on #3403. Stale-claim reconciliation rebuilds the dead owner's runtime gateway — the one act that names platform modules. The daemon keeps the transaction: the owner's recorded state dir, session artifact paths, owned-process store, and disposal (src/daemon/device/device-claim-owner-recovery.ts), and asks root composition for the gateway through a required ClaimRecoveryGatewayFactory (src/daemon/device/claim-recovery-gateway.ts), threaded root → RequestRouterDeps → request scope → createRequestHandler. Deletes the default root-gateway construction the recovery module used to perform itself (createPlatformRuntimeGateway import gone; the current daemon's gateway is never a recovery input). CLI device release and daemon startup pass the composed factory explicitly.

Validation

Commit 54f553740 (+ gate commit 5fa7ed73a, which moves the R76 inventory entry from the retired recovery edge to the new composition edge). Local at tip: build, check:quick, check:layering, check:di-seams, check:affected --run, eager-closure and test-size-ratchet gates, test:integration:provider 213/213, test:concurrency-torture 4/4 — same evidence as #3403 (identical final tree, run on the stack tip). device-claim-owner-recovery.test.ts proves recovery composes from the claim's own state dir per transaction and disposes it. Live claim paths exercised in the #3403 device runs; device status --stale clean afterwards.