Repository navigation
fix: finish healthy Git updates after an older verifier exits - #204344
Conversation
Co-authored-by: daniel-lxs <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 8acc9541-80fa-4863-95d2-bcb5a173b70c
|
🦞👀 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: passed. What this changesThe serving Gateway disarms its healthy legacy Git trial and recovers the original update record after the older updater exits. Example: A schema-40 Git updater starts a healthy schema-41 Gateway, then cannot record verification.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep open: this PR addresses a distinct legacy update-completion bug still present on main; no definite introduced correctness defect was found. Reviewed head: Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe update subsystem connects native service delegation, Gateway readiness, launcher trial files, and the SQLite update ledger to establish which release is serving and record its outcome. flowchart TD
A[Older Git updater] --> B[Admitted candidate service command]
B --> C[Publication receipt in update ledger]
D[Serving Gateway] --> E[Core readiness and selected release check]
E --> F[Remove matching legacy trial]
F --> G[Existing history worker]
C --> G
G --> H[Recover original update outcome]
Technical reviewBest possible solution: Keep legacy trial retirement independent of history writes while the existing worker recovers only the uniquely correlated interrupted run. Do we have a high-confidence way to reproduce the issue? The linked report supplies exact schema-40 and schema-41 revisions and a failure trace, while current-main source confirms the missing legacy settlement path; this read-only review ran no product code. Is this the best way to solve the issue? The patch uses the existing installation observer and history worker, preserves modern plugin-completion ordering, and documents the accepted loss of pending history recovery across a Gateway restart. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e9f9556bca5f. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +461, Tests +774, Docs +20, Other +1. Total +1256 across 29 files. Added test files: 3. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. 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 HistoryReview history (6 earlier review cycles)
Reviewed November 26, 2026, 11:15 PM ET / November 27, 2026, 04:15 UTC (Revision 7). |
Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 49c61e86-c537-4e79-aee7-5ec1697241e6
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 4412d74c-4e28-4ea4-9970-19585760d1c2
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 09387aef-9eb5-4de5-8449-f26f13e152ad
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: f13492d4-17d5-46bb-977d-e20dfeb93095
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 8af6ec7f-fc62-43d3-9f49-bc915e886edd
3a91459 to
818bf4e
Compare
Co-authored-by: daniel-lxs <[email protected]>
818bf4e to
740c3ab
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: ca047ece-dfd4-4ecb-b61c-389f8966e60a
Co-authored-by: daniel-lxs <[email protected]>
Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 015206d4-5d36-4a42-85e0-7ebb7311c626
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Real-update proof on a fresh Ubuntu 24.04 arm64 VM (16 GiB): This verifies those two upgrade paths, not the separate format-1/schema-40 recovery and subsequent-start proof. |
Closes #204145
What Problem This Solves
A Git install with the format-1 launcher can start a healthy new Gateway and migrate its database, then have the older updater fail because its verifier cannot read the newer schema. That verifier can remove the trial before its history write fails, leaving the original update abandoned and status recommending repair.
User Impact
The serving Gateway retains the matching publication before listening, rechecks the selected running build at core readiness, and recovers the original run after the old updater exits, even if the trial file is already gone. Temporary canary boots leave the real trial armed. History errors do not block an authorized install or restart, or keep a healthy release eligible for rollback.
Why This Change Was Made
I keep trial removal independent of history recovery and use the existing installation observer and history worker. A retained publication fingerprint links recovery to one original run. Captured evidence alone grants no authority: selected-root/build checks and the worker's driver, active-run, recovery and acknowledgment checks still apply. Replaced or invalid trials are rejected.
Recovery retries while this Gateway serves. If it restarts before recovery completes, the original history can remain unchanged even though the healthy release stays selected.
Evidence
26388beb83edd70e0e25aad01a46baba33514af8, with main407f889190cff3b147bb7ebc922e5817e47edf34merged. This includes the landed 9.37 Git-update lease fix3909540; its eight files match that main revision.src/gateway/server-startup-legacy-completion.test.tsexercises a healthy schema-40 verifier removing the trial before refusing history. The original run succeeds with the matching build, the trial stays absent, status does not recommend repair, and no repair run is created. Its pre-fix run on740c3abrecordedfailed / abandonedwith empty outcome fields.pr-simplify, 89 unique focused tests passed across nine files, with one existing case-insensitive-volume test skipped. The initial run exposed the status-summary API removed by main; after migrating the test to the current summary API, the full startup regression passed. The other eight files' production inputs were unchanged.Verification
I received real-update proof from @daniel-lxs on a fresh Ubuntu 24.04 arm64 VM (16 GiB): Git updates from v2026.9.37 and v2026.10.34 to
26388beusingopenclaw update --channel dev --yes --jsonboth exited 0 with statusokandlastRunsucceeded. After each update, the Gateway served26388be(2026.11.10), was ready, and returned RPC health true. The workspace hash, session, verified transcript and disabled 12-hour cron job were identical before and after. Doctor inspection exit 1 was advisory, matching main. The VM was deleted afterward.Contributor: @daniel-lxs
Work sessions
Linked for team reference; these sessions aren’t public.