Skip to content

Commit c3a81fd

Browse files
committed
chore(gates): retire the daemon composition edges R76 carried
The daemon-runtime rows of the R76 inventory no longer describe tree reality once the composition moved out of src/daemon/, so the stale entries go and the planted tests retarget the one surviving classified pair. daemon-composition is declared in the platform-runtime zone (a composition, not an executable), and ADRs 0019/0022/0033 record where the composition and the extracted credential type landed.
1 parent 63eddd6 commit c3a81fd

6 files changed

Lines changed: 86 additions & 243 deletions

‎docs/adr/0019-request-bound-platform-runtime.md‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -833,12 +833,15 @@ therefore structurally enforced rather than periodically measured.
833833
Some request-path work asks the host machine something without ever taking a device runtime:
834834
concrete local readiness, boot-time and runner-session observation, and open-target
835835
classification. Those asks now cross the daemon boundary as one required dependency,
836-
`DaemonPlatformServices` (`src/daemon/platform-services.ts`), composed by the root in
837-
`src/platform-runtime-daemon-services.ts` and threaded root → `RequestRouterDeps` → the request
838-
execution scope → the handlers and consumers. Stale-claim reconciliation gets the same treatment
839-
for the one act it may not perform itself: the root supplies a `ClaimRecoveryGatewayFactory`
840-
(`src/daemon/device/claim-recovery-gateway.ts`), and the daemon keeps the transaction — what to
841-
rebuild from (the dead owner's recorded state dir), in what order, and when to dispose it.
836+
`DaemonPlatformServices` (`src/daemon/platform-services.ts`), assembled by the daemon runtime's
837+
root-composition module in `src/daemon-composition.ts` — which reaches the concrete adapters
838+
through `src/platform-runtime-daemon-services.ts` behind a function-scoped `await import` — and
839+
threaded composition → `startDaemonRuntime` deps → `RequestRouterDeps` → the request execution
840+
scope → the handlers and consumers. Stale-claim reconciliation gets the same treatment
841+
for the one act it may not perform itself: the composition supplies the `ClaimRecoveryGatewayFactory`
842+
the daemon declares in `src/daemon/device/claim-recovery-gateway.ts`, built from
843+
`src/platform-runtime-claim-recovery.ts` (likewise deferred), and the daemon keeps the transaction —
844+
what to rebuild from (the dead owner's recorded state dir), in what order, and when to dispose it.
842845

843846
The port is not a raw escape hatch back into platform mechanics. Its observation members are the
844847
already-published neutral contract types from `@agent-device/contracts`, readiness is a boolean,

‎docs/adr/0022-daemon-platform-runtime-coupling.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ Accepted (2026-09-06). Implements the audit deliverables of issue #2278. The cla
66
inventory and the structural no-regrowth checks are gate-enforced; this ADR records the decisions
77
and points at the gates rather than restating the inventory.
88

9+
Amended 2026-10-11 by the PR-6 composition extraction: the daemon-runtime composition edges this
10+
ADR classified (the gateway/diagnostics/resource-cleanup/lifecycle edges, the provider-runtime
11+
hubs, and the platform-services and claim-recovery dynamic edges) moved out of `src/daemon/` into
12+
the process-root composition module `src/daemon-composition.ts`, which R76 does not see because it
13+
is no longer a daemon-zone importer. The R76 inventory now carries only the leaked
14+
selector-query edge (`daemon/direct-ios-selector.ts`); the section-2 outcomes above remain the
15+
record of how each was classified.
16+
917
## 1. Context
1018

1119
The platform-package migration removed direct production dependencies from `src/daemon/**` to

‎docs/adr/0033-collocation-decision-table.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ optimal.
150150
| `src/platform-runtime-daemon-lifecycle.ts` | retain for this batch | Same path-keyed R13/ADR 0022 seam: relocation is possible only with coordinated changes to those declarations. |
151151
| `src/platform-runtime-device-boot.ts` | retain for this batch | Same path-keyed R13/ADR 0022 seam. |
152152
| `src/platform-runtime-resource-cleanup.ts` | retain for this batch | Same path-keyed R13/ADR 0022 seam. |
153-
| `src/provider-credential-fingerprint.ts` | keep | Daemon ⇄ client shared contract from the same #2559 decision as `daemon-policy-file.ts`; #3288 declares its zone beside the provider composition that reads the credentials it fingerprints. |
153+
| `src/provider-credential-fingerprint.ts` | keep (type extracted) | Daemon ⇄ client shared contract from the same #2559 decision as `daemon-policy-file.ts`; #3288 declares its zone beside the provider composition that reads the credentials it fingerprints. PR 6 of the daemon extraction moved only the `DaemonProviderCredentials` declaration to `packages/daemon-contracts` (`./provider-credentials`), the same shared-below-both landing as the policy file; the fingerprinting implementation stays here because it reads the installed-plugin manifest. |
154154
| `src/provider-limrun-runtime.ts` | keep | Proposed → provider-limrun, but there is no seam: the class's constructor self-builds the root dependency factory (`src/sdk/limrun-runtime-dependencies.ts`), which is the ADR 0019 composition seam — it loads the root's adb-host binder, core Android interactor, and platform-runtime app-state helpers that the package must not import. Moving the class means moving that composition, which is design, not a move. |
155155
| `src/request-progress-protocol.ts` | moved → `packages/daemon-contracts/src/request-progress-protocol.ts` | Daemon ⇄ client shared contract from the same #2559 decision — the client reads it statically (`daemon-client-progress.ts`) and the server through `src/daemon/server/`, so only #2559's shared-placement boundary and the wire-compat ledgers pin it; declared `daemon-contracts` by #3288 and now physically placed by the extraction. Contracts was considered and R18 keeps contracts free of envelope validation mechanics. The wire-ledger keys moved with the file. |
156156
| `src/runtime-command-surface.ts` | moved → `src/command-runtime/runtime-command-surface.ts` ([#3299](https://github.com/callstack/agent-device/pull/3299)) | Physical move landed with `runtime-factory.ts` as one assembly group: the command-surface binding sits beside the factory it composes, under the folder that derives its `command-runtime` zone, so `topFolder` replaces the per-file `ROOT_MODULE_ZONES` row. |

0 commit comments

Comments
 (0)