Repository navigation
fix(doctor): continue past skipped legacy audit-log recovery instead of stopping as a refusal - #145376
Conversation
Preserve audit archive ambiguity, checkpoint capacity, and append-order safeguards as warning-bearing skips so later Doctor and update repairs run. Keep unsafe recovery and agent ownership refusals blocking, and document that successful finalization does not reconcile the preserved audit history. Refs #145340. Co-authored-by: robertemetz-afk <[email protected]>
|
🦞👀 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 11, 2026, 8:32 PM ET / September 12, 2026, 00:32 UTC (Revision 5). ClawSweeper reviewWhat this changesDoctor treats safely preserved legacy audit archives as warning-bearing skips, continues later repairs, and includes those warnings in update results and recovery documentation. Merge readiness✅ Ready for maintainer review This remains a useful, bounded fix absent from current main and the latest release. No actionable patch defects were found; historical audit reconciliation remains separate from the finalization repair. Priority: P1 Review scores
Verification
How this fits togetherDoctor migrates legacy state before update finalization continues. The audit migration owner checks archive safety and returns receipts that determine whether later repairs proceed and which warnings reach the updater. flowchart TD
A[Update repair or Doctor] --> B[Inspect legacy audit archives]
B --> C{Recovery outcome}
C -->|Completed| D[Continue later repairs]
C -->|Safely skipped| E[Preserve archive and warning]
E --> D
C -->|Unsafe recovery| F[Stop with refusal]
D --> G[Update result with warnings]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +38, Tests +137, Docs +23. Total +198 across 7 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep safe audit skips advisory within the existing migration owner, preserve recovery inputs, and track historical reconciliation separately in #145340. Do we have a high-confidence way to reproduce the issue? Yes: current main turns the documented checkpointless-whitespace archive warning into a refused receipt and stops later migration steps. This review established that path from source without executing it. Is this the best way to solve the issue? Yes: classifying safe non-outcomes at the audit owner and forwarding their warnings repairs finalization without bypassing archive ambiguity checks or introducing another recovery mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6cb7280a4e85. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
Include advisory skipped receipts in the Doctor result sent to the updater, so successful finalization reports the preserved legacy audit archive warning. Keep failed Doctor runs from publishing successful migration advisories. Refs #145340. Co-authored-by: robertemetz-afk <[email protected]>
|
Merged via squash.
|
…of stopping as a refusal (openclaw#145376) Doctor and `openclaw update repair` no longer stop when a legacy audit-log archive is deliberately skipped (checkpointless raw archive, exhausted checkpoint capacity, or a rewritten archive). The skip is recorded as a warning with recovery guidance and later repairs run. The audit migration owner keeps unsafe recovery failures blocking, preserves the archives and generation ordering, and forwards skipped-receipt warnings through Doctor into update results. Historical-record reconciliation remains a separate design decision. Validated by runner and Doctor IPC regressions, published 2026.9.3 updater-to-candidate Docker observations, and green exact-head CI. Fixes openclaw#145340. Thanks to @robertemetz-afk for reporting the problem and providing preserved-history evidence. Co-authored-by: robertemetz-afk <[email protected]>
…150425) Doctor now quarantines a config-audit archive that changed other than by append and continues later repairs. Check checkpoint integrity before parsing, preserve existing SQLite rows and sanitized history, and keep repeat runs quiet. Empty checkpointless raw archives cannot erase retained sanitized companions. Portable backups exclude quarantined raw bytes and their derivatives through the shared audit-path classifier, preserving local originals and sanitized archive content. This completes the backup privacy boundary across discovery, tar exclusion, and volatile filtering. Reported by an Ubuntu operator on Discord using OpenClaw 2026.9.3. Related: #145376. Validation: exact-head CI passed; 135 focused tests, changed checks, and build passed in the fix lane. Published 2026.9.3 driver proof demonstrated exit 1 to exit 0, preserved history, later repairs, and quiet repeats. The fix lane's broad local backup-suite diagnostic was incomplete; hosted CI is the completed full gate. The scoped Codex review and current-head ClawSweeper review have no actionable findings.
…penclaw#150425) Doctor now quarantines a config-audit archive that changed other than by append and continues later repairs. Check checkpoint integrity before parsing, preserve existing SQLite rows and sanitized history, and keep repeat runs quiet. Empty checkpointless raw archives cannot erase retained sanitized companions. Portable backups exclude quarantined raw bytes and their derivatives through the shared audit-path classifier, preserving local originals and sanitized archive content. This completes the backup privacy boundary across discovery, tar exclusion, and volatile filtering. Reported by an Ubuntu operator on Discord using OpenClaw 2026.9.3. Related: openclaw#145376. Validation: exact-head CI passed; 135 focused tests, changed checks, and build passed in the fix lane. Published 2026.9.3 driver proof demonstrated exit 1 to exit 0, preserved history, later repairs, and quiet repeats. The fix lane's broad local backup-suite diagnostic was incomplete; hosted CI is the completed full gate. The scoped Codex review and current-head ClawSweeper review have no actionable findings.
Fixes #145340
Additional instructions
Keep Allow edits from maintainers enabled so maintainers can help update the branch.
What Problem This Solves
Fixes an issue where users running
openclaw update repairwould stop before later repairs when Doctor deliberately preserved a legacy audit archive. A checkpointless scrubbed raw archive, exhausted checkpoint capacity, or a non-append archive change was incorrectly reported as a migration refusal.Why This Change Was Made
The audit owner now distinguishes completed, skipped, and refused sources. The existing receipt writer records an advisory skip without halting later Doctor steps. Unsafe recovery failures still refuse, and an older skipped generation still blocks later generations of the same logical audit source. Warnings from a failed claim restoration cannot be hidden by a prior skip.
Doctor also carries warnings from skipped receipts into its updater result, so
postUpdate.doctor.warningsincludes the preserved-archive warning. The internal skip outcome preserves the existing public plugin warning contract. Archive bytes, checkpoint limits, retention, and recovery semantics remain unchanged.User Impact
Doctor and update finalization can continue with the skip warning recorded. The warning links to recovery guidance and repeats until the archive is resolved. Thanks to @robertemetz-afk for the report and preserved-history evidence.
Successful finalization does not mean the companion's historical records were imported. There is no existing supported sanitized-only import path. Historical reconciliation requested in #145340 remains a separate design decision; this change fixes the finalization blockage and preserves its recovery inputs.
Evidence
skipped, receivedrefused; the unsafe recovery control passed.f29896e4e4b: published 2026.9.3 update exit 0; candidate repair exit 0 withstatus: "warning"and the audit warning inpostUpdate.doctor.warnings; standalone Doctor exit 0;/readyz200 withready: trueand no failing conditions. Shared schema advanced 16 → 17. Both 6,750-byte archive hashes stayed identical and all 45 sanitized records were preserved. Candidate tarball SHA-256:580e8aa71a056e5cc9a8393af983be18c38b6e593af429e5242a959560166cd8.node scripts/check-changed.mjspassed, including core/test types, lint, repository guards, and dead-export checks. Documentation link audit: 13,455 links, zero broken.87504f7ec9eand the submitted head.No production data was used. No changelog, configuration option, dependency, schema, protocol, or persistent recovery policy was changed.
ClawSweeper review
The completed September 12 00:22 UTC review of
f29896e4e4b4a53de71365d0f019d7b7d1adf82cfound no actionable defects and listed no before-merge or Rank-up moves. No fixups or skips are needed. Historical-record reconciliation remains separate from this finalization fix.