Repository navigation
Conversation
…ecycle lease Queue contending state lease writers fairly without changing the SQLite schema, name lease holders, and retain exact-owner cleanup custody. Preserve active installer exclusion and release retained heartbeat context. Settle completed worktree byte debt on refused postchecks so concurrent lease consumers can progress without relaxing disk safety. Fixes #167050. Thanks @itanyplus for the report and follow-up.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Holding this as a draft pending maintainer acceptance; it is not landing yet. The fair-admission change persists a new kind of row: waiter-intent rows in
The holder naming in the wait message, and the automatic |
|
Codex review: stale review; fresh review needed. Summary Next step |
|
Maintainer decision (update-reliability loop; Peter delegated this call to the loop on 2026-10-30): accept the persisted FIFO waiter intents in the existing Reasons: admission order has to hold across processes (CLI, Gateway, updater helper), so an in-process queue cannot fix the starvation; the rows reuse the existing table without a schema bump, expire after 30 s, and are cleaned up by their exact owner, so a crashed waiter cannot wedge admission. Conditions before this leaves draft:
The loop will carry the rework and landing unless you pick it up first. |
Remove the independent worktree capacity-debt settlement and its regression for a separate follow-up. Preserve the FIFO admission and exact-owner cleanup implementation, with a separate 147-line allocation for its distinct regression contracts. Co-authored-by: steipete <[email protected]>
|
@clawsweeper re-review Please review corrected head |
|
🦞👀 Re-review progress:
|
Baseline-Refresh: 34e994a21242e8686e4dce6b037f7c055f4737de Co-authored-by: steipete <[email protected]>
Baseline-Refresh: e74f0e1298067d3c6f7cc2b392aa68c8d6e686d9 Co-authored-by: steipete <[email protected]>
Baseline-Refresh: 40972657a4abc58a22f7da98a4dfba662b5de78c Co-authored-by: steipete <[email protected]>
What Problem This Solves
Fixes plugin updates repeatedly losing admission to later plugin lifecycle work while wait messages show only an opaque token.
Fixes #167050. Thanks @itanyplus for the incident evidence; this continues @steipete's implementation in #186497 and the accepted persisted FIFO design.
User Impact
A waiting command gets admission before later acquisitions after the active operation releases or expires. Wait messages identify the recorded purpose, PID, and host. Active installers retain exclusion through npm work and settlement. A crashed or stalled waiter loses its place after 30 seconds.
Why This Change Was Made
The existing lease owner records expiring FIFO intents in its existing table and grants admission in the same transaction. Polling preserves arrival order, and cancellation removes only the exact owner's intent. Holder diagnostics remain separate from reclaim authority. This cut adds no schema, protocol, dependency, or configuration change.
Evidence
71d5a7a8f6aec016a31b1c41d145b0b112125984integrates main92e1a1bb115f2ea646e0b57b21d7c5cfa6649ca7through the native signed baseline owner. Original authorship and ancestry are retained.92e1a1bb→71d5a7a8range and lease owner context: scoped-clean, no actionable findings. Simplification retains one store decision and existing cleanup ownership. Production +192/-69; tests +148/-1. The 147-line allocation covers ordering, expiry, renewal, cancellation, and diagnostics. Source has not changed since that review.a381c3d5: public2026.10.9CLI admission with real live/expired intents, canonical candidate build/pack, actual npm replacement, registered Doctor, and ordinary lifecycle mutation. All 17,156 packaged entries matched; existing install records and nested settings were preserved. Reused for unchanged waiter schema, ordering, TTL, and admission semantics. This covers offline npm replacement/Doctor/lifecycle, without a serving Gateway or service-handoff claim.81cf32d9/74ec4446comparison: Decision reproduces the same deadline failure on both; Doctor canonicalization passes both. Corrected Doctor/Gateway maintenance response-capture cases fail at the same target assertion on both, with identical full error messages after replacing only private checkout paths. These are scoped baseline facts, not blanket CI clearance.fs-safeversions on integrated base/head and retains the old exact-base mismatch rejection. This certifies the guard and metadata; complete package behavior remains CI-owned.71d5a7a8. Complete 95-job inventory: 67 passed, 5 failed, 1 cancelled, 22 skipped. Only the requested SDK-report and companion-focus jobs were actually rerun, once each. Three underlying failures retain specific main proof: missing WebKit executable, Windows tarball mode 493/438, and dependency export entries. The derived CI gate remains failed.Companion-focus attribution: UNKNOWN. The single rerun repeated the original
expectFocusfalse/true timeout in “focuses Side chat on open, reopen, and tab activation at 390 px”; 135 other files and 503 other tests passed. The exact 390px case passes on main 8993eba and retained main 10d93ef evidence. Node 24.22.1 and the test-file blob match; main used a Blacksmith 16 vCPU runner while the candidate used GitHub-hosted Ubuntu. This is not a controlled same-runner counterfactual. Neither inheritance nor PR causality is established. Source remains unchanged.Public SDK semantic impact: UNKNOWN. The single SDK-report rerun was cancelled again after 30m21s: base render completed in 983,172ms, then head render was cancelled. Its comparison is main
bcf23b2versus mergec3ad1e5, whose second parent is reviewed71d5a7a8. The terminal 9-artifact inventory contains no SDK report. Retained actual 92e/71d5 declarations for the two fallback units, four changed internal declaration units, and the prior Testbox analysis still lack complete public per-export/member reachability or exclusion. Testbox surface analysis exited 134; its lease is stopped/completed. No public equivalence/change verdict, acknowledgement, or reporter suppression is claimed.Remains draft: companion-focus causality is unresolved and SDK semantics are UNKNOWN after the requested reruns. The parent decides next steps.
Work sessions