Skip to content

fix(update): report historical repair acknowledgments accurately - #153291

Merged
steipete merged 1 commit into
mainfrom
openclaw/fix-update-repair-history-153228
Sep 20, 2026
Merged

steipete merged 1 commit into
mainfrom
openclaw/fix-update-repair-history-153228

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #153228
Follow-up to #153261, which has now landed in main.

What Problem This Solves

Fixes missing historical run IDs in repair JSON after abandoned records have been acknowledged, and keeps additional historical recovery work out of the lightweight shortcut.

User Impact

Automation receives the IDs actually newly acknowledged by successful repair. Additional historical candidates require full finalization; failed outcomes, live-updater protections, the 30-minute shortcut boundary, and the captured 100-row history limit remain intact. No schema, configuration, or migration change is required.

Why This Change Was Made

The primary historical-selection fix is already in main. This refreshed PR preserves the complementary acknowledgment reporting, captured-history safeguards, and end-to-end boundary coverage without duplicating the landed fix. The new real-SQLite regression is registered with the existing host-broker test lane, used by both local routing and CI.

Evidence

  • Rebased onto d98c42737902bef513b951726cbae2f1e4bb9fd5; resolved overlapping changes while preserving current main finalization ownership and its freshness predicate.
  • 235 tests passed across the seven affected test files, plus 1,183 test-routing tests on an isolated Blacksmith Testbox (Node 24.19.0, pnpm 12.4.0). The history suite exercises the public repair handler → real finalizer → real isolated SQLite → Doctor reporting.
  • The refresh exposed eight history-test failures in the generic thread pool. Adding the test to the canonical host-broker inventory restored all 14 history cases without weakening assertions, mocking the broker, or changing production guards.
  • Final independent autoreview P0–P2: scoped-clean, no findings.
  • Formatting, early repository guards, and core production typechecking passed on the Testbox. Its supplemental aggregate changed-file run was interrupted before a complete receipt and is not counted as a full pass. All four production/test typecheck jobs passed on the refreshed head in CI run 35509762458.
  • External Doctor/plugin/service operations are mocked in the history suite; separate cross-process lifecycle tests passed. No live packaged-driver upgrade matrix, full build, or full repository runtime suite was run.

Worked on by: @IWhatsskill

Work sessions

Maintainer landing disposition

ClawSweeper reviewed 9d6eccefe3f25c394dc0d15670ef32e6b6460421 on September 20 at 12:15 UTC and found no actionable correctness or security defect. Its single Rank-up move requests a redacted published-driver/candidate repair transcript covering newly acknowledged JSON IDs, preserved failures, cleared Doctor guidance, and maintenance recovery. Skipped for this landing under the maintainer's explicit instruction to land this reviewed head and record Rank-up dispositions. That published-driver compatibility scenario remains a validation gap; the real-SQLite command boundary tests and hosted CI do not replace it. The related compatibility-proof and maintenance-route evidence requests have the same disposition.

The existing ledger acknowledgment writer remains the source of truth, and both repair paths report only new successful acknowledgments. Additional captured historical candidates use the existing full finalizer; failed outcomes, live-updater protections, the 30-minute shortcut boundary, and the 100-row captured history limit remain preserved. No schema, dependency, configuration, or CLI option changes are included.

Landing reuses the accepted scoped-clean Codex review of record and exact-head green CI. No semantic source changes are made in this landing. Production: +36/−26 (net +10); tests and test routing: +319/−15 (net +304); docs: +14/−5 (net +9).

@clawsweeper

clawsweeper Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes size: M maintainer Maintainer-authored PR labels Sep 20, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 20, 2026 00:29
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 20, 2026
@clawsweeper

clawsweeper Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 20, 2026, 8:36 AM ET / 12:36 UTC (Revision 3).

ClawSweeper review

What this changes

The PR makes update repair report newly acknowledged history IDs accurately, sends additional historical recovery through full finalization, and adds regression coverage and documentation.

Merge readiness

⛔ Blocked before merge - 1 item remains

The refreshed PR remains useful beyond the merged historical-selection fix. No actionable correctness or security defect was found; the recorded landing disposition addresses the previous review’s proof request.

Priority: P2
Reviewed head: 9d6eccefe3f25c394dc0d15670ef32e6b6460421

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable fix with meaningful regression coverage, no actionable findings, and an explicitly recorded validation exception.
Proof confidence 🌊 off-meta tidepool Not applicable: The bot-authored PR is exempt from ordinary contributor proof. Its SQLite command-boundary tests support acknowledgment behavior but mock maintenance effects; the captured landing disposition explicitly skips the previously requested published-driver/candidate proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The bot-authored PR is exempt from ordinary contributor proof. Its SQLite command-boundary tests support acknowledgment behavior but mock maintenance effects; the captured landing disposition explicitly skips the previously requested published-driver/candidate proof.
Evidence reviewed 8 items Verified review scope: Reviewed the pinned merge-base-to-head changes. The host’s verified test merge has the pinned base followed by the exact PR head as parents; unrelated endpoint drift is excluded. Initial and final git status were clean.
Canonical acknowledgment writer: The existing transactional writer returns true only when it adds the existing acknowledgment step. Both repair paths consume that result; historical status, reason, and finish time remain unchanged.
Introduced maintenance routing: Additional captured historical IDs force the existing full finalizer. This can enter Doctor maintenance where main could take the lightweight path; admission and service-restoration owners remain unchanged.
Findings None None.
Security None None.

How this fits together

Update repair reads OpenClaw’s SQLite update history and chooses lightweight reconciliation or Doctor/plugin maintenance. Successful recovery records acknowledgments that clear Doctor guidance and populate the CLI’s JSON result while preserving historical failures.

flowchart TD
  A[Operator requests repair] --> B[Check active updater ownership]
  B --> C[Capture recent update history]
  C --> D{Lightweight recovery eligible?}
  D -->|Yes| E[Verify Gateway health]
  D -->|No| F[Doctor and plugin finalization]
  E --> G[Record new acknowledgments]
  F --> G
  G --> H[Accurate JSON and cleared Doctor guidance]
Loading

Before merge

  • Resolve merge risk (P1) - Additional recent historical failures can now trigger Doctor/plugin maintenance and temporarily stop an owned Gateway. Published-driver compatibility and service recovery through this expanded route remain un demonstrated; the PR body explicitly records accepting that validation gap for this landing.
Agent review details

Security

None.

PR surface

Source +10, Tests +304, Docs +9. Total +323 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 3 36 26 +10
Tests 4 319 15 +304
Docs 1 14 5 +9
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 369 46 +323

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +36/−26; tests and routing +319/−15 The net production growth supports accurate acknowledgment reporting and bounded selection; most growth covers observable recovery invariants.

Merge-risk options

Maintainer options:

  1. Honor the recorded landing disposition (recommended)
    Proceed under the documented acceptance of the published-driver and expanded-maintenance validation gap.

Technical review

Best possible solution:

Keep acknowledgment reporting with the existing ledger writer and finalization owner, preserving the documented landing exception for published-driver compatibility proof.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: repairing an already-terminal abandoned row on current main writes its acknowledgment but omits its ID from reconciledRuns. Runtime reproduction was not executed in this read-only review.

Is this the best way to solve the issue?

Yes. Returning the existing writer’s actual mutation result fixes reporting without adding another state owner or stored format; the stricter maintenance route is documented and its proof exception is recorded.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 8cd38b03ceb8.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded repair-reporting correction with no demonstrated urgent runtime failure.
  • merge-risk: 🚨 compatibility: More historical-repair cases enter service maintenance, and published-driver validation remains an explicitly accepted gap.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The bot-authored PR is exempt from ordinary contributor proof. Its SQLite command-boundary tests support acknowledgment behavior but mock maintenance effects; the captured landing disposition explicitly skips the previously requested published-driver/candidate proof.

Evidence

What I checked:

  • Verified review scope: Reviewed the pinned merge-base-to-head changes. The host’s verified test merge has the pinned base followed by the exact PR head as parents; unrelated endpoint drift is excluded. Initial and final git status were clean. (9d6eccefe3f2)
  • Canonical acknowledgment writer: The existing transactional writer returns true only when it adds the existing acknowledgment step. Both repair paths consume that result; historical status, reason, and finish time remain unchanged. (src/infra/update-run-ledger.ts:271, 9d6eccefe3f2)
  • Introduced maintenance routing: Additional captured historical IDs force the existing full finalizer. This can enter Doctor maintenance where main could take the lightweight path; admission and service-restoration owners remain unchanged. (src/cli/update-cli/update-repair-command.ts:178, 9d6eccefe3f2)
  • Distinct reporting defect remains on main: Fetched main fills reconciledRuns from running-to-terminal reconciliation, then separately acknowledges terminal history without adding those IDs. The PR’s reporting correction therefore remains necessary. (src/cli/update-cli/update-command-finalize.ts:437, 8cd38b03ceb8)
  • Latest release comparison: GitHub’s v2026.9.5 source also reports reconciliation results separately from terminal acknowledgments. Local release-blob inspection failed; the read-only GitHub contents response supplied the release source. (src/cli/update-cli/update-command-finalize.ts:415, ec9c1a13db89)
  • Merged related work and area history: GitHub verifies fix(update): clear repeated Doctor guidance after repair #153261 merged at b1c062d. Its patch establishes historical selection, while current-main history also shows earlier repair and service-restoration work by Peter Steinberger. This is complementary work, not complete supersession. (src/cli/update-cli/update-repair-command.ts:107, b1c062d5c23b)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • fuller-stack-dev: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-20T00:38:11.441Z sha f875e36 :: blocked before merge. :: none
  • reviewed 2026-09-20T12:15:15.012Z sha 9d6ecce :: blocked before merge. :: none

Separate historical acknowledgment from lightweight repair eligibility.
Preserve failed outcomes, the 30-minute shortcut, and live-driver protections;
acknowledge captured Doctor-visible history only after successful convergence.

Fixes #153228

Co-authored-by: IWhatsskill <[email protected]>
@roboclaw-bot
roboclaw-bot force-pushed the openclaw/fix-update-repair-history-153228 branch from f875e36 to 9d6ecce Compare September 20, 2026 12:08
@roboclaw-bot roboclaw-bot changed the title fix(update): clear stale Doctor prompts after successful repair fix(update): report historical repair acknowledgments accurately Sep 20, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 20, 2026
@steipete
steipete merged commit ffce422 into main Sep 20, 2026
243 checks passed
@steipete
steipete deleted the openclaw/fix-update-repair-history-153228 branch September 20, 2026 12:47
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 21, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants