Repository navigation
Conversation
Label isolated database generation verification by its own phase and actual source paths, promote fixed SQLite concurrent-write causes to the public summary, and drop retry guidance from best-effort capture failures. The update warning now says it continues without the original-state capture and that pre-migration snapshots remain the database rollback point. Fixes #170332
|
🦞👀 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. What this changesThis PR reports accurate capture phases, source paths, and SQLite causes while explaining that the update continues without the optional original-state capture. Example: A running Gateway changes state/openclaw.sqlite during an update's original-state capture.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR repairs misleading update diagnostics still present on main; no actionable correctness or security defect was found. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe installed update CLI captures original state through isolated database workers, then turns capture failures into bounded warnings printed to stderr and recorded in update history. flowchart TD
A[Installed update CLI] --> B[Original state capture]
B --> C[Database backup and generation workers]
C --> D[Inspection diagnostics]
D --> E[Bounded CLI warning and history]
E --> F[Continue update]
Technical reviewBest possible solution: Use the existing diagnostic owners to explain optional-capture failure accurately while preserving continuation and required migration safeguards. Do we have a high-confidence way to reproduce the issue? The reported beta transcript and current-main warning, worker-phase, and redaction paths establish the diagnostic defect; no target code or tests were executed during this read-only review. Is this the best way to solve the issue? Changing diagnostic composition at its existing owners is preferable to rewriting error strings afterward, and the maintainer-authored decision preserves the established best-effort policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e4f463159d0a. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +34, Tests +116, Docs +6. Total +156 across 11 files. Added test files: 0. 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. 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 12, 2026, 7:49 PM ET / 23:49 UTC. |
|
Closing in favor of #170380 (DonnieFi), which now carries this fix on top of its branch. |
Closes #170332
What Problem This Solves
Fixes: when the pre-update original-state capture cannot seal (for example, the running Gateway writes during capture), the warning hid the cause behind
[redacted-diagnostic], named the wrong phase and path ("shared database discovery … scope: 1 source paths"), and told the operator to "retry the update" while the update continued and succeeded.User Impact
User impact: the warning now says the update continues without the original capture, that an active writer such as the running Gateway is an expected cause, and that database rollback uses the pre-migration snapshots taken after the Gateway stops. It names the step that failed ("database generation verification") and the database paths it checked. Capture stays best effort with no retry; update flow, exit codes, and rollback are unchanged.
Why This Change Was Made
Product decision: no bounded retry was added. A Gateway writing continuously would rarely seal a capture, and continuing is the documented contract.
Update behavior: the installed CLI composes this warning before staging, so the new text appears for updates driven from a release containing it.
Evidence
src/infra/update-candidate-state.schema.test.ts: a realdatabase-generationsworker with a preload that writes between its two reads reproduces the issue's exact message before the fix; after, it reports the right phase and paths. 9/9, 34s wall.src/cli/update-cli/update-command-fresh-preview.test.ts: fullupdateCommandwith the capture rejected; asserts the recorded and printed continue-warning. Failed before. 32/33, 218s wall. The one failure ("Doctor sees an already-current update's completed history after original-state capture") times out at 120s on this host with the change reverted as well.src/logging/diagnostic-support-redaction.test.ts: 57/57, 5s. Adjacentupdate-candidate-state.diagnostics.test.tsandupdate-database-backup.test.ts(23/23) pass.tsgo:core,tsgo:core:test, oxfmt,git diff --checkclean.