Skip to content

fix: finish healthy Git updates after an older verifier exits - #204344

Merged
roboclaw-bot merged 17 commits into
mainfrom
openclaw/updater-204192-transcript-recreation
Nov 27, 2026
Merged

roboclaw-bot merged 17 commits into
mainfrom
openclaw/updater-204192-transcript-recreation

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • Candidate: 26388beb83edd70e0e25aad01a46baba33514af8, with main 407f889190cff3b147bb7ebc922e5817e47edf34 merged. This includes the landed 9.37 Git-update lease fix 3909540; its eight files match that main revision.
  • The regression in src/gateway/server-startup-legacy-completion.test.ts exercises 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 on 740c3ab recorded failed / abandoned with empty outcome fields.
  • The test uses real Gateway startup and HTTP readiness, real trial removal, migrated SQLite state, native child-process exit and the byte-identical d44 schema-admission function. It is not a full installed legacy-updater run.
  • After 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.
  • Format, lint and six type graphs passed. Unchanged-input import-cycle, Kysely, identity, database-worker and test-budget checks passed. AutoReview returned P0-only scoped-clean, not a broader-priority or hosted ClawSweeper verdict.
  • The conflict resolution preserves main's required-plugin completion ordering and this change's independent legacy recovery. Shared Doctor inspection code replaces duplication.
  • CI run 45922581201 started on this exact head.
  • Not independently rechecked for this body update: hosted CI outcome.

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 26388be using openclaw update --channel dev --yes --json both exited 0 with status ok and lastRun succeeded. After each update, the Gateway served 26388be (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.

roboclaw-bot and others added 3 commits November 24, 2026 02:38
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
@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime cli CLI command changes size: M labels Nov 24, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 24, 2026
@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

The 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.

  • Before: The original run becomes abandoned, and its trial can remain eligible for rollback.
  • After: Core readiness removes the matching trial, and the Gateway records the correlated run as succeeded after the updater exits.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The implementation has focused regression coverage and no definite code finding, but required installed proof of the changed legacy path remains missing.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A healthy Git update can remain marked abandoned and retain a rollback trial after its older verifier refuses the migrated database.
Reason: The observed development-install failure has concrete recovery and data-preservation value, and this maintainer-authored PR explicitly chooses that repair.

Regression provenance

Possible 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: 26388beb83edd70e0e25aad01a46baba33514af8

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Provide redacted installed-update output from an affected format-1/schema-40 checkout to this head, showing native delegation, original-run recovery after verifier exit, trial removal, and subsequent starts preserving the selected build and seeded data.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Legacy Gateway trial settlement changes intended behavior with a stated reason (be5f7fa: The resident-launcher cutover deliberately excluded main-only format-1 trials because no released updater wrote them.)
  • Interrupted-update history settlement keeps the original intent (2b12538: Recover interrupted managed updates through bounded observation and guarded worker writes without treating uncertain cleanup as success.)
  • Modern plugin completion and advisory inspections keeps the original intent (ed8b883: Settle modern updates after required plugin maintenance so the final summary includes its outcome.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +461, Tests +774, Docs +20, Other +1. Total +1256 across 29 files. Added test files: 3.

View PR surface stats
Area Files Added Removed Net
Source 18 555 94 +461
Tests 9 779 5 +774
Docs 1 20 0 +20
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 0 +1
Total 29 1355 99 +1256

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (6 earlier review cycles)
  • reviewed 2026-11-24T03:00:23.964Z sha 5a397e8 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-24T10:57:08.491Z sha 6b5039e :: blocked before merge. :: [P2] Continue replacement detection when trial settlement fails
  • reviewed 2026-11-24T11:54:39.306Z sha f8ceaf3 :: blocked before merge. :: none
  • reviewed 2026-11-24T13:27:40.050Z sha f8ceaf3 :: blocked before merge. :: none
  • reviewed 2026-11-24T16:17:49.199Z sha f9a99a7 :: blocked before merge. :: none
  • reviewed 2026-11-26T14:45:04.264Z sha 740c3ab :: blocked before merge. :: none

Reviewed November 26, 2026, 11:15 PM ET / November 27, 2026, 04:15 UTC (Revision 7).

roboclaw-bot and others added 2 commits November 24, 2026 03:29
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
roboclaw-bot and others added 3 commits November 24, 2026 06:16
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
@roboclaw-bot roboclaw-bot changed the title fix: stop status checks from rolling back healthy legacy Git installs fix: finish healthy Git updates after an older verifier exits Nov 24, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 24, 2026 09:09
Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 8af6ec7f-fc62-43d3-9f49-bc915e886edd
@daniel-lxs
daniel-lxs force-pushed the openclaw/updater-204192-transcript-recreation branch from 818bf4e to 740c3ab Compare November 26, 2026 14:00
@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. labels Nov 26, 2026
roboclaw-bot and others added 2 commits November 26, 2026 15:58
Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: ca047ece-dfd4-4ecb-b61c-389f8966e60a
@clawsweeper clawsweeper Bot removed the rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. label Nov 26, 2026
roboclaw-bot and others added 2 commits November 27, 2026 01:11
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
@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 27, 2026
@roboclaw-bot
roboclaw-bot merged commit 6d86389 into main Nov 27, 2026
281 of 283 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/updater-204192-transcript-recreation branch November 27, 2026 04:22
@daniel-lxs

Copy link
Copy Markdown
Member

Real-update proof on a fresh Ubuntu 24.04 arm64 VM (16 GiB): openclaw update --channel dev --yes --json Git updates from v2026.9.37 and v2026.10.34 to 26388beb83edd70e0e25aad01a46baba33514af8 both exited 0 with status ok and lastRun succeeded. After each update, the Gateway served 26388be (2026.11.10), was ready with RPC health true, and 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.

This verifies those two upgrade paths, not the separate format-1/schema-40 recovery and subsequent-start proof.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docs Improvements or additions to documentation gateway Gateway runtime P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Git updater reports a healthy schema-41 Gateway as abandoned and leaves its rollback trial armed

2 participants