mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-03 09:39:25 +00:00
Closes #160689
## What Problem This Solves
Fixes: `openclaw doctor --session-sqlite inspect` keeps reporting `plugin_migration_source_retained` after deferred plugin migrations complete, and repeated `openclaw doctor --fix` never clears it, when the import receipt includes unindexed session history with `.trajectory-path.json` pointer sidecars.
## User Impact
User impact: after upgrading with deferred plugin migrations (for example Codex or Brave), `doctor --fix` archives each unindexed transcript together with its trajectory pointer, and installs already left with stranded pointers get them archived on the next `doctor --fix`, so the warning clears.
## Why This Change Was Made
A deferred import receipt captures each discovered transcript together with its trajectory and pointer sidecar. When the plugin later completes, settlement no longer rediscovers that history, so its transcripts are moved by the unreferenced-JSONL sweep, which moved only `.jsonl` files. The pointer (a `.json` file) stayed live. The retained check fires while any receipt source is live, so the warning never cleared.
Doctor's archive sweep now moves a transcript's pointer sidecar with it. For installs an earlier release already left in that state, the same sweep also archives a receipt-captured pointer whose receipt-verified transcript is no longer live. Both paths use the existing archive move: identity and byte checks, a migration-manifest entry, and `doctor --session-sqlite restore` recovery. Nothing is deleted. Pointers still referenced by a live index, retained for another owner, in conflict with the receipt, or (during settlement) outside the receipt are left alone.
Update behavior: no schema, receipt or stored-field changes. The installed updater runs first, unchanged. The candidate's Doctor keys on the deferred-plugin session receipt and migration manifests that 2026.9.5/2026.9.6 already write, so the first `doctor --fix` after updating repairs existing stranded installs. Agent/state DB `user_version` and schema are identical to `main` after the same migration.
Related: introduced when deferred-import settlement began archiving receipt-captured unindexed history (#150015, first shipped in 2026.9.5).
No overlap with Pash/Sarah changes.
Thanks @spikewillcocks for the detailed report and receipt analysis.
## Evidence
Real CLI, isolated `--profile p160689base` / `p160689cand` with task-owned `OPENCLAW_HOME`, `OPENCLAW_STATE_DIR` and `OPENCLAW_CONFIG_PATH`; every Doctor run first printed the resolved state dir, config path and session DB path from the same binary. State: a file-era `sessions.json` (1 indexed session) plus 3 unindexed transcripts, each with `.trajectory.jsonl` and `.trajectory-path.json` (pointer format from v2026.9.5), plus unrelated `notes.txt` and `custom-settings.json`. The **published 2026.9.5** package ran `doctor --fix` with `brave` configured but its package unreachable, which deferred the migration and wrote the import receipt. The source checkout then completed the `brave` migration, as in the report.
- **Base** (`origin/main`
|
||
|---|---|---|
| .. | ||
| .generated | ||
| .i18n | ||
| announcements | ||
| assets | ||
| automation | ||
| channels | ||
| ci | ||
| cli | ||
| concepts | ||
| diagnostics | ||
| gateway | ||
| help | ||
| images | ||
| install | ||
| maturity | ||
| nodes | ||
| platforms | ||
| plugins | ||
| providers | ||
| reference | ||
| releases | ||
| security | ||
| snippets/plugin-publish | ||
| specs | ||
| start | ||
| tools | ||
| web | ||
| agent-runtime-architecture.md | ||
| AGENTS.md | ||
| auth-credential-semantics.md | ||
| ci.md | ||
| date-time.md | ||
| docs.json | ||
| docs_map.md | ||
| index.md | ||
| logging.md | ||
| network.md | ||
| openclaw-agent-runtime.md | ||
| prose.md | ||
| vps.md | ||
| whatsapp-openclaw.jpg | ||