Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 15, 2026, 9:56 AM ET / 13:56 UTC. ClawSweeper reviewWhat this changesThe PR routes CLI status, channel-status fallback, task summaries, restart state, node-host settings, and approval data through read-only shared-state access so status does not join the Gateway’s write lifecycle. Regression provenancePossible regression — probable (reproduction; reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep this PR open: its read-only ownership repair is valuable and has credible multi-process proof, but the prior P1 remains on the unchanged head—older supported state schemas can reach current-column task queries and make offline status fail. Priority: P1 Review scores
Verification
How this fits togetherOperator status commands aggregate configuration, task state, gateway diagnostics, and service metadata. They must inspect the shared SQLite database without performing the schema, WAL, or write-lifecycle work owned by the running Gateway. flowchart LR
A[Operator status command] --> B[Status overview]
B --> C[Read-only state access]
C --> D{Schema usable for read}
D -->|Current| E[Task and service snapshots]
D -->|Older schema| F[Doctor migration guidance]
E --> G[Status output]
F --> G
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +66, Tests +135. Total +201 across 18 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Reject stale shared-state schemas before task reads and return a clear non-writing Do we have a high-confidence way to reproduce the issue? Yes, by source: use an existing v5–v7 shared-state database offline and invoke a status mode that loads the task summary; the read-only helper permits it before the current-column task query runs. Is this the best way to solve the issue? No: the ownership boundary is the right layer, but it must also reject or diagnose older schemas without writing before it queries current task data. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3e471bd6e46a. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
The legacy-schema P1 does not reproduce with a canonical supported schema. I compared the complete I then created isolated databases from the exact historical schema files, set each database's
Each command returned the expected zero-valued task summary. SQLite prepares the full task query even with no rows, so a missing selected column would fail here. As a negative control, I removed The actionable P1 and its duplicate merge-risk items are therefore nonissues for valid v5-v7 databases. A general policy that blocks all lower @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Closes #124045
AI-assisted: Codex.
What Problem This Solves
Fixes an issue where operators running status commands while a gateway was active could cause the secondary CLI process to open the shared SQLite database writable and execute schema setup. This violated the gateway's write ownership, could block behind another writer, and preceded the physical database corruption reported in #124045.
Why This Change Was Made
Status inspection now reads persisted task, node-host, restart-sentinel, config-health, and exec-approval state through explicit read-only paths. It no longer initializes the process task registry or enters the schema-owning shared-state lifecycle. Runtime writers remain on their existing lifecycle, and the SQLite schema version does not change.
User Impact
openclaw status,status --json,status --all, andchannels status --probe --jsoncan inspect configured state without creating the shared database or joining its write lifecycle. JSON status can read committed task state while the gateway is running and another process holdsBEGIN IMMEDIATE.Evidence
state/openclaw.sqlitefrom an offline status command. With a live gateway and held writer transaction,status --jsonexited 1 withTask registry restore failed: database is locked.node scripts/run-vitest.mjs test/status-shared-state-readonly.e2e.test.ts: 5 tests passed. The harness exercises text, JSON, all, and channel-probe status modes, verifies the gateway stays alive under writer contention, and requiresPRAGMA integrity_check = ok.node scripts/check-changed.mjs: passed all selected core, core-test, root-test, and tooling lanes. Crabbox had no ready provider, so the repository wrapper completed its documented local fallback.git diff --checkand the final changed-lane dry run passed after rebasing ontoc9da900a961.-shmrecovery concern in the pre-existing shared read-only helper. A local crash reproduction succeeded by reconstructing-shm; failure requires a non-writable source directory. That generic hardening remains a separate follow-up because this issue concerns a live gateway, where the WAL sidecars already exist.