You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit df905a6
Browse filesBrowse the repository at this point in the historyBrowse files
fix(sessions): preserve shared history across startup and repairs (#127241)
* fix(doctor): atomically repair session transcripts
* fix(sessions): keep runtime reads and repairs on SQLite owners
Resolve physical session databases once and carry that identity through startup, search, boards, maintenance, and Doctor. Remove automatic legacy JSON import from Gateway startup while preserving explicit Doctor upgrades.
Publish repaired legacy transcripts with strict atomic replacement and preserve the source when backup, write, or rename fails.
* fix(sessions): simplify startup ownership and diagnostics
* test(sessions): migrate legacy history through Doctor in CLI proof
---------
Co-authored-by: Amp <[email protected]>
Copy file name to clipboardExpand all lines: docs/cli/doctor.md
+50-34Lines changed: 50 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ Doctor has five postures:
34
34
| Repair |`openclaw doctor --fix`| Applies supported repairs, using prompts unless non-interactive repair is safe. |
35
35
| Lint |`openclaw doctor --lint [--json]`| Read-only findings with threshold-based exit codes for CI gates. |
36
36
| Shared SQLite maintenance |`openclaw doctor --state-sqlite compact`| Explicitly checkpoints, compacts, and verifies the canonical shared state DB. |
37
-
| Session SQLite migration |`openclaw doctor --session-sqlite <mode>`| Inspects, imports, validates, compacts, recovers, or restores session state. |
37
+
| Session SQLite tools |`openclaw doctor --session-sqlite <mode>`| Inspects or maintains SQLite sessions and explicitly imports legacy history. |
38
38
39
39
Use `openclaw doctor --json` when an operator or script wants the advisory Doctor report as JSON. It exits successfully after producing a report; inspect `ok` and `findings` for health state. Use explicit `openclaw doctor --lint --json` when CI should exit nonzero for findings at the selected severity threshold. Prefer `--fix` when a human operator wants Doctor to edit config or state.
40
40
@@ -96,8 +96,8 @@ openclaw channels status --probe
96
96
|`--lint`| Run modernized health checks in read-only mode and emit diagnostic findings. |
97
97
|`--post-upgrade`| Run post-upgrade plugin compatibility probes; findings go to stdout; exit code 1 if any error-level finding is present. |
98
98
|`--state-sqlite <mode>`| Run explicit shared state SQLite maintenance. The only mode is `compact`. |
99
-
|`--session-sqlite <mode>`| Run the targeted session SQLite migration mode: `inspect`, `dry-run`, `import`, `validate`, `compact`, `recover`, or `restore`.|
100
-
|`--session-sqlite-store <path>`| With `--session-sqlite`: select one legacy `sessions.json`store path. |
99
+
|`--session-sqlite <mode>`| Run targeted session SQLite maintenance or legacy import: `inspect`, `dry-run`, `import`, `validate`, `compact`, `recover`, or `restore`. |
100
+
|`--session-sqlite-store <path>`| With `--session-sqlite`: select a SQLite database or legacy `sessions.json`source, subject to the mode's selection rules below.|
101
101
|`--session-sqlite-agent <id>`| With `--session-sqlite`: select one configured agent. |
102
102
|`--session-sqlite-all-agents`| With `--session-sqlite`: select configured and discovered agent stores. |
103
103
|`--github-issue`| With `--session-sqlite recover`: prepare a sanitized openclaw/openclaw issue report; doctor creates it with `gh` after `--yes` or interactive confirmation. |
@@ -289,16 +289,19 @@ compatible backup or upgrade OpenClaw for a newer schema.
0 commit comments