refactor: extract durable capture resource lifecycle
Merged
TH
3mo ago+1954+1954+0123456789012345678901234567890123456789-1064-1064-0123456789012345678901234567890123456789
Summary
Extract the reusable daemon lifecycle substrate for durable captures and migrate app-log onto it without changing CLI or platform behavior.
The coordinator now owns manifest I/O, fenced transitions, start/adoption compensation, exact-owner recovery, and process-lifetime admission uncertainty. App-log keeps its specialized marker policy and runtime binding adapter. ADR 0019 records this bounded seam before the stacked screen-recording cutover.
Stack/tracking: #1117 (screen-recording cutover), #1704 (budget/distribution decision), and the ADR 0019 checkpoint sequence completed by #1703.
Validation
pnpm check:affected --run: all seven selected checks and 710/710 related tests passed; the staged structural scan passed 131 policy tests and the full 1,165-file layering guard.- Exact-head red/green and live evidence covers Android and iOS logs start/relaunch/stop, guarded daemon/owned-child loss, startup recovery, and a successful replacement start.
- All named sessions were closed and the isolated daemon was stopped. HarmonyOS/HDC remains an explicit residual live-evidence gap with deterministic package/runtime coverage.