fix: preserve daemon cleanup and capture lifetime proof

Closed
TH
2mo ago
+580-182

Summary

Follow-up to #3133–#3137 for #3116. Daemon test cleanup stops independently observed children even with corrupt metadata, joins registered successors, and locks registration before deleting a directory. Timeout diagnostics distinguish retained metadata from a process that survived.

Capture bindings retain their own adopted handle after retirement. Cleanup refreshes only the same lifetime before a lazy import; native starts refuse closed admission. The shared fixtures now model lifetime and fence identity. Three capture field adapters live with their binding, fixing the eager-import CI regression.

flowchart LR
  R[Captured lifetime] --> B[Capture binding]
  B --> H[Owned handle]
  B --> C{Current lifetime and fence match?}
  C -->|Yes| U[Update matching slot]
  C -->|No| K[Preserve successor]

Validation

Head: 0780e5e4c6. 33 changed files; 126 focused tests pass without skips. Ten planted regressions failed, then restored green. All 757 global import-budget tests pass. Lint, typecheck and changed-code Fallow pass. Independent read-only audit found no actionable issues.

All locally runnable affected checks pass; platform/device CI remains GitHub-authoritative.