refactor(daemon): resolve device interactors through a composed capability - #2593
Conversation
…ility The legacy snapshot capture reached interactor mechanics through a dynamic import of the shared lookup, the one production edge leaving the daemon zone dynamically. Interactor resolution now arrives as a capability installed at the same composition site as the provider-device admission, and an un-composed process fails closed on a typed reason.
The dynamic leaked-platform-mechanics edge is gone, so the table records the composition edge that replaced it and the dynamic-form tests assert against the classified pair instead.
Size Report
Startup median (7 runs, lower is better):
|
|
Looks good at fdcb981. One small gap, not a blocker: the harness installs its own copy, so no test fails if the install in |
Every harness that builds its own request handler installs the seam itself, so the install at the process root had no unit coverage. Boot the real runtime and resolve a provider-owned device through the daemon's seam.
|
Good catch — added |
|
Still good at 771de8f. The new test boots the real |
|
…tle-on-exit-2522 * origin/main: perf(scroll-until): answer every candidate from one visibility index (#2596) refactor(daemon): resolve device interactors through a composed capability (#2593) refactor(daemon): stop the client value-importing daemon internals (#2559) (#2594) refactor(shell-quote): one implementation, reached through the runner host port (#2595) docs(agents): delete the file-size tiers nobody enforces (#2597) fix(daemon): key the implicit session by workspace and platform (#2587) refactor(cli-schema): orient the schema layer above commands (#2543 step 3) (#2590)
Summary
src/daemon/snapshot-interactor-capture.tsreached interactor mechanics throughawait import('../core/interactors.ts')— the one production edge leaving the daemon zone dynamically, invisible to the ranked spine and recorded asleaked-platform-mechanicsby R76.Interactor resolution now arrives as a capability.
src/daemon/interactor-resolution.tsholds the daemon seam, andstartDaemonRuntimeinstalls it besideinstallProviderDeviceAdmission, so one composition site names both request-scoped capabilities (ADR 0019 §1/2). An un-composed process fails closed withreason: interactor-resolution-missinginstead of reaching for a lookup of its own.R76 swaps the dynamic leaked edge for the composition edge, so no classified leaked-mechanics edge is reached dynamically, and
src/core/interactors.tskeeps exactly one inbound daemon-zone edge — from composition. 10 files, +208/−38.Closes #2555
Validation
Head
771de8f510:pnpm check:affected --runis green exceptmutation-model, which fails identically at base730b20149e(pnpm mutation:test: 39 pass / 1 fail on both) — pre-existing, unrelated to this diff.Also green locally: full
unit-core(10,024 tests),pnpm test:integration:provider(210 tests),pnpm check:tooling(format, lint, typecheck, layering, di-seams, build, package),pnpm check:fallow.The fail-closed default earned its keep:
interaction-settle-private-ax-route.test.tsand the provider-scenarioharness.tshad to compose the capability the way the process root does, exactly as they already do for the provider-device admission.src/daemon/server/daemon-runtime-interactor-composition.test.tsboots the real runtime and resolves through the seam, so the root install line is covered: deleting it fails that test withinteractor-resolution-missing. No device-facing behavior changed, so no device run is claimed.