fix: share daemon retirement and verify mixed-version cutover

Closed
TH
2mo ago
+403-78

Summary

Manual daemon stop now awaits the shared ownership-checked retirement operation. Confirmed process exit alone cannot report success if registration retirement failed; primary errors retain typed reasons and normalized diagnostics. Existing CLI stop/report shapes are preserved.

Verifies mixed-version daemon exclusion at the actual shared lock path with owned child processes running the previous acquisition algorithm: an already-running old daemon, a new owner delaying metadata, and simultaneous startup. This proof does not expand host-kit's mixed-protocol support policy.

Depends on #3131. Ref #3116. Six files, 483 gross changed lines. ADR 0030 includes the ownership diagram and support boundary.

Validation

Tested 2b3dcfaae5c0422fcb36ea0fece9204bf87bfea4:

  • 52 focused tests, including real graceful/forced manual stops; zero skips.
  • Giving the new implementation a different lock path fails all three cutover controls; concurrent startup produces two winners.
  • Ignoring registration retirement after confirmed exit fails both retained-result controls.
  • pnpm check:quick, Fallow, and pnpm check:affected --base fix/daemon-timeout-retirement --run pass; 34 files/385 related tests.
  • Independent read-only review found a failure-path fixture leak; the bounded admission assertion fixes it and the mutant now fails without hanging. No remaining findings.
  • CI-owned coverage, provider and device checks remain pending.