Skip to content

fix(doctor): post-session plugin repair fails when a historical transcript is deferred - #160703

Closed
jayzhou2309 wants to merge 4 commits into
openclaw:mainfrom
jayzhou2309:fix/doctor-settle-historical-deferred
Closed

jayzhou2309 wants to merge 4 commits into
openclaw:mainfrom
jayzhou2309:fix/doctor-settle-historical-deferred

Conversation

@jayzhou2309

@jayzhou2309 jayzhou2309 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Closes #153502

Original contribution: @jayzhou2309.

Work sessions

What Problem This Solves

Fixes: post-session plugin repair fails and leaves verified retained session sources unsettled when a session store also has a deferred historical transcript (historical_transcript_deferred, including unrecognized historical records).

User Impact

User impact: openclaw doctor --fix and openclaw update repair finish the deferred plugin repair (such as Codex) for these stores instead of reporting retained_plugin_source_settlement_failed. The deferred historical original is still kept in a protected archive with its bytes unchanged.

Why This Change Was Made

historical_transcript_deferred is a warning (src/infra/session-sqlite-migration-issues.ts), and the Doctor guide says retained historical conflicts do not block post-session plugin repair. But settleRetainedDoctorSessionSources gated on isRetainedSourceIssue, which does not list that code, so settlement threw on the first deferred historical transcript.

The fix treats historical_transcript_deferred as settleable inside settleRetainedDoctorSessionSources only. The shared isRetainedSourceIssue predicate is unchanged, because it also gates import-time source capture and receipt recording, and widening it there would change what goes into a receipt. Store archiving during settlement uses the same local predicate, matching the normal import path, which already archives a store that carries only warnings.

Evidence

Exact-head CI follow-through (October 20, 09:57 UTC)

CI run 39402331678 completed on 94fc59b0172bd1f2aae373c7715fe0d07c19af5b with a failed production-typecheck job (check-prod-types). All 809 ordered compiler diagnostics match the previously independently executed clean-main baseline 37e60afc6d2ffb3dab5dee16a52f2aae2554d4ab; no additional compiler diagnostic differs. Main's src/gateway/chat-display-replay.test-support.ts imports UI replay consumers into the Node-only core compiler graph, producing the same DOM/JSX diagnostics. No compiler-policy broadening, suppression, workflow rerun, or main-branch repair was used. This is attributed failed CI, not a green CI gate.

The earlier checks-node-changed-6 historical-fixture failure is absent from this completed run: that shard passed after the fixture repair.

The original contributor runs below are historical, at their stated heads; filename/header mismatches alone are now accepted by main #178146. Current integration and CI attribution are recorded in the CI follow-up below.

  • New test settles verified retained sources when a historical transcript stays deferred in src/commands/doctor-session-sqlite.retained-source-verification.test.ts. It records a verified codex receipt, adds a transcript whose header does not match its filename, and runs settlement. On main (test-only commit) it fails, 1 failed and 14 passed, with the Primary transcript header does not match its original filename error thrown from settlement. With the fix, 15/15 pass. It asserts the retained sources are archived as protected with original bytes, the historical original sits in one protected unreferenced-history archive with original bytes, and a rerun reports only the boot transcript's historical_transcript_deferred warning. Before fix(doctor): retire deferred receipts and track migration backups #162771 the rerun reported 0 issues. Since fix(doctor): retire deferred receipts and track migration backups #162771, Doctor re-discovers archived historical transcripts after a retained source index rebuild, so the mismatched header stays a warning, and the test now expects exactly that one warning.
  • Rebased onto 06d2de9d9e8 (main CI green). The test file passes 15/15 on the branch. With only the test commits on that main, the new case fails (1 failed, 14 passed): settlement rejects with the header-mismatch error.
  • All 34 src/commands/doctor-session-sqlite*.test.ts files: 392 tests pass (rerun after rebasing onto 0783e3f28d4). The helper now lives in doctor-session-sqlite-types.ts beside isRetainedSourceIssue, so doctor-session-sqlite.ts does not grow past the line-cap ratchet.
  • Test cost. pnpm test src/commands/doctor-session-sqlite.retained-source-verification.test.ts --maxWorkers=1 on an Apple Silicon Mac: 24.7s Vitest duration warm (26.2s wall), 42.9s cold, 15 tests; the new case takes 989ms of that. CI for head 7d835e5df93 (run 36484133455, job checks-node-changed-compact-large-8, shard agentic-commands-doctor-sessions-cron): the file's 15 tests sum to 53.6s, and the new case to 2.3s. The new case adds no timers, sleeps, polling, Gateway or process boot, serial config, or worker pin. It reuses the file's existing fixtures.
  • oxlint --deny-warnings and oxfmt --check clean on changed files. pnpm tsgo:core and pnpm tsgo:test:src pass.
  • .agents/skills/autoreview (codex engine, branch mode against main): no actionable findings.
  • Real CLI run, openclaw doctor --fix --non-interactive from source on macOS, main 5c3d2ee against this branch at 7d835e5df93. The state was built on disk by the published [email protected] CLI (doctor --session-sqlite import, which records a verified codex plugin_migration_source_retained receipt). It has two codex transcripts with app-server sidecars, a boot-2026-06-12_...jsonl whose header id does not match its filename, a pending deferred-plugin-migration:codex row (inserted with sqlite3, the one non-CLI step), and sessions.json moved aside as in the unit test. Identical twins were seeded in place, since receipts bind to path and inode. HOME, OPENCLAW_HOME, OPENCLAW_STATE_DIR and OPENCLAW_CONFIG_PATH pointed at a scratch dir.
    • main, exit 1: Plugin session repair did not settle: ... boot-2026-06-12_01-38-43-539-a2a5aeed.jsonl: Error: Primary transcript header does not match its original filename. then Doctor stopped because a state migration refused to continue. The settlement manifest records retained_plugin_source_settlement_failed and codex stays pending.
    • branch, exit 0: Deferred state migration completed for plugin "codex". then Doctor complete. Codex ends completed, and the manifest has no failedAt. A second doctor --fix exits 0 with no session SQLite issues.
    • The two legacy transcripts are archived as protected/indexed-historical-primary and the boot file as protected/unreferenced-history (disposal retained). sha256 of each archive file matches the pre-repair original on both builds.
  • On main a second doctor --fix then exits 0 and settles, because the first run moved the sources before it threw. So the user-visible failure is that first run: exit 1, retained_plugin_source_settlement_failed, and every later Doctor repair skipped. The branch completes in one run.
  • Existing-state upgrade. Published 2026.9.6 doctor --fix on this state exits 0 but does not reach settlement ("installed plugin has not confirmed"). This branch's doctor --fix run after it then upgrades the state DB from schema 18 to 19 and completes codex with matching hashes. main run in the same order fails with the header-mismatch error.
  • openclaw update repair --yes --no-restart (local fixture plugin via plugins.load.paths) exits 0 on both builds and holds the plugin back ("Package convergence must wait until the updating parent releases its install records"). The follow-up doctor --fix it asks for reproduces the split: main exit 1 with the header error, branch exit 0 with the plugin completed.
  • Published updater (ClawSweeper revision 7). The candidate tarball was built from b5d32c8927c with node scripts/package-openclaw-for-docker.mjs --allow-unreleased-changelog, which passed its tarball integrity check (dist/build-info.json commit b5d32c8927c). Two twins were installed from npm [email protected] (c074824), each with its own npm prefix and scratch state, and both were seeded with the fixture above by the published CLI. On one twin, published 2026.9.7 ran openclaw update --tag <candidate .tgz> --yes --no-restart, which exited 0 and printed OpenClaw updated to 2026.9.7 (from 2026.9.7) and Admission: candidate (2026.9.7). After that, --version reports (b5d32c8), and grep -rl isSettleableIssue in the installed dist finds 4 files where it found 0 before. The other twin stayed on 2026.9.7 as the control.
    • The npm package does not bundle codex, so on both twins the update's own Doctor pass left codex pending. openclaw plugins install @openclaw/codex (2026.9.7 from ClawHub) was run on both twins before Doctor.
    • Control, published 2026.9.7: doctor --fix --non-interactive exits 1 with Plugin session repair did not settle: ... Primary transcript header does not match its original filename. The manifest records retained_plugin_source_settlement_failed, and codex stays pending.
    • Updated by the published updater: the same command exits 0 with Deferred state migration completed for plugin "codex". and Doctor complete.. Codex is completed, and the three originals are archived (protected/indexed-historical-primary x2, protected/unreferenced-history, disposal retained), each with a sha256 that matches its pre-repair original. A rerun exits 0 and reports only the deferred boot warning.
  • Not verified: settlement inside the update run itself (codex was not installed yet at that point, and installing it before the update was not tried), a candidate with a distinct version string (the tarball reports the same 2026.9.7 as the release), gateway restart and service management (--no-restart was used, and service management was skipped for the non-default state paths), update repair itself reaching settlement, the reporter's own operator state, and Linux or Windows.

Additional missing-original coverage (#167385)

Related: #167385. Native deletion followed by removing its generated .jsonl.deleted.*.zst already settles on main; that canonical archive-copy case is distinct from a missing retained session-sqlite-import-archive/*.imported-* original. The canonical fix is #165854.

The added storage-boundary regression creates historical duplicate claims through the real manifest producer, removes an import original, and invokes real Doctor import/settlement under its maintenance lock. It requires an actual retained plan and verifies the legacy index is archived, so a successful no-op cannot satisfy it. The missing original remains absent, its manifest claim stays retained, and the surviving copy keeps its bytes. Receipt capture and recovery/retention policy are unchanged.

  • Preserved main reproduction at 692a4d02d3ce528cf460c744baf19899c17e7534: canonical deleted-copy case passes; missing import-original case fails at settlement with artifact is unexpectedly missing; original retained. The five relevant storage/settlement owner files are unchanged at the current task pin ce3f47b60a55d9302c70936c680319a039a68eed.
  • Exact existing contributor head 025b16d167be42b3e6a2595558e08500ae73de5b plus the initial regression: 13/13 pass in secretless AWS, covering the new two-case file, retained-source verification, and both exact-content missing-source recovery cases. Cold three-file wrapper wall: 125.50s (126.35s outer); added cases: 3.879s and 1.136s.
  • Fresh independent review found one no-op coverage gap; it was repaired as described above. Final P0–P2 review is scoped-clean. The revised two-case file passes 2/2 on the original contributor head in secretless AWS: 4.562s and 1.080s native test time; 79.11s cold wrapper wall (79.93s outer, dominated by worker compilation). Narrow oxlint and oxfmt pass; the commands-doctor typecheck passes (73.81s), and the staged-content guard passes. These exact bytes are committed in efce8fd766013610fb87db94bc89c5f96b965d29, directly on contributor head 025b16d167be42b3e6a2595558e08500ae73de5b, with no production changes or rebase. The final isolated proof run exited 0; native isolated proof is not GitHub CI. Hosted CI seconds for this new file are not yet available.
  • Existing exact-head CI 39033699046 succeeded; it predates this additive regression. CI on an updated published head remains pending.
  • Scope: native storage/settlement proof, not a new live-model, full Doctor CLI, service restart, or published-updater reproduction of this precise missing-original shape. Earlier contributor CLI/updater observations remain earlier-head evidence as already described above.

CI integration follow-up (39397926202)

The first updated-head CI run tested merge 7d09758e7a148546e1dfe264bde82c2c8a28b298 (main 37e60afc6d2ffb3dab5dee16a52f2aae2554d4ab plus PR head efce8fd766013610fb87db94bc89c5f96b965d29). It exposed one stale regression fixture and an independently reproduced main-branch typecheck failure.

  • Main fix: recover renamed legacy session transcripts #178146 (fd566f2a968b27d1ba500c4127e3470f5f2aba76) now imports filename/header mismatches by header identity. The old fixture therefore no longer produced historical_transcript_deferred. The repair does not accept the weaker filename warning: it appends one unrecognized historical record, which registered import preserves but historical discovery refuses. The case still requires real settlement, exactly one protected retained historical archive, unchanged original bytes including the added record, and the warning on rerun.
  • Repair commit 94fc59b0172bd1f2aae373c7715fe0d07c19af5b integrates only that tested main for this named contract failure, preserving efce8fd… as first parent and contributor ancestry. Its delta against the tested merge is only three added/one removed lines in the existing regression. No production changes or recovery-policy changes.
  • Before repair on the actual merge: pinned Bun reproduces 1 failed/8 passed with the same stale warning expectation. After repair: 13/13 pass on pinned Bun and 13/13 on Node across retained-source verification, [Bug]: hand-deleted sessions-delete archive (.jsonl.deleted.*.zst) permanently blocks plugin session repair, codex data upgrade and update verification #167385 coverage and both exact-content recovery cases. Wrapper wall: 62.09s Bun, 106.39s Node; repaired case: 1.165s Bun, 2.089s Node. Focused lint, format, commands-doctor typecheck and staged-content guard pass. Fresh independent P0–P2 review is scoped-clean. New-head CI is still required after publication.
  • The failed check-prod-types core leaf is inherited from the exact tested main: both repaired merge and clean main 37e60af…, using separate frozen installs, fail with the same 809 diagnostics. After normalizing only checkout-root paths, these match all 809 diagnostics in CI job 118546397813. The root core project includes main’s src/gateway/chat-display-replay.test-support.ts (introduced by a2332caed768dab02dfa6586b478c8f89b819535); its Control UI consumer imports pull browser DOM/JSX into the Node-only compiler target. This PR does not change that helper, compiler configuration or dependencies. The gate remains failed; no CI rerun, suppression or type-policy broadening was used.

Proof ran entirely in secretless AWS with no credential hydration. Completed test/compiler results were retained through two harness-only recovery steps (Corepack preparation after the merge changed its pin, then a diagnostic-comparison script syntax fix); the native validation run itself was nonzero for that script error. The remaining comparison, normal commit guard and export completed without replaying tests. This is focused isolated proof, not a green GitHub CI receipt or fresh CLI/updater/live-model proof.

Implementation and verification.

AI disclosure

An AI agent (Claude Code) found this issue, reproduced the defect with the failing test above, wrote the fix and the test, and ran these commands: pnpm test src/commands/doctor-session-sqlite*.test.ts, npx oxlint --deny-warnings, npx oxfmt --check, pnpm tsgo:core, pnpm tsgo:test:src, .agents/skills/autoreview/scripts/autoreview --mode branch, and for the updater proof node scripts/package-openclaw-for-docker.mjs, npm install -g [email protected], openclaw update --tag <tgz>, openclaw plugins install @openclaw/codex, and openclaw doctor --fix --non-interactive in scratch state.


Rebased 2026-10-17 onto main f4fd06c (head 025b16d). Main rewrote retained-source-verification.test.ts with shared helpers, so the new case is a top-level it that uses them, with the same assertions. The rerun-expectation commit had nothing left to add and was dropped. The commit ids and counts above are from the old head. With main's source and the new test, the file has 1 failed of 9. On 025b16d it passes 9/9, the doctor-session-sqlite tests pass (315 tests), and tsgo:core, oxfmt and oxlint pass. The real-CLI and updater evidence above ran on the old head. The source diff is the same.

🤖 Written and posted by an AI agent (Claude Code) on behalf of @jayzhou2309.

@clawsweeper

clawsweeper Bot commented Sep 28, 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 commands Command implementations size: S labels Sep 28, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Allow verified plugin session-source settlement to finish while deferred historical transcripts remain protected.

Example: Codex migration has verified retained sources alongside boot-2026-06-12_01-38-43-539-a2a5aeed.jsonl containing an unrecognized historical record.

  • Before: Settlement rejects historical_transcript_deferred and reports retained_plugin_source_settlement_failed.
  • After: Settlement finishes, preserves the historical file's exact bytes in a protected archive, and retains its warning.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused contract repair with supplied real CLI and upgrade evidence, meaningful storage regressions, and no actionable introduced defect.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The full body records isolated macOS Doctor control/candidate runs and a published 2026.9.7 updater installation followed by real Doctor settlement: the control refuses, the candidate completes Codex migration, and original archive hashes match. Production changes retain the same settlement-only predicate adjustment; current repaired-fixture evidence reports 13 passing cases on both pinned Bun and Node. Direct settlement inside update repair, service restart, and other platforms are explicitly unclaimed.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Doctor can stop deferred plugin repair after core session import is verified because recoverable historical warnings are treated as settlement failures.
Reason: The change restores the documented warning-only recovery contract without adding configuration or weakening import eligibility.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: current main still rejects deferred historical warnings during verified source settlement, and this focused repair preserves the existing safeguards. No actionable patch defect found; current-head CI remains pending.

Priority: P2
Reviewed head: 94fc59b0172bd1f2aae373c7715fe0d07c19af5b

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Current unknown-record and missing-original fixtures have storage-boundary proof; the retained real CLI/updater evidence exercises the unchanged settlement repair on earlier heads.
Agent review details

How this fits together

Doctor imports legacy session files into canonical SQLite storage, retains verified originals for pending plugins, then archives those originals before plugin migration completion.

flowchart TD
  A[Legacy session files] --> B[Doctor import and verification]
  B --> C[Canonical SQLite sessions]
  B --> D[Verified retained-source receipt]
  D --> E[Post-session plugin settlement]
  E --> F[Protected original archives]
  E --> G[Plugin migration completion]
Loading

Technical review

Best possible solution:

Keep settlement tolerant of protected historical warnings while leaving receipt capture, source verification, and archival ownership unchanged.

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

Current-main discovery produces historical_transcript_deferred, and settlement rejects that code despite its warning classification; supplied control runs and regression results corroborate the path, but this read-only review executed no target code.

Is this the best way to solve the issue?

This is the smallest complete repair: distinguish settlement eligibility from receipt-capture eligibility and use the existing verification, archival, and retirement owners.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Settlement archive admission and failure attribution keeps the original intent (383fdbd: Settle imported transcript leftovers through verified receipts while protecting incomplete sources and attributing failures to their owning agents.)
  • Recoverable retained-source issue classification keeps the original intent (2ef2537: Allow recoverable invalid or malformed history to remain warnings while preserving exact source identity and narrow receipt eligibility.)
  • Revised historical-warning fixture keeps the original intent (fd566f2: Header identity now governs renamed transcripts, so the regression uses an unsupported record to retain the historical-refusal scenario.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit dac3cb6 adds src/commands/doctor-session-sqlite.ts:433 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: dac3cb6d47c2; files: src/commands/doctor-session-sqlite.ts)
  • leochun92-sudo: Raw commit 3c3b8d4 adds src/commands/doctor-session-sqlite.ts:517 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 3c3b8d4388e2; files: src/commands/doctor-session-sqlite.ts)

PR surface

Source +5, Tests +219. Total +224 across 4 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 2 10 5 +5
Tests 2 220 1 +219
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 230 6 +224

Review metrics

Metric Value Why it matters
Production versus regression-test changes Production +10/-5; tests +220/-1 The small production change centralizes settlement eligibility; the storage regressions distinguish deferred unsupported history, missing import originals, and explicitly deleted canonical archive copies.

Root-cause cluster

Relationship: same_root_cause
Canonical: #153502
Summary: This PR addresses the remaining historical-warning settlement mismatch; renamed-file recovery and canonical deleted-copy recovery address distinct triggers.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: A bounded maintenance defect interrupts deferred plugin migration while the linked discussion reports healthy runtime operation.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (9 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-28T21:16:13.234Z sha 7d835e5df93cce3348a61bac04643352b8d255e2 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-28T21:40:48.642Z sha 7d835e5df93cce3348a61bac04643352b8d255e2 :: needs changes before merge. :: none
  • reviewed 2026-09-28T22:40:29.742Z sha 7d835e5df93cce3348a61bac04643352b8d255e2 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-01T05:48:39.008Z sha 99d5369d35846f4a5282aa2ed7e387238339a705 :: blocked before merge. :: none
  • reviewed 2026-10-01T05:57:44.552Z sha 99d5369d35846f4a5282aa2ed7e387238339a705 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-02T06:22:20.523Z sha b5d32c8927c5e4a9029651bc51efc94de1c03013 :: blocked before merge. :: none
  • reviewed 2026-10-02T08:44:36.558Z sha b5d32c8927c5e4a9029651bc51efc94de1c03013 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-17T13:04:08.185Z sha 025b16d :: needs maintainer review before merge. :: none

Reviewed October 20, 2026, 5:47 AM ET / 09:47 UTC (Revision 10).

@jayzhou2309
jayzhou2309 force-pushed the fix/doctor-settle-historical-deferred branch from 1be4d9a to 7d835e5 Compare September 28, 2026 21:08
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 28, 2026
@jayzhou2309
jayzhou2309 force-pushed the fix/doctor-settle-historical-deferred branch from 7d835e5 to 99d5369 Compare October 1, 2026 05:41
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. label Oct 1, 2026
@jayzhou2309
jayzhou2309 force-pushed the fix/doctor-settle-historical-deferred branch from 99d5369 to b5d32c8 Compare October 2, 2026 06:15
@jayzhou2309
jayzhou2309 force-pushed the fix/doctor-settle-historical-deferred branch from b5d32c8 to 025b16d Compare October 17, 2026 12:43
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 17, 2026
@clawsweeper clawsweeper Bot added the rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. label Oct 17, 2026
Integrate tested main 37e60af for the historical-header contract exercised by CI 39397926202. Preserve the contributor repair and all protected-original assertions.

Co-authored-by: RomneyDa <[email protected]>
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

Current head: 94fc59b. Named CI fixture failure repaired without weakening historical-refusal or protected-original assertions. Pinned Bun and Node each pass all 13 affected cases. The 809 core-type diagnostics independently match the executed main baseline exactly; no rerun, suppression or green-CI claim. Body and proof are current; earlier CLI/updater scope remains explicit.

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

steipete added a commit that referenced this pull request Oct 20, 2026
…one (#178779)

Fixes #167385. A hand-deleted sessions-delete archive made retained-source settlement fatal forever. Historical recovery warnings are now kept as warnings with an unavailable-history outcome, and verified plugin repair completes; surviving originals and deleted-session state stay protected. Supersedes #160703, thanks @jayzhou2309.

Co-authored-by: Jay Zhou <[email protected]>
@steipete

Copy link
Copy Markdown
Contributor

Thank you @jayzhou2309! We re-implemented this fix in #178779. It landed with you credited as co-author. Closing this one as superseded.

@steipete steipete closed this Oct 20, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 21, 2026
…one (openclaw#178779)

Fixes openclaw#167385. A hand-deleted sessions-delete archive made retained-source settlement fatal forever. Historical recovery warnings are now kept as warnings with an unavailable-history outcome, and verified plugin repair completes; surviving originals and deleted-session state stay protected. Supersedes openclaw#160703, thanks @jayzhou2309.

Co-authored-by: Jay Zhou <[email protected]>
RomneyDa added a commit that referenced this pull request Oct 22, 2026
…one (#178779)

Fixes #167385. A hand-deleted sessions-delete archive made retained-source settlement fatal forever. Historical recovery warnings are now kept as warnings with an unavailable-history outcome, and verified plugin repair completes; surviving originals and deleted-session state stay protected. Supersedes #160703, thanks @jayzhou2309.

Co-authored-by: Jay Zhou <[email protected]>
(cherry picked from commit 73f2bf2)
Co-authored-by: RomneyDa <[email protected]>
RomneyDa added a commit that referenced this pull request Oct 27, 2026
…one (#178779)

Fixes #167385. A hand-deleted sessions-delete archive made retained-source settlement fatal forever. Historical recovery warnings are now kept as warnings with an unavailable-history outcome, and verified plugin repair completes; surviving originals and deleted-session state stay protected. Supersedes #160703, thanks @jayzhou2309.

Co-authored-by: Jay Zhou <[email protected]>
(cherry picked from commit 73f2bf2)
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 8b28b58)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor 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.

Session SQLite migration recovery report (session-sqlite-1789884963743-ce317201)

3 participants