Repository navigation
fix(update): preserve successful results during concurrent SQLite writes - #152986
fuller-stack-dev merged 7 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. |
|
Codex review: needs maintainer review before merge. Reviewed September 19, 2026, 1:19 PM ET / 17:19 UTC (Revision 5). ClawSweeper reviewWhat this changesThe updater carries its verified saved outcome through cleanup so concurrent SQLite writes cannot turn successful completion into a reporting failure. Merge readiness✅ Ready for maintainer review This remains a useful fix absent from fetched main. No blocking introduced defect was found, and the captured evidence addresses the prior upgrade-qualification follow-up. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s updater records installation and Gateway verification results in SQLite. Its final reporting path converts those results into CLI output and a response to the installed updater. flowchart TD
A[Update and Gateway verification] --> B[Saved update outcome]
B --> C[Validate and capture completed record]
C --> D[Executor cleanup and release]
D --> E{Clean settlement and matching identity}
E -->|Yes| F[Publish saved success]
E -->|No| G[Existing failure and recovery reporting]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +327, Tests +537. Total +864 across 15 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep final reporting observational after executor release while preserving authoritative cleanup, recovery admission, and candidate-identity checks. Do we have a high-confidence way to reproduce the issue? Yes, at source level: complete verification, release the executor, then let concurrent SQLite writes prevent the final snapshot read. Current main still exposes this path; this review did not execute it. Is this the best way to solve the issue? Yes. Retaining a matching completed record inside the existing publication owner avoids weakening generic snapshot or recovery admission rules. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 24a03acf58c4. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
The corrected head npm scheduled maintenance runs from 17:00 to 19:00 UTC. A later availability-only request to the same endpoint still returned 503. I am retaining the failed gate and will rerun only that job after the service recovers; this is not dependency clearance or a gate waiver. |
|
Merged via squash.
|
…tes (openclaw#152986) * fix(update): preserve completed results during live state writes * refactor(update): separate terminal publication helpers * test(update): use the typed deferred helper
What Problem This Solves
Fixes successful updates reporting that verification failed and recovery remains pending when the Gateway keeps writing to SQLite during final result publication.
User Impact
A completed, verified update reports its matching saved outcome. Existing cleanup and recovery checks still apply. Incomplete readiness, conflicting identity, or retained recovery cannot qualify for this publication path.
Why This Change Was Made
The final report was reopening the state database through an artifact-preserving snapshot after the updater released ownership. Ordinary writes could prevent that snapshot from stabilizing even though the update had already succeeded. Keep the matching completed record inside the original updater's private publication chain and use it only after the executor settles cleanly. Future update admission and generic snapshot behavior remain strict.
Evidence
Updated-tree installed published
2026.9.3→ exactd785a32cf52d435913ec235fed324a4b3edbee84qualification passed all 47/47 phases, including the full package build, tarball integrity, exact candidate build identity, final Gateway readiness/status and clean source before/after. Summary, receipt, phase observations and manifest are GET/SHA256 verified. AWS execution and capture exited 0. The current931d43bfhead changes only the test fixture, with the production-byte bridge below. This cell uses synthetic existing state and a manual Gateway restart, with no live fleet or provider credentials. Concurrent-writer behavior is proven separately.The published
931d43bfcorrection replaces the test fixture's unsupportedPromise.withResolverswith the canonical typed deferred helper. Both ordering cases and scoped review pass; all assertions and production blobs are unchanged fromd785a32c. Test-only byte bridge and manifest are GET/checksum verified. The installed-driver cell remains explicitly pinned tod785a32c; exact corrected-head CI remains required.Current published revision is
931d43bf7674d21ca6d8f7a4f6e98be324428e92, with canonical82941a4a457eede1f969da384e754ee31ee13c3cintegrated append-only. A matched fresh canonical red video at7884d9a88f97f1ad87e768607df47c545ba13654still reports false pending recovery with a durable succeeded row. The green video and six independent cases ran atc2c2790a7e4709b09ff2d2ef588e8f6ddbe22de2; the source/hash bridge binds unchanged authored modules and exercised shared-state boundaries to the published revision. Current artifact manifest. Every artifact was downloaded and checked against its local SHA256.Relevant integration checks passed 135 cases: 58 terminal controls, 68 Doctor/post-core cases, one candidate-worker producer-contract case, seven worker-retirement cases and one pending-admission case. The independent busy fixtures varied from 64 to 80 MiB; wrong-target, settlement failure and missing-receipt inputs refused success. These checks do not replace the full installed-driver upgrade qualification. The historical
987a14eaqualification below remains valid for that historical tree; the updated-tree qualification now passes atd785a32cwith the test-only bridge; exact published-head CI remains required.Actual native executor and private 64/80 MiB SQLite WAL fixtures. Independent writes continue during capture and publication. The unchanged baseline reports false pending recovery; the candidate reports success while the durable row stays succeeded and no recovery record is created. Wrong-target, settlement-failure and missing-record cases retain their refusal behavior.
Baseline video, historical 987a14ea candidate video, and artifact manifest. The baseline is
e1b8056605a912d45ef3329b3a70a3de81c973ed; historical candidate is987a14ea312ad3c6be0ce4da0902738b9f533e0e. Videos show actual JSON/API output through a sanitized terminal projection. The baseline was not rerun for the final helper extraction.Six independent historical 987a14ea cases passed, including durable run/build correlation, writer activity at both boundaries, executor closure and lease release. Source provenance identifies the exact candidate and files.
58 affected tests and the actual candidate-worker completed-result case passed on the historical 987a14e extraction. Controls cover JSON/human output, cleanup/release failure, missing or conflicting identity, false readiness, pending reports, replaced state, malformed recovery, and reporting-state observation across asynchronous boundaries. The worker case receives the released producer's handoff shape against a newer schema; it is not a full installed-driver upgrade.
The line-cap, lint and formatting checks passed. Final extraction review found no remaining P0–P2 findings. The installed published-driver qualification below passed on the exact final candidate. Required hosted CI remains a landing gate.
Installed
[email protected]successfully updated retained synthetic operator, session, plugin and config state to exact candidate987a14ea312ad3c6be0ce4da0902738b9f533e0e. All 47 phases passed, with matching build identity and final gateway readiness/status. The canonical package build and tarball integrity checks passed, source remained clean, and execution plus complete evidence capture exited 0. This scenario uses manual gateway restart and no live provider credentials. Compatibility receipt, phase observations, artifact manifest. All six published files were downloaded and checksum-verified.The focused API fixture supplies synthetic verified history and does not start a real Gateway. Human-text output is covered by focused tests. The local type wrapper rejects borrowed compiler dependencies; required hosted CI supplies exact-lock type proof. An earlier combined local run crashed in Node's V8 collector; its failed result and subsequent controls are retained rather than counted as a pass.