Repository navigation
fix(update): reconcile completed updates after interrupted verification - #152202
Conversation
|
🦞👀 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: blocked before merge. Reviewed September 18, 2026, 7:22 PM ET / 23:22 UTC (Revision 4). ClawSweeper reviewWhat this changesRecords the installed build before update handoff and lets Gateway monitoring or Doctor verify and correct completion history when the updater exits during restart verification. Merge readiness⛔ Blocked before merge - 1 item remains The fix remains useful and has no blocking findings. The supplied published-updater runs resolve the previous upgrade-proof concern; current main still lacks this reconciliation. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s update ledger records installation progress and outcomes for CLI, Doctor, and Gateway clients. This change combines the candidate’s recorded build identity with fresh service health observations before updating that history. flowchart TD
A[Installed updater] --> B[Candidate finishes post-core work]
B --> C[Record candidate build in update history]
C --> D[Gateway watcher or Doctor]
D --> E{Drivers dead and recovery guards clear?}
E -->|Yes| F[Verify installed and serving build health]
F --> G[Recheck ledger and record success]
E -->|No| H[Preserve existing outcome]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +361, Tests +299, Docs +27. Total +687 across 12 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep completion recovery in the shared ledger owner, using exact build and fresh health evidence while preserving genuinely failed or unverifiable history. Do we have a high-confidence way to reproduce the issue? Yes: interrupt the updater during verification after the Gateway PID changes. The supplied baseline runs demonstrate the false abandoned outcome, and current-main source retains that mechanism; this review did not execute it. Is this the best way to solve the issue? Yes: one shared reconciliation operation reuses existing health checks and storage fields, with fresh transactional guards instead of treating version equality alone as success. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 07cd92b5772b. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
…rent-main-20260918 * origin/main: (1925 commits) fix(ui): preserve person picker selection and profile photos (#152194) feat(meetings): summarize meetings during live capture (#151957) refactor(watch): share delivery status text formatting (#152228) fix(skills): detach idle reviews from foreground plugin scope (#152235) fix(mcp): stop cancelled question tests leaking into later cases (#152215) fix: show pasted text as compact chat chips (#151618) refactor(config): share diagnostic container scanning (#149099) fix(whatsapp): admit debounce candidates independently (#112001) fix(release): qualify 2026.7.34 frozen SDK (#152230) fix(sessions): notify Home about new sessions by default (#152068) fix(ui): open workspace links with spaces and emoji (#152179) fix(update): reconcile completed updates after interrupted verification (#152202) fix: reduce repeated update validation for large agent fleets (#151678) docs: clarify WebChat commentary attachment compatibility (#152225) fix(worktrees): keep provisioning inspection under the Git output cap (#150532) fix(ui): unify fullscreen widget menu typography (#152223) test(gateway): synchronize unstable task registry scans (#152213) fix: restore automation creation for remote administrators (#151291) improve: defer internal agent-turn execution imports until use (#151935) fix(agents): resume private child results in channel conversations (#152207) ...
…on (openclaw#152202) A completed update could later appear as failed/abandoned when its updater exited during restarted-Gateway verification, despite the target build serving successfully. Record the installed candidate identity before post-core handoff and let the shared update-ledger reconciliation owner verify installed and serving builds before settling the latest interrupted run. Gateway monitoring and Doctor reuse the same owner. Preserve active or unobservable drivers, newer runs, repair/rollback evidence, and legacy rows without a receipt; recheck authority and row identity inside the transaction. Report verified completion with an interruption warning and explain unresolved older abandonment in Doctor. The receipt uses existing ledger steps, without schema, configuration, CLI, or dependency changes. Keep after.version empty until serving verification to preserve released rollback behavior. Validation: 135 focused regressions, full changed-file checks, and published 2026.9.4 updater-to-candidate proof on isolated systemd services. SIGINT and SIGHUP during verification changed from abandoned failures to successful settlement after 10.701 and 11.835 seconds. Recorded Codex review was scoped-clean; ClawSweeper found no actionable patch defect.
What Problem This Solves
Fixes a completed update later appearing as
OpenClaw update failed: abandonedwhen the updater is interrupted while verifying the restarted Gateway, as reported on Discord.User Impact
The Gateway and Doctor can record a truthful successful outcome after the updater exits, with a warning explaining the interruption. Doctor explains older abandoned runs whose recorded evidence cannot prove completion. Log-follow transport retry is handled separately in #152152.
Why This Change Was Made
The installed updater can disappear after activation without recording the target build or final health result. The candidate now records its exact installed build identity before returning post-core completion. One ledger owner verifies the installed and serving target through the existing restart-health checks before atomically settling the latest interrupted run.
Live or unobservable drivers, newer runs, recovery work, and recorded repair, acknowledgement, failure, or rollback evidence prevent correction. The transaction rechecks the row after probing. Untouched legacy admissions retain their synchronous startup expiry. Existing steps carry the identity: no schema, run-state, option, environment variable, or dependency change is needed, and the released rollback interpretation of an empty
after.versionis preserved.Evidence
Published 2026.9.4 updater → candidate, private npm prefixes and isolated state, real systemd user services. Each signal was injected at
running/verifying, after the Gateway PID changed and before confirmation:failed / abandonedsucceeded, reason nullfailed / abandonedsucceeded, reason nullInstalled and serving builds matched the respective target in all four cells. Both final-head rows contain the target receipt, full readiness facts, and an interruption warning; both status rows read
✅ OpenClaw updated to 2026.9.4 (from 2026.9.4).No probe edited timestamps, outcomes, or published binaries. Baseline Testbox · Final-head Testbox. All task-owned Testboxes are stopped.The full package build and both live cells tested exact head
6d8d60518013bbaba38fa1d6a1fce89416c2f725, verified source treeff487dae4f6ad5822407c41c8333c48aa59a5219. Installed/serving build:2026.9.4-21b42634966a-2026-09-18T22-42-06.840Z.node scripts/check-changed.mjspassed in full, including production/test typechecks, lint, dead exports, schema/import-cycle guards, and the remaining guards. No suppressions, baseline edits, or extension-lint substitution were needed.Exact-head CI is green: run 35402621904, attempt 2, completed successfully with 142 successful checks, 15 skipped, 0 failing, and 0 pending in the CI run. REST verified head
6d8d60518013bbaba38fa1d6a1fce89416c2f725. One failed-jobs infrastructure rerun recovered the runner shutdown; no source changes were needed.Production LOC: +385/−24. Tests: +313/−14. Documentation: +30/−3.