Skip to content

fix(doctor): distinguish current recovery findings - #155376

Merged
steipete merged 2 commits into
mainfrom
upd/session-recovery-report-findings
Sep 22, 2026
Merged

steipete merged 2 commits into
mainfrom
upd/session-recovery-report-findings

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #155340, #155194. Thanks @lojasarah for the recovery report.

What Problem This Solves

A fresh session SQLite recovery report can show a repaired migration's old errors beside current findings under one Issues count. In #155340, that includes a historical settlement error naming another agent's transcript.

User Impact

Reports now show current recovery findings separately from recorded migration and recovery evidence. A clean recovery explicitly shows zero current issues; a target not inspected in that recovery is labeled accordingly. The JSON report preserves its combined issues evidence and adds recoveryIssues for inspected targets.

Already claimed or published report artifacts remain immutable. This does not change session import, verification, plugin handling, update admission, or rollback behavior. There are no new flags, configuration options, dependencies, or SQLite schema changes.

Why This Change Was Made

The live cross-agent failure producer was already fixed by #154413, present on main and #155194. Its old messages remain valuable forensic evidence. The report owner merged historical manifest issues with fresh recovery findings without identifying which were current; this patch keeps that evidence and labels the current result at the same owner.

This branch starts from main eb20f68c1e96309a76a05c124be1c93db85804a3. It does not modify the #155194 branch or any settlement owner. Its P1 review found no actionable findings.

Evidence

  • Regression first on Testbox: all three new cases failed on the original report output (clean recovery, remaining plugin warning, and unselected target).
  • After the fix: 34 tests passed across doctor-session-sqlite.failure-reports, receipt-recovery, active-settlement, and retained-source-verification. The four-file run used 37.81 s wrapper wall / 36.21 s Vitest wall with one worker.
  • Existing tests confirm previous and current evidence both remain available, published/claimed report bytes remain unchanged, and failed active history is not assigned to a clean agent.
  • The first changed gate passed all typechecks and failed no-map-spread; explicit fields replaced the object spread. The final report file passed 12/12 again in 13.13 s wrapper wall / 11.68 s Vitest wall (1.221 s executing tests, including 20 ms for the three new cases), followed by the complete changed gate.
  • check:changed: passed on the final patch, including all 25 core-test type graphs and zero lint warnings/errors. The combined final report-test + check command exited 0 in 24m20.176s.
  • Independent Codex P1 autoreview: scoped clean.

Testbox: tbx_01m33cv2jk4y7ddhm7qbb1sz0n (run); stopped after proof, with terminal state independently verified.

LOC: production +40/−21 (net +19); tests +61/−0; docs +6/−1.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation commands Command implementations size: S maintainer Maintainer-authored PR labels Sep 22, 2026
@steipete
steipete marked this pull request as ready for review September 22, 2026 02:46
@clawsweeper

clawsweeper Bot commented Sep 22, 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.

@steipete
steipete enabled auto-merge (squash) September 22, 2026 02:51
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 22, 2026
@clawsweeper

clawsweeper Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 21, 2026, 10:53 PM ET / September 22, 2026, 02:53 UTC.

ClawSweeper review

What this changes

Doctor recovery reports distinguish current findings from historical evidence, add an optional current-findings JSON field, and document and test the distinction.

Merge readiness

⛔ Blocked before merge - 1 item remains

The reporting fix remains useful and is not present on fetched main or the latest release. No actionable correctness or security defect was found; the related recovery changes address distinct behavior.

Priority: P2
Reviewed head: 37207b7c96909bb6692721abdbc53537286ba806

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with meaningful regression coverage, preserved compatibility, and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The external-contributor proof gate does not apply to this member-authored PR. Report-writer regressions and reported Testbox results support the changed output; they are not classified as live CLI proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor proof gate does not apply to this member-authored PR. Report-writer regressions and reported Testbox results support the changed output; they are not classified as live CLI proof.
Evidence reviewed 7 items Verified introduced scope: The pinned merge-base-to-head patch changes only report construction, its regression tests, and documentation. The verified test merge has the recorded base followed by the exact PR head and retains the same three-file scope.
Current-main necessity: Fetched main still combines historical and current findings under one Issues heading; its report-owner file is unchanged from the PR merge base.
Latest-release check: The v2026.9.5 source still renders the undifferentiated Issues heading and has no recoveryIssues field. GitHub source inspection supplied the release blob unavailable locally.
Findings None None.
Security None None.

How this fits together

Doctor repairs and diagnoses OpenClaw session storage. Its report writer combines migration records with fresh recovery results to produce private JSON and Markdown artifacts used for support.

flowchart TD
  A[Migration records] --> C[Recovery report writer]
  B[Fresh recovery results] --> C
  C --> D[Match inspected targets]
  D --> E[Sanitize and separate findings]
  E --> F[Private JSON and Markdown]
  F --> G[Support issue preparation]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +19, Tests +61, Docs +5. Total +85 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 40 21 +19
Tests 1 61 0 +61
Docs 1 6 1 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 107 22 +85

Review metrics

Metric Value Why it matters
Report compatibility 1 optional JSON field added; 0 existing fields removed Consumers retain combined evidence while inspected targets gain an explicit current-findings collection.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/commands/doctor-session-sqlite-failure.ts, serialized state: src/commands/doctor-session-sqlite-failure.ts, unknown-data-model-change: src/commands/doctor-session-sqlite-failure.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep current findings explicit at the existing report owner while preserving historical evidence, sanitization, and immutable published artifacts.

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

Yes, from source: a failed manifest with historical errors and a matching clean recovery target still produces a nonzero undifferentiated Issues count on fetched main. No runtime reproduction was executed during this read-only review.

Is this the best way to solve the issue?

Yes. Separating fresh findings at the existing report writer is a focused repair that preserves the combined evidence and publication lifecycle.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This fixes misleading recovery diagnostics without changing migration execution or session data.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this member-authored PR. Report-writer regressions and reported Testbox results support the changed output; they are not classified as live CLI proof.

Label justifications:

  • P2: This fixes misleading recovery diagnostics without changing migration execution or session data.
  • 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 external-contributor proof gate does not apply to this member-authored PR. Report-writer regressions and reported Testbox results support the changed output; they are not classified as live CLI proof.

Evidence

What I checked:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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.

1 participant