fix(daemon): close startup and shutdown ownership gaps
Merged
TH
3h ago+295+295+012345678901234567890123456789-139-139-012345678901234567890123456789
Summary
Follow up on #3781 across 12 files, including daemon lifecycle and an upstream help-assertion repair.
- Reject missing pinned entries and share one entry-file declaration.
- Roll back every acquired listener after partial startup failure.
- Resolve relative auth hooks from captured host cwd.
- Bound platform-owner shutdown and retain registration, lock configuration, and runtime state for unfinished work.
- Load startup helpers during initialization; keep the eager-import budget unchanged.
Validation
- Head:
5d3e7f1fad65546d99a8b18e32e510a96ffdd17d, rebased ontofeca8cb2fc; daemon patches preserved by range-diff. pnpm check:affected --run --head 5d3e7f1fad: 36 checks passed (exactCommit=true,checkoutChanged=false).- Original regressions,
c966724bea→50ae4e57ab: runtime 4 failures → 10 passes; entry checks 2 failures → 11 passes. - Eager gate: 3 failures at
50ae4e57ab, then 849 passes. Upstream foldable-help assertion: 1 failure before repair, then 22 passes. Combined focused suite: 871 passes. - Live iOS 26.2 at
50ae4e57ab: Settings open, native snapshot (18 nodes), close, gracefuldaemon stop --clean; runner cleanup completed, registration/lock removed, simulator powered off. - Size: +3.2 kB unpacked / +1.2 kB compressed; independent smaller-design assessment justified the scope. Reviews found no high/medium issues.
GitHub CI passed on this head, including Coverage and platform smoke checks.