Purpose
Child of #2278 (audit area: runtime lifecycle participation). The daemon startup/shutdown code in src/daemon/server/daemon-runtime.ts explicitly names platform resource owners through three classified edges (R74 inventory):
src/platform-runtime-apple-runner-owner.ts — configureAppleRunnerLeaseOwnerStateDir, configureAppleRunnerDeviceClaimAuthorityProbe (daemon-owned inputs pushed into the Apple runner host at startup, cleared on lock release)
src/platform-runtime-resource-cleanup.ts — resetAndroidSnapshotHelperRuntime, cleanupManagedWebRuntimeOrphans (named platform owners invoked at startup; the platformResourceCleanup symbol on the same edge is the neutral PlatformResourceCleanup contract capability and is the model to follow)
src/platform-runtime-operation-host.ts — dynamic import() of recoverLegacyAppLogMarkersAfterDaemonLock at startup (app-log legacy marker recovery, a platform process-mechanic)
The daemon retains lifecycle sequencing, cancellation, failure policy, and budgets. Platform resource owners should participate through a typed owning interface; no generic hook bag, service locator, or dispatcher.
Required behavior
daemon-runtime.ts stops importing the named platform owners above. The daemon-owned values (lease-owner state dir, device-claim authority probe, cleanup inputs) are still supplied by the daemon — what changes is the hand-off: a typed lifecycle participation surface (startup/shutdown phases) that the root composition wires the platform owners into, or the existing PlatformResourceCleanup-style contract capability extended to cover snapshot-helper reset, Web orphan cleanup, and app-log legacy marker recovery.
- The daemon keeps: ordering (runner-owner configuration after daemon lock acquisition; web-orphan cleanup and marker recovery before servers open; resets on the shutdown path), best-effort failure policy with diagnostics, and the existing teardown budgets.
- One construction path for the participation surface; platform owners are registered by the root composition, not by daemon code naming platform modules.
Observable completion conditions
- The three R74 inventory edges for
daemon-runtime.ts (apple-runner-owner, resource-cleanup, operation-host dynamic import) are reclassified or removed.
- No production importer of
configureAppleRunnerLeaseOwnerStateDir, configureAppleRunnerDeviceClaimAuthorityProbe, resetAndroidSnapshotHelperRuntime, cleanupManagedWebRuntimeOrphans, or recoverLegacyAppLogMarkersAfterDaemonLock remains under src/daemon/**.
- Daemon startup/shutdown behavior is identical (existing lifecycle tests; runner-owner state dir and claim-authority probe still configured; legacy markers still recovered).
- Planted violation: a daemon import of any of the named owners is red.
pnpm check:layering and pnpm check:affected --run pass.
Dependencies
None hard. If the Apple runner owner seam intersects the #2332 observation port, sequence accordingly.
Purpose
Child of #2278 (audit area: runtime lifecycle participation). The daemon startup/shutdown code in
src/daemon/server/daemon-runtime.tsexplicitly names platform resource owners through three classified edges (R74 inventory):src/platform-runtime-apple-runner-owner.ts—configureAppleRunnerLeaseOwnerStateDir,configureAppleRunnerDeviceClaimAuthorityProbe(daemon-owned inputs pushed into the Apple runner host at startup, cleared on lock release)src/platform-runtime-resource-cleanup.ts—resetAndroidSnapshotHelperRuntime,cleanupManagedWebRuntimeOrphans(named platform owners invoked at startup; theplatformResourceCleanupsymbol on the same edge is the neutralPlatformResourceCleanupcontract capability and is the model to follow)src/platform-runtime-operation-host.ts— dynamicimport()ofrecoverLegacyAppLogMarkersAfterDaemonLockat startup (app-log legacy marker recovery, a platform process-mechanic)The daemon retains lifecycle sequencing, cancellation, failure policy, and budgets. Platform resource owners should participate through a typed owning interface; no generic hook bag, service locator, or dispatcher.
Required behavior
daemon-runtime.tsstops importing the named platform owners above. The daemon-owned values (lease-owner state dir, device-claim authority probe, cleanup inputs) are still supplied by the daemon — what changes is the hand-off: a typed lifecycle participation surface (startup/shutdown phases) that the root composition wires the platform owners into, or the existingPlatformResourceCleanup-style contract capability extended to cover snapshot-helper reset, Web orphan cleanup, and app-log legacy marker recovery.Observable completion conditions
daemon-runtime.ts(apple-runner-owner, resource-cleanup, operation-host dynamic import) are reclassified or removed.configureAppleRunnerLeaseOwnerStateDir,configureAppleRunnerDeviceClaimAuthorityProbe,resetAndroidSnapshotHelperRuntime,cleanupManagedWebRuntimeOrphans, orrecoverLegacyAppLogMarkersAfterDaemonLockremains undersrc/daemon/**.pnpm check:layeringandpnpm check:affected --runpass.Dependencies
None hard. If the Apple runner owner seam intersects the #2332 observation port, sequence accordingly.