Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Closing as superseded by #156801, merged as adf4aff. Its CI repair already switches coordinator backoff to the same native abortable timer while keeping the monotonic deadline, and its final CI passed all 145 executed jobs. Our independent reproduction traced the same stranded 25 ms fake timer holding the archive queue. The same correction passed the unchanged original 12-file order (107 tests), the protocol/settlement pair (23 tests), and acquisition/worker siblings (18 tests), with no actionable review findings. Partial static proof is retained for the ongoing affected PR recovery; it was stopped once the upstream fix was verified, so this draft does not claim a complete static gate. The remaining worker-lifecycle timer change is unnecessary for this failure: that acquisition runs inside the SQLite worker, whose global timers are isolated from the parent test's fake clock. No separate defect was established there, so this draft will not duplicate the landed fix or broaden it speculatively. |
What Problem This Solves
Fixes Codex settlement tests hanging during cleanup when a contended SQLite coordinator wait outlives the simulated turn clock.
User Impact
There is no intended user-visible behavior change. This removes a shared source of CI stalls without changing execution budgets, SQLite admission, cancellation, or test assertions. No migration or operator action is required.
Why This Change Was Made
Coordinator acquisition measured its deadline with the native monotonic clock but scheduled its abortable backoff through global timers. A settlement test could finish its assertions and restore real timers while history maintenance was waiting on a simulated 25 ms backoff. The discarded wakeup left maintenance holding the archive queue, and session-owner cleanup could never finish.
Use Node's native abortable timer for both coordinator acquisition paths, matching the existing acquisition helper's default clock. The retry interval, deadline, authority checks, abort reason, and process-lifetime behavior stay intact. The focused acquisition unit test explicitly simulates this native sleeper alongside its simulated monotonic clock; the Codex settlement tests remain unchanged.
Evidence
The failure was observed on the merge refs for #156764 and #156758; this is not a claim that their branch changes introduced it or that a
mainCI run was red. All affected owner files and the failing tests remained identical on main at2512775add63106306e7ee5ad40324143f5abe86.