Repository navigation
fix(update): clear repeated Doctor guidance after repair - #153261
Conversation
Select all unacknowledged abandoned runs in Doctor's history window for successful repair acknowledgement. Keep the freshness window only for the ledger-only shortcut, preserving full convergence for older history and liveness admission for running updates. Preserve failed outcomes and missing target-build evidence while stopping Doctor's repeated repair guidance. Thanks to @IWhatsskill for the report. Fixes #153228
|
🦞👀 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: needs maintainer review before merge. Reviewed September 19, 2026, 9:36 PM ET / September 20, 2026, 01:36 UTC (Revision 2). ClawSweeper reviewWhat this changesSuccessful update repair acknowledges older abandoned updates in Doctor’s recent history so their repair instructions stop repeating, while preserving the original failure records. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix for a gap still present on current main. The supplied CLI evidence supports the intended outcome, and no actionable correctness or security defect was found. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw records update attempts in its SQLite history, which Doctor reads to provide recovery guidance. The repair command selects outstanding records and acknowledges them through the existing recovery and finalization owners. flowchart TD
A[Update history] --> B[Repair command]
B --> C[Check active updater ownership]
C --> D[Select outstanding abandoned runs]
D --> E[Healthy Gateway shortcut or full finalization]
E --> F[Record successful acknowledgement]
F --> G[Doctor omits resolved guidance]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +2, Tests +72, Docs +4. Total +78 across 5 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep history selection aligned with Doctor’s reporting window and record successful recovery through the existing acknowledgement owner without erasing historical failures. Do we have a high-confidence way to reproduce the issue? Yes: current-main source establishes that older, nonlatest abandoned records remain visible to Doctor but are omitted from repair acknowledgement. This review did not execute the reproduction. Is this the best way to solve the issue? Yes: the patch repairs selection at the existing command owner, retains freshness checks for the shortcut, and reuses established finalization and persistence behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c53eaf550972. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…153261) Repair now acknowledges outstanding abandoned updates in Doctor's latest 100 history records, including aged runs behind newer updates. Doctor stops repeating resolved repair guidance while the original failed outcomes, finish times, and unknown target-build evidence remain intact. The repair command selects the outstanding records and delegates acknowledgement to the existing successful-finalization owner. Aged records still require full convergence; active updater admission and failed-repair behavior remain protected. Thanks to @IWhatsskill for the source-cited report in openclaw#153228. Validation: 233 focused tests across 8 files; changed-file checks; isolated CLI repair against records from the published 2026.9.5 ledger reduced Doctor guidance from two instructions to zero while preserving historical failures. Campaign autoreview was scoped-clean and exact-head CI passed.
Successful update repair now reports the historical run IDs whose acknowledgments were newly recorded, while preserving failed outcomes. The existing ledger writer returns whether it inserted the acknowledgment, and both repair paths use that result for JSON reporting. Additional captured historical candidates go through the existing full finalizer. The captured 100-row history, 30-minute lightweight boundary, and live-updater protections remain intact. No schema, configuration, CLI option, or dependency changes. Thanks to @IWhatsskill for the original report and discussion. Validation: 235 focused tests across seven affected files and 1,183 routing tests passed on an isolated Testbox; scoped-clean Codex review and exact-head CI passed. Published-driver/candidate maintenance recovery remains a documented validation gap. Related: #153228. Complements the historical-selection fix in #153261. Co-authored-by: IWhatsskill <[email protected]>
…53291) Successful update repair now reports the historical run IDs whose acknowledgments were newly recorded, while preserving failed outcomes. The existing ledger writer returns whether it inserted the acknowledgment, and both repair paths use that result for JSON reporting. Additional captured historical candidates go through the existing full finalizer. The captured 100-row history, 30-minute lightweight boundary, and live-updater protections remain intact. No schema, configuration, CLI option, or dependency changes. Thanks to @IWhatsskill for the original report and discussion. Validation: 235 focused tests across seven affected files and 1,183 routing tests passed on an isolated Testbox; scoped-clean Codex review and exact-head CI passed. Published-driver/candidate maintenance recovery remains a documented validation gap. Related: openclaw#153228. Complements the historical-selection fix in openclaw#153261. Co-authored-by: IWhatsskill <[email protected]>
What Problem This Solves
Fixes: Doctor repeatedly asks operators to run
openclaw update repairfor abandoned updates that repair cannot acknowledge because they are older than 30 minutes or are not the latest history record.Fixes #153228. Thanks to @IWhatsskill for the source-cited report.
User Impact
After successful repair, Doctor stops repeating the repair instruction for outstanding abandoned runs in its latest 100 history records. Original failed outcomes and unknown target-build evidence remain intact. Live or possibly active updates remain protected, and failed repair leaves its outstanding history visible.
Why This Change Was Made
Repair now selects all unacknowledged abandoned history and passes those IDs to the existing successful-finalization acknowledgement loop. Terminal age only controls whether a fresh record can use the existing ledger-only shortcut; old history still requires full convergence. The existing
reconcile:acknowledgedstep records the outcome, with no schema, options, dependencies, or watcher changes.This does not depend on #153178 or duplicate its failed-finalization recovery observations. The lifecycle test file and nearby recovery docs may need a mechanical merge with that PR.
Evidence
doctor --fixprinted 2 abandoned-history instructions; candidateupdate repair --yes --jsonexited 0 (status: warning, plugin convergenceok, all seven phases completed); the nextdoctor --fixexited 0 with 0 abandoned-history instructions. Both rows retainfailed/abandonedand their original finish times, with the existing acknowledgement step persisted. State and its pre-repair SQLite/config backup stayed inside the task worktree; no Gateway was started or modified.node scripts/check-changed.mjspassed, including core/test typechecks, all three unused-export scans, lint, schema guards, and import-cycle checks.git diff --checkpassed. Fresh P1 autoreview: scoped-clean.Production: +12/-10 (net +2). Tests: +74/-2 (net +72). Docs: +4. The fix changes repair selection and clarifies the freshness predicate; the reader, acknowledgement writer, Doctor reporting owner, and Gateway watcher remain unchanged.
Review disposition
ClawSweeper reviewed head
45afc7fe5d3123d8391781664d6ff3eeb0f7b622at 2026-09-19 23:51 UTC and reported no correctness findings, security findings, before-merge actions, or Rank-up moves. No review changes or skips are needed. The existing finalization and ledger acknowledgement owners remain canonical.