Repository navigation
fix(update): stop status reads from creating SQLite sidecars - #138917
fuller-stack-dev merged 2 commits into
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. |
|
Retained before/after evidence for public head
The archive preserves the author's original completed-cold classifier exit1 and its separate scratch disposition. Shared coordinator-parent movement remains unattributed. It includes no databases, credentials or agent transcript. Archive SHA-256: The public two-file patch remains Exact-head CI33949402780 completed successfully. The native review artifacts remain NEEDS WORK pending the bounded Linux CLI/WAL run and completed bot/native landing gates. No Windows, power-loss, writer-extinction, live Gateway, package activation or crash-recovery claim. |
|
Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 11:20 PM ET / September 6, 2026, 03:20 UTC. ClawSweeper reviewWhat this changesUpdate status and history queries use the existing SQLite reader that preserves inspected database files, with regression coverage for committed history and transaction isolation. Merge readiness✅ Ready for maintainer review The fix remains necessary: current main and the latest release still use the ordinary SQLite reader. No introduced correctness defect was found, and the supplied Linux CLI evidence resolves the previous review’s specific proof follow-up. Priority: P2 Review scores
Verification
How this fits togetherThe update ledger stores durable update progress and results in OpenClaw’s shared SQLite database. CLI status and Gateway history requests read those records to report active and completed updates. flowchart TD
A[CLI status or Gateway history request] --> B[Update history reader]
B --> C{Idle cached database available?}
C -->|Yes| D[Reuse existing handle]
C -->|No| E[Prepare private database snapshot]
F[Shared database and committed WAL] --> E
D --> G[Return update records]
E --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource 0, Tests +137. Total +137 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep history reads on the existing artifact-preserving owner while retaining committed-WAL visibility, cached writer reuse, and unchanged durable records. Do we have a high-confidence way to reproduce the issue? Yes: cold update-status reads reach the ordinary SQLite reader on current main, and the supplied unmodified-CLI evidence records WAL/SHM creation. This review inspected the path without executing it. Is this the best way to solve the issue? Yes: selecting the existing artifact-preserving reader at the history owner is a focused repair that avoids duplicating snapshot logic or changing storage contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6c33a2f3b9b2. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Linux CLI/WAL evidenceThe declared Linux check has now run. Crabbox run run_751198025005 executed source base The prewritten sequence passed:
Manifest and checksums include raw retained-WAL output, the unchanged contract, independent behavior report, its admission supplement and the separately labeled source-aware qualification. All10 uploaded files and the manifest were downloaded and hash-verified from this maintainer session. Links expire September13; this does not claim the earlier reviewer DNS limitation was independently resolved in that reviewer environment. The independent reader passed the behavior cases but retained missing standalone pre-setup records. Its original and additive reports remain unchanged. The source-aware qualification checks the executed trusted bootstrap/account/caller against captured records; it does not invent missing records or convert the independent overall status to green. Sampled coordinator leaves are not writer-extinction proof, and watcher events can coalesce. Exact native and lease cleanup completed. Current-main integration preserves #138737 notice and terminal-step behavior. The same two-file repair is undergoing its affected current-cache/native checks before signed publication. Required CI and native preparation/merge must then pass on the actual new public head. The old |
|
@clawsweeper re-review Please review current head The signed integration preserves the prior head and current canonical source. It changes only the two reviewed History files relative to its canonical parent. The original failures and older proof identities remain disclosed. This requests review only, not autofix or automerge. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Merged via squash.
|
Related: #124396
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.
What Problem This Solves
Reading update status could create SQLite WAL/SHM files when the state database was cold. The command returned correct history but changed the inspected database family.
Why This Change Was Made
The history owner's get/list functions now use the existing artifact-preserving shared-state reader. Active-run discovery already delegates to list. This preserves committed-WAL visibility, cached-handle reuse and isolation from uncommitted writes without changing the schema, records, retention or recovery authority.
User Impact
CLI status and Gateway history queries preserve the inspected database family and parent metadata. Missing databases and optional history tables stay missing. Cold reads may use private temporary storage; this is not a promise of zero filesystem writes.
Evidence
cf127a39cb97ff5c3c2dfe8d4b37bc9dee9470e8reproduced cold WAL/SHM creation. No-action, rejected-input and absent-database controls stayed unchanged. Seven regression assertions failed before the fix, then all 21 owner/shared-reader tests passed.581c, authored tree8a183753acb4a5c1f6ced799bbfcaf9878a67765. Six CLI children exited naturally. Protected state stayed unchanged; only declared empty owned0700scratch was allowed. The author's original scratch-classifier failure is retained separately.69587bbb6bf8b115e77ceeaf63e6eaf69893b1fa, authored treebbf78916457e3686df2df07e461d931509fd2604. The target-native build and CLI ran on Linux x64, Node 24.19.0. Status returned all 17 expected history fields; the main-only discriminator had no history. Protected state and schema stayed unchanged, and the exact lease was released.80a898, tree7bd, passed 29 History/shared-reader/cache tests. The historical structural failure remains recorded: services had 721 roots against the 720 limit, also reproduced on unmodified8bb. All 14 remaining native stages passed there. Canonical5b099corrected the routing. On final public5f79151e, the native graph guard, core types and both affected infra/services type graphs passed with unchanged source and dependencies.The history-preserving, GitHub-signed head is
5f79151e76617147abbd2636955d6a66cc459526, with parents3253f18df01790c3b3461867d6929451890aef21and6b3d88538e8fec95efb24a27e0df262b0d9a235f. Complete treea75365014981b46fe5ecb447bb28b6bd0712a608matches canonical6b3plus exactly the reviewed two History blobs. Native preparation and merge remain required.Evidence retains its original source/build identities. Relevant source-impact checks carry unchanged behavior proof forward; older binaries are not relabeled as the final head. Existing notice retention and step settlement from #138737 remain intact.
This PR does not claim live Gateway, Windows, power-loss, package activation, writer extinction or durable crash recovery.