Repository navigation
fix(update): finish failed recovery startup records - #208794
Conversation
|
🦞👀 ClawSweeper review completeClawSweeper finished reviewing this revision. |
1191a9d to
16b50c1
Compare
|
Codex review: passed. What this changesThe PR records failed recovery startup attempts before releasing acquired update custody and preserves secondary cleanup errors. Example: Recovery creates an update-history row, then lock acquisition fails with EEXIST because the releases path is a file.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current recovery-startup bookkeeping defect in the existing owner; no introduced correctness or security defect was found. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe early-release recovery runner uses the recovery-record owner to create update-history rows, acquire preparation custody, and publish outcomes consumed by update status. flowchart TD
A[Early release recovery] --> B[Recovery record owner]
B --> C[Preparation lock store]
B --> D[Update run writer]
D --> E[Update history database]
E --> F[Update status]
Technical reviewBest possible solution: Keep startup settlement in openHeldRun, finish its newly created row before releasing acquired custody, and retain all cleanup failures. Do we have a high-confidence way to reproduce the issue? Current-main source establishes both stranded-row paths, and the PR reports four regressions failing before the repair and passing afterward; this read-only review ran no target code. Is this the best way to solve the issue? The patch repairs the producer through the existing shared owner and cleanup helper, covers both callers, and preserves successful handoff and competing-update behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6df4a52514d6. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +17, Tests +67. Total +84 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 30, 2026, 12:48 AM ET / 05:48 UTC (Revision 2). |
16b50c1 to
530d8d9
Compare
|
@clawsweeper re-review Please review exact head |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
* commit 'c5c1dc278a6f789d739d70afe192c4d1e37058f5': fix(ci): include provider rejection text in PR tooling (#208891) feat: let plugins bring their own sidebar icon (#208885) docs: clarify node pairing and credentials on PostgreSQL gateways (#208850) fix(ui): show a confirmed subagent stop once in chat (#208533) fix(ui): keep collapsed work close to the reply in long chats (#207843) fix(update): finish failed recovery startup records (#208794) chore(ci): inventory media worker lifecycles (#208888) fix: use the same clock icon for Automations (#208539) improve(ci): reduce compiler round trips in database checks (#208878) fix(ci): preserve complete adaptive test observations (#208874) test(gateway): isolate usage context database fixtures (#208304) fix: avoid false worker cleanup failures (#208861) fix: let Git upgrade acceptance fetch its missing baseline (#208746) fix: isolate scheduled Processes reads in the Control UI config-change test (#208205) fix: make plugin hash worker tests independent of runner memory (#208860) fix(update): preserve serving state during candidate plugin maintenance (#208776) test(ui): preserve exact session keys in older chat links (#208873) docs(cli): say what bounds a yielded agent turn's subagent wait without --timeout (#208858)
* fix: restore managed worktrees from bare primary repositories Managed worktrees created from a linked checkout record its primary repository. Resolve that registration during inspection, removal, and snapshot restore while keeping new checkout creation strict. * Merge verified upstream CI repairs into managed worktree recovery * commit 'c5c1dc278a6f789d739d70afe192c4d1e37058f5': (64 commits) fix(ci): include provider rejection text in PR tooling (#208891) feat: let plugins bring their own sidebar icon (#208885) docs: clarify node pairing and credentials on PostgreSQL gateways (#208850) fix(ui): show a confirmed subagent stop once in chat (#208533) fix(ui): keep collapsed work close to the reply in long chats (#207843) fix(update): finish failed recovery startup records (#208794) chore(ci): inventory media worker lifecycles (#208888) fix: use the same clock icon for Automations (#208539) improve(ci): reduce compiler round trips in database checks (#208878) fix(ci): preserve complete adaptive test observations (#208874) test(gateway): isolate usage context database fixtures (#208304) fix: avoid false worker cleanup failures (#208861) fix: let Git upgrade acceptance fetch its missing baseline (#208746) fix: isolate scheduled Processes reads in the Control UI config-change test (#208205) fix: make plugin hash worker tests independent of runner memory (#208860) fix(update): preserve serving state during candidate plugin maintenance (#208776) test(ui): preserve exact session keys in older chat links (#208873) docs(cli): say what bounds a yielded agent turn's subagent wait without --timeout (#208858) test(ui): keep real exports in the channel settings distribution mock (#208855) test(normalization): preserve inline code in quoted previews (#208857) ... Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Early-release recovery creates an update-history row before acquiring the preparation lock. If acquisition fails, or recording an interrupted predecessor fails, that new row stays marked running even though recovery has stopped.
User Impact
Update status records the failed recovery instead of showing a phantom active update. The original failure remains visible; a secondary recording failure still releases acquired custody and preserves both errors. No configuration or database migration is required.
Why This Change Was Made
One failure boundary in the recovery-record owner covers acquisition and predecessor bookkeeping. It finishes the known new row before releasing its acquired lock. The existing cleanup helper retains failures from recording and release. Successful handoff and competing-update handling are unchanged.
Production +23/-6 (net +17) closes this ownership boundary. Tests +82/-15 observe durable rows and the status at release, cover both hold and unheld-outcome callers, and exercise a real filesystem acquisition error.
Evidence
743f83aa4c226d5489a26fa5e6fb979aa8c09bd6. The owner, its tests and the shared error helper did not change in the base.530d8d9a24f3a3b632af48e0452a2258b25c03b4: all four focused regression cases, formatting, targeted lint and affected test types pass after a frozen dependency refresh. The pre-rebase full build passed in 281.7 seconds.f77d81e9a1aaf4814ad8d5e4c4a2de04db79b710has main baselinefe3677b383f93b6401c08706815fede8e0705a7cand this head as parents. The failure inputs are identical between baseline and merge. The report's name-level comparison calls them new without comparing selected scope; direct source/causal inspection establishes they pre-exist this repair. Landing uses the native attributed-failure exception; failed CI is not described as green.530d8d9a: ordinary 2026.11.12 installation finished with/readyz200 and the running version verified; PostgreSQL 2026.11.5 migrated state 36→42 and agent 38→45 while preserving Gateway history; native systemd 2026.10.9 updated successfully. Candidate package checksum matched. The manual workflow's remaining failure is the same unrelated mock ratchet plus its aggregate.Later failures inside final outcome recording and abrupt-parent-death settlement remain separate follow-ups.