Repository navigation
fix(doctor): warn about network-backed SQLite storage - #178672
Conversation
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR warns when Doctor finds SQLite paths on confirmed network storage and recommends backing up and moving them to local storage. Example: SQLite state is stored at /mnt/nas/openclaw/state/openclaw.sqlite on NFS.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR adds a useful Doctor diagnostic that current main lacks, and review found no actionable introduced defect. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherDoctor inventories physical database stores, passes eligible SQLite paths to the existing filesystem owner, and renders confirmed network-storage findings in text and JSON. flowchart TD
A[Doctor CLI] --> B[Database store inventory]
B --> C[Eligible SQLite paths]
C --> D[Filesystem classification]
D --> E[Advisory findings]
E --> F[Text and JSON output]
Technical reviewBest possible solution: Use the existing filesystem owner to explain confirmed network storage through Doctor’s existing inventory while preserving connection policy. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the missing Doctor explanation, and the PR reports a matching base-failing regression; no live NAS reproduction was supplied or run during this read-only review. Is this the best way to solve the issue? The implementation is appropriately scoped: it separates positive network classification from conservative rollback policy and reuses the existing Doctor inventory without introducing another journaling owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1c4b27072712. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +61, Tests +149, Docs +1. Total +211 across 4 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 20, 2026, 3:14 PM ET / 19:14 UTC. |
Fixes the mock-exports ratchet failure introduced by #178672.
Fixes #177288. Docker and Kubernetes docs now explain that OpenClaw state must live on a local volume (not NFS/SMB; Doctor warns, #178672), that a single replica with stop-first rollouts is required, and how upgrade/Doctor ownership works, including Kubernetes entrypoint bypass. Supersedes #177367, thanks @akshitkhokhani. Co-authored-by: Akshit Khokhani <[email protected]>
Fixes the mock-exports ratchet failure introduced by #178672.
…aw#178672) Fixes openclaw#177286. Doctor now emits an advisory warning when the state directory's SQLite databases are on confirmed network-backed storage (NFS/SMB/NAS), explaining the WAL risk and the existing rollback-journal protection. Warning-only: never blocks Doctor or updates; detection failure stays silent.
Fixes the mock-exports ratchet failure introduced by openclaw#178672.
…aw#178794) Fixes openclaw#177288. Docker and Kubernetes docs now explain that OpenClaw state must live on a local volume (not NFS/SMB; Doctor warns, openclaw#178672), that a single replica with stop-first rollouts is required, and how upgrade/Doctor ownership works, including Kubernetes entrypoint bypass. Supersedes openclaw#177367, thanks @akshitkhokhani. Co-authored-by: Akshit Khokhani <[email protected]>
Fixes #177286
What Problem This Solves
Doctor does not explain when SQLite state is on a confirmed network filesystem, even though the connection owner already applies a safer journaling policy.
User Impact
Doctor now warns about WAL corruption risk and explains the existing rollback-journal protection on supported network storage. It recommends backing up and moving state to local storage. The finding is advisory; journaling, migrations, and update continuation retain their existing behavior.
Why This Change Was Made
The existing filesystem owner supplies positive network classification to Doctor's existing database inventory. Confirmed NFS/SMB/SSHFS and Windows network paths are distinguished from unknown and cross-VM storage. Configured SQLite paths remain eligible when database inspection fails; known PostgreSQL stores are excluded. Mount metadata is read once per pass, and failed advisory probes remain unknown.
The change adds 61 net production lines, 149 test lines, and one docs line. The production growth supplies the batch classifier and warning without adding configuration, persistent state, or a competing journaling policy.
Evidence
tsgo, focused core oxlint, oxfmt on all four files, MDX validation,git diff --check, and madge (zero cycles) passed. The fullcheck:changedSQLite inventory was skipped under the campaign's local gate budget; PR CI supplies broad proof.createBuiltRuntime/runBuiltRuntimeprocess harness, a verified current generation, a private package, and fresh isolated HOME/state.doctor --lint --only core/doctor/database-engine --jsonexited 0, reportedok: true/checksRun: 1, inventoried the actual SQLite store, and emitted no network warning on local storage. Artifact/source verification passed before and after. The fixture was reduced from a full runtime copy (39.7 s test time) to copying only the plugin artifacts that require physical package containment (18.0 s test time; CLI 11.5 s).