Conversation
|
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 8 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
98cc766 to
359e453
Compare
27db824 to
180ee97
Compare
There was a problem hiding this comment.
All reported issues were addressed across 5 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
I found one defect in 180ee97 that should be fixed before merge. When a launched daemon publishes its registration just as the launcher's deadline passes, the launcher retires it while a joined client is already reusing it. A second client can then lose its command mid-request, and the first client fails with daemon_startup_failed although its daemon was healthy. The case is in daemon-client-lifecycle.ts. Client A launches daemon D, and D becomes reachable right as A's deadline passes. The rule the code must satisfy is this: once a launch has published a registration that any client can observe and reuse, it is shared. Neither its launcher's deadline nor its launcher's probe result may retire it. Only the takeover policy that every client applies may do that. Please enforce this in one place, the launch-retirement step Could the join be smaller? It adds a client-side rule for who may reuse or retire a published registration, in Not blocking, and you can take or leave these: in the 'held' case of daemon-client-startup-race.test.ts the virtual clock moves only 100ms per mocked sleep, so the loop runs about 150 real iterations with synchronous The Coverage job failed on this PR's own new test 'startup uses one deadline when the claim is held' with the 5000ms timeout, so that failure is related. In Smoke iOS, daemon startup succeeded in 134ms and then the open request timed out at 91s. That matches #3125 and sits in the iOS open and runner path, which this diff does not touch. I did not inspect the second Smoke failure or the cancelled jobs. I did not run the mutation controls or the startup-race suite, so I judged the tests by reading them. I also did not trace whether a graceful SIGTERM lets B's in-flight request finish. I took the retirement internals from #3129 and #3127 as reviewed in those PRs. Before merge, the retire-only-unpublished fix and its regression test need to land. After that, the Coverage timeout needs a fix, and the two open inline threads still stand. |
359e453 to
ac2217c
Compare
180ee97 to
6e44617
Compare
ac2217c to
c4f6ab8
Compare
83de7a2 to
745589d
Compare
c4f6ab8 to
34c1f64
Compare
745589d to
d2c7a19
Compare
34c1f64 to
3e5be9a
Compare
|
Consolidated into #3127 as part of reducing #3116 to seven PRs. The composition preserves the complete pre-consolidation source tree, including tests and later review corrections. This PR is superseded; its review discussion and native evidence remain available. Outstanding findings transfer to the owning keeper in the implementation record. |
Summary
Daemon startup now joins a child that explicitly reports lock contention before admitting another daemon. It waits for daemon or client holders, reapplies version/code/policy checks to a published winner, and relaunches only after release or proven abandonment. All attempts share the original 15-second admission deadline. Late takeovers preserve the winner; cleanup has its own bounded exit/join waits.
Fatal probing of a private startup retires and joins it before returning the original error. Stale metadata cannot bypass a different publishing owner. Legacy lock state is retained with upgrade guidance. This removes client-side stale-lock deletion.
8 files; 987 changed lines. Part of #3116, based on #3129. Timeout retirement and the session migration follow separately.
flowchart TD L[Launch] --> E{Monitored child result} E -->|still running| O[Probe this launch only] E -->|busy and joined| I[Inspect registration] E -->|other exit| F[Retire captured attempt] I -->|healthy winner| A[Apply reuse policy] I -->|held or publishing| I I -->|released or proven dead| L I -->|unproven| R[Retain and report]Validation
Commit
180ee97381: 95 focused tests passed without skips; quick and Fallow checks passed. Mutation controls failed for adopting before joining, treating generic exits as contention, restarting the deadline, and skipping cleanup after a probe error. Real children and temporary filesystem claims exercised the changed paths; every child was joined.Exact-head affected checks passed, including 955 tests across 139 files and unchanged RPC compatibility. Provider, coverage and native CI remain authoritative. This slice makes no device-performance claim.