Skip to content

fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update - #206341

Merged
fuller-stack-dev merged 11 commits into
openclaw:mainfrom
fuller-stack-dev:fix/update-snapshot-checkout-preflight-refusal
Nov 27, 2026
Merged

fuller-stack-dev merged 11 commits into
openclaw:mainfrom
fuller-stack-dev:fix/update-snapshot-checkout-preflight-refusal

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Related: #204775, #205995, #204275

What Problem This Solves

Git checkouts that tracked main between 2026-11-17 and 2026-11-19 (for example a checkout at 8f80fe08cad) still run the updater built then. Since #205995 removed the early-release check, their openclaw update to current main fails after about 8 minutes with "Agent database migration did not finish". It leaves the release link on a release that never started, prints no way out, and the second openclaw update reports a false "already-current". The old Gateway keeps serving, but the install can no longer update.

User Impact

Those checkouts now stop cleanly before anything switches, every time, with the reason and one line to run from the checkout:

OpenClaw 2026.11.10 migrates your databases (state schema 40 to 42, agent schema 42 to 45).
The updater in this checkout (a main build from 2026-11-17 to 2026-11-19) cannot finish that: after the migration, neither it nor the checkout's `openclaw` command can open the migrated data.
The update stopped before switching releases; the Gateway was not touched. Running `openclaw update` again stops here the same way.
Rebuild the checkout once from its directory. It also removes this updater's release link, so the reinstalled Gateway runs the rebuilt checkout; later updates then run normally:
oc_link= && git pull --ff-only && openclaw gateway stop --force && pnpm install --frozen-lockfile && pnpm build && oc_link=$(readlink "$HOME/.openclaw/git-install/lib/node_modules/openclaw" || true) && rm -f "$HOME/.openclaw/git-install/lib/node_modules/openclaw" && openclaw gateway install --force || { [ -z "$oc_link" ] || [ -L "$HOME/.openclaw/git-install/lib/node_modules/openclaw" ] || ln -s "$oc_link" "$HOME/.openclaw/git-install/lib/node_modules/openclaw"; openclaw gateway start; false; }
  • The Gateway keeps serving through both refused attempts. The release link and the checkout stay as they were (the first run's own conversion creates a link to a release of the commit that already serves, before the check).
  • The rebuild has the Gateway down while the checkout builds (about 5 minutes in the macOS cell). The rebuilt Gateway migrates state at boot, and the next plain openclaw update completes normally.
  • If a step of the line fails, it puts the link back if it had removed it, starts the previous service again and exits non-zero. Running it again finishes a rebuild that stopped part way.
  • Nothing recovers automatically. The docs no longer claim an automatic systemd or launchd recovery.
  • Every other install is unaffected: current Git layouts, npm and pnpm installs, and same-schema updates through the old updater (proven by the control cell below).

Why This Change Was Made

This follows the update-path owner's decision on #204775: restore the narrow guard only, not the recovery runner.

Root cause. The installed updater (8f80fe08cad) cannot be patched. It builds the target at <stateDir>/git-install/releases/<id>/build, switches the link git-install/lib/node_modules/openclaw, then runs its own schema inspection, which requires the migrated schema before the restart that would migrate it (src/cli/update-cli/update-command-migrated.ts at 8f80fe08cad). After that failure the link names the target release, so its next run compares the target's tree with itself and reports already-current (src/infra/update-runner-git-release.ts at 8f80fe08cad, the builtTree === runningTree check). #205995 removed the target-side check that stopped this.

Update behavior. The stranded checkout's own updater runs first. It reaches this release's code through checkUpdateCandidate (src/infra/update-candidate-check.ts at 8f80fe08cad), which runs this release's update-migrated-finalize.worker --check from the build directory before the link moves. That is where the refusal sits. A non-zero --check aborts the whole update; the old updater prints the check's stderr with state and home paths redacted.

What is restored, from #205995's deletion.

  • src/infra/update-candidate-check-early-release.ts: the layout test and the schema reads, trimmed to the refusal. The systemd starter, runner, readiness loop and ledger/lock helper (update-early-release-recovery*.ts) are not restored.
  • The --check hook in src/infra/update-migrated-finalize.worker.ts (nine lines).
  • src/infra/update-candidate-check-early-release.test.ts and one case in src/infra/update-migrated-finalize.worker.test.ts.

Identification is positive. The guard acts only when this release runs from releases/<id>/build under this state directory's git-install while git-install/lib/node_modules/openclaw is a symlink, the layout only that updater builds. It refuses only when the on-disk state or agent schema is older than this release's. Current state, newer state, unreadable state and PostgreSQL-backed stores pass through. For every other caller the cost is a few path lookups.

The printed line differs from the one #204275 proved. A first green run on this branch printed the old line. On current main, openclaw gateway install --force binds the service to the early updater's launcher while the early link exists (src/daemon/program-args.ts), so the rebuilt Gateway never started. The service kept serving the 8f80 release, and the next openclaw update went through that Gateway's old updater and was refused again. The line now removes the link after the build and restores it on failure. It is spelled from $HOME because the old updater replaces the literal state and home paths in the check's output. A state directory outside $HOME makes the line require OPENCLAW_STATE_DIR before it changes anything. Linux needs no different wording: the same program-args code chooses the service entry there. On Windows the steps are printed one per line (not proven).

Expiry is on evidence. The code comment and the docs say to remove the guard on evidence that the updaters it identifies can cross this hop, not on a date or release. A published release does not replace the updater these checkouts run.

Evidence

macOS cells: a clone of a Tart macOS 27.2 VM, a checkout at 8f80fe08cad built and linked onto PATH, a launchd Gateway from openclaw gateway install --force, a 555 MB agent database under 1 MiB/s of writes, and a /readyz probe every second. The target is set by moving the local upstream main. Driver: installed updater 8f80fe08cad in every cell.

Recordings (replays of each cell's raw output, not edited):

RED, unmodified main c44c610d326:

red-base-c44c610d326.mp4

GREEN, this head 6c42ba81a97:

green-head-6c42ba81a97.mp4
Cell Step Exit Wall Result
RED, main c44c610d326 openclaw update --yes 1 477 s "Agent database migration did not finish". Link moved to the never-started c44c610d3 release; checkout 8f80fe08cad; schema 40/42; Gateway serves 2026.11.4
openclaw update --yes again 0 180 s "skipped: already-current" (false); still 8f80fe08cad
readiness 797 of 797 probes ready; git-install 8.7 GiB plus 1.0 GiB of update captures
GREEN, head 6c42ba81a97 openclaw update --yes 1 519 s the refusal above; checkout 8f80fe08cad; schema 40/42; link names the 8f80fe08c release the old updater's conversion built; Gateway serves 2026.11.4
openclaw update --yes again 1 183 s the same text, byte for byte; no "already-current"; link, checkout and schema unchanged
readiness, first update until the rebuild 675 of 675 probes ready; git-install 4.4 GiB, no captures
the printed line, copied from the output 0 281 s not serving for 286 s (stop, install, build, reinstall); service entry ~/openclaw/dist/index.js; checkout 6c42ba81a97; schema 42/45; serves 2026.11.10 (6c42ba81a97)
next openclaw update --yes to a newer main commit 0 366 s updated; not serving for 11 s; serves 840c906; git-install 9.0 GiB
openclaw update --yes again 0 9 s "already up to date"
Same-schema control 8f80fe08cad to 6691acaed56 (state 40, agent 42) plus this check, a test-only build 0 430 s no refusal; updated to 2026.11.5; the next run is truly already current

The GREEN timings were measured while unrelated Docker cells ran on the same host; the pass/fail results do not depend on load. Earlier green runs on this branch (386e760b76d, f0f561ca250, ec351718999) gave the same refusal results. The first one found the service-entry problem above. The third found that the old updater redacts $ followed by 16 or more name characters as a Matrix event ID, which had turned the line's restore variable into <redacted-matrix-event>. The line now uses a short variable and ${OPENCLAW_STATE_DIR}, and a unit test runs the refusal through that same redaction (redactSupportString, unchanged since 8f80fe08cad).

Disk: the refused updates leave one 4.4 GiB release of the serving commit (the old updater's own conversion) and no captures. Red left 8.7 GiB plus 1.0 GiB.

Unit tests (node scripts/run-vitest.mjs, both files, 42 tests pass on the head):

  • update-candidate-check-early-release.test.ts uses real SQLite stores and real layouts:
    • the refusal and its platform lines, identical on a second call;
    • the $HOME-relative link, run through /bin/sh with a state directory named state "$x" \y` \z`, expands to the real link;
    • the printed line run through /bin/sh with stand-in git/pnpm/openclaw: outside $HOME with OPENCLAW_STATE_DIR unset it runs no step and keeps the link; a failed gateway install puts the link back and starts the previous service; with the variable set every step runs in order and the link is gone;
    • the refusal passed through the old updater's redaction (redactSupportString) comes back unchanged, for a state directory inside and outside $HOME;
    • an older agent store found by registry or only on disk, a linked state directory;
    • pass-through for current, newer, unreadable and PostgreSQL state, and for the current Git layout, the package layout, a missing link and a build directory elsewhere;
    • a rollback-journal store is read with locks, so a writer's commit is not skipped.
  • update-migrated-finalize.worker.test.ts: the real --check entry against a real state fixture, twice. It prints no contract, exits 1 and writes the same refusal both times.
  • Red on the base: the worker case fails on main (the contract JSON is printed). The shell-run case fails on this branch's earlier commits: on f0f561ca250 the outside-$HOME line stopped the Gateway before failing, and on 9954fcfe571 the link stayed removed after a failed install, and the redaction case fails on ec351718999.
  • Files audited in full: both test files. Nothing was removed. The worker file's existing cases are distinct and still needed; the restored test file dropped the recovery cases with the recovery code.

Checks on the head: pnpm tsgo:core, pnpm tsgo:core:test, oxlint and oxfmt on the touched files, the max-lines and env-var budget ratchet (after renaming the line's shell variable out of OPENCLAW_*), CI's checks-fast-baseline-ratchets, the session identity ratchet, test/scripts/update-restart-module-outcome.test.ts and test/scripts/eager-import-closure.test.ts, pnpm check:docs, git diff --check: pass.

Review. autoreview (Codex route, threshold P0 through P2, --max-priority P2) on the branch diff. Earlier rounds found two real defects in the printed line, both fixed with a shell-run test: the outside-$HOME guard ran after the Gateway was stopped, and a failed install left the link removed. The final round on this head's diff: scoped-clean, "No actionable P0–P2 defects".

Not proven: a Linux cell with the new line (the #204275 Linux cells proved the earlier line; the code that chooses the service entry is shared), Windows, a Gateway-started update (update.run) on this head, and a published npm install as a cell (the layout test excludes it; unit-tested).

RED raw: update1 and update2 (main c44c610)
update2.stdout:ℹ️ OpenClaw update skipped: already-current.
update2.stdout:Phases: requested (460ms) → staging (6ms) → validating (168.64s)
update2.stdout:Warning: Gateway service management skipped: the service belongs to a different OpenClaw installation and was left untouched.
update1.stdout:⚠️ OpenClaw update failed: openclaw doctor.
update1.stdout:Phases: requested (405ms) → staging (5ms) → validating (444s) → activating (10.66s)
update1.stdout:Failed: activating
update1.stdout:Failed: openclaw doctor — Exit code: 1; Agent database migration did not finish: ~/.openclaw/agents/main/agent/openclaw-agent.sqlite; expected schema
update1.stdout:Failed: gateway recovery verification — Exit code: 1; Expected Gateway version 2026.11.10; observed 2026.11.4.; Expected Gateway build 2026.11.10-c44c610d3262-2026-11-27T03-1
GREEN raw: update1 stderr (this head)
OpenClaw 2026.11.10 migrates your databases (state schema 40 to 42, agent schema 42 to 45).
The updater in this checkout (a main build from 2026-11-17 to 2026-11-19) cannot finish that: after the migration, neither it nor the checkout's `openclaw` command can open the migrated data.
The update stopped before switching releases; the Gateway was not touched. Running `openclaw update` again stops here the same way.
Rebuild the checkout once from its directory. It also removes this updater's release link, so the reinstalled Gateway runs the rebuilt checkout; later updates then run normally:
oc_link= && git pull --ff-only && openclaw gateway stop --force && pnpm install --frozen-lockfile && pnpm build && oc_link=$(readlink "$HOME/.openclaw/git-install/lib/node_modules/openclaw" || true) && rm -f "$HOME/.openclaw/git-install/lib/node_modules/openclaw" && openclaw gateway install --force || { [ -z "$oc_link" ] || [ -L "$HOME/.openclaw/git-install/lib/node_modules/openclaw" ] || ln -s "$oc_link" "$HOME/.openclaw/git-install/lib/node_modules/openclaw"; openclaw gateway start; false; }
⚠️ OpenClaw update failed: runtime-verification-failed.
Phases: requested (434ms) → staging (6ms) → validating (490.64s)
Failed: validating
Failed: candidate-recovery — Exit code: 1; The update could not load its recovery runtime (exit 1).

Leftover on hosts that ran this: the 4.4 GiB release the removed link named stays under git-install/releases; the docs give the removal steps.

…nnot finish

Restore the candidate --check refusal retired in openclaw#205995, without the
systemd recovery: identify the early release layout, refuse only when this
release would migrate state, and print the platform's one-time rebuild.
@clawsweeper

clawsweeper Bot commented Nov 27, 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 size: M labels Nov 27, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. impact:auth-provider Auth, provider routing, model choice, or SecretRef resolution may break. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. labels Nov 27, 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. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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 27, 2026
@clawsweeper

clawsweeper Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

Restores an early Git updater’s schema-change refusal and prints platform-specific rebuild instructions before the release selection changes.

Example: A checkout running updater 8f80fe0 attempts an update requiring state schema 40→41 and agent schema 42→43.

  • Before: The update fails after switching the release link, and another attempt incorrectly reports already-current.
  • After: The candidate check refuses the update before switching releases and prints the one-time checkout rebuild command.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The source change is coherent and narrowly scoped, but current-head behavioral validation remains unestablished.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An affected Git checkout cannot complete a schema-changing update and can falsely tell its operator that it is already current.
Reason: The maintainer-authored repair follows explicit collaborator approval and addresses an observed update failure with a bounded compatibility guard.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

Keep this draft open: it implements an explicitly approved repair for a reproduced legacy-updater failure, and source review found no definite introduced defect.

Reviewed head: 386e760b76da95ec002d65cfb20c21629964ae78

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Supply the approved macOS old-driver run showing unchanged selection and a ready Gateway after both refusals, successful rebuild and next update, unchanged same-schema and published-Git controls, a latest-stable upgrade preserving settings and data, and red-on-base/green-on-head regression results.
Agent review details

How this fits together

The installed updater invokes the new release’s finalize worker with --check; this guard inspects the historical release layout and database versions before returning either a refusal or the existing capability response.

flowchart TD
  A[Installed Git updater] --> B[Candidate finalize worker]
  B --> C[Historical layout check]
  C --> D[Read database versions]
  D --> E[Refusal and rebuild guidance]
  C --> F[Existing capability response]
  D --> F
Loading

Technical review

Best possible solution:

Keep the narrow candidate-side refusal and verified rebuild guidance within the existing finalizer, without restoring automatic recovery.

Do we have a high-confidence way to reproduce the issue?

The linked macOS report supplies a concrete old-driver failure trace, and current-main source confirms removal of the candidate-side refusal; this review did not execute the product.

Is this the best way to solve the issue?

The change uses the only candidate-side hook that can stop the installed driver before activation, reuses database-version readers, and follows the approved limited restoration.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against d877e8007fba.

Provenance checked

  • Early Git schema-change refusal keeps the original intent (fix: stop Git checkouts on 2026-11-17 main updaters from half-switching on a schema change #204275: Prevent historical installed drivers from switching to a release they cannot finish activating across a database schema change.)
  • Retirement of the historical guard changes intended behavior with a stated reason (b125529: Retire the temporary exception after the documented stable-release cutoff; the later collaborator decision explicitly reverses that cutoff for the narrow guard following a reproduced failure.)
  • Automatic-recovery documentation changes intended behavior with a stated reason (d015eff: Document systemd recovery that rebuilt affected checkouts automatically; that implementation was subsequently removed, so the revised guide describes the retained manual procedure.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Jason (Json): Raw commit 8b16765 adds docs/install/updating.md:2160 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 8b167650d702; files: docs/install/updating.md)
  • Ayaan Zaidi: Raw commit 2ef6f7b adds docs/install/updating.md:1853 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2ef6f7bade7c; files: docs/install/updating.md)
  • Peter Steinberger: Raw commit 7e75d49 adds src/infra/update-migrated-finalize.worker.ts:75 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7e75d4900ebe; files: src/infra/update-migrated-finalize.worker.ts)

PR surface

Source +198, Tests +224, Docs -44. Total +378 across 5 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 2 198 0 +198
Tests 2 224 0 +224
Docs 1 21 65 -44
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 443 65 +378

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 merge-risk: 🚨 compatibility: Affected historical Git drivers deliberately stop schema-changing updates and require a manual rebuild; this operator impact is explicitly accepted in the linked collaborator decision.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • merge-risk: 🚨 compatibility: Affected historical Git drivers deliberately stop schema-changing updates and require a manual rebuild; this operator impact is explicitly accepted in the linked collaborator decision.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Complete the acceptance proof identified in testingReview.missingE2e.

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.

Reviewed November 26, 2026, 11:00 PM ET / November 27, 2026, 04:00 UTC.

On current main, openclaw gateway install binds the service to the early
updater's launcher while its release link exists, so the rebuilt Gateway
never started. Remove the link after the build, spelled from $HOME so the
early updater's path redaction leaves it usable.
@fuller-stack-dev
fuller-stack-dev marked this pull request as ready for review November 27, 2026 06:23
…r's redaction

The early updater redacts $ followed by 16 or more name characters as a
Matrix event ID, which turned the line's restore variable into a
placeholder. Use a short variable and ${OPENCLAW_STATE_DIR}.
@fuller-stack-dev
fuller-stack-dev merged commit 6feeb50 into openclaw:main Nov 27, 2026
108 checks passed
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

@fuller-stack-dev
fuller-stack-dev deleted the fix/update-snapshot-checkout-preflight-refusal branch November 27, 2026 08:02
vincentkoc added a commit that referenced this pull request Nov 27, 2026
…restoration-ci-189390-20261127

* commit '6feeb50a3f14fbf0aa5167d342f186dc4d67fc18': (9846 commits)
  fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341)
  refactor(codex): centralize native completion delivery (#206447)
  fix(subagents): finish claimed stops after session rotation (#206405)
  fix: let owners fork a chat with exec after a subagent or exec completion (#206483)
  test(cli): gate agent --local cold-start processes and workers (#206466)
  perf(ci): skip baseline inventory when line-cap debt is empty (#189909)
  refactor(test): share core process-result fixtures (#174149)
  refactor(ci): reuse canonical budget flag parsing (#189480)
  fix: recover Codex chats after oversized requests (#206475)
  fix(agents): skip the bootstrap ritual in one-shot runs (#206477)
  fix(test): preserve stack coordinates in redacted failure reports (#152384)
  fix(gateway): return consistent unavailable response guidance (#191933)
  fix: preserve emphasis in Markdown table row labels (#205349)
  fix(nextcloud-talk): keep webhook spool helpers private (#206470)
  perf(plugins): overlay native receipts once per visible root (#206464)
  fix: keep GitHub comment approvals alive and skip repeat approval on the session PR (#206129)
  perf(config): retain one snapshot for unchanged validation results (#206465)
  refactor(test): reuse canonical secret fixture cleanup (#189492)
  refactor(subagents): own descendant Stop cancellation (#206444)
  refactor(subagents): keep announce cleanup action type private (#206407)
  ...
vincentkoc added a commit that referenced this pull request Nov 27, 2026
* commit 'fd681ab8786e062045fa5ec6261b1b06f60832eb': (2115 commits)
  fix: keep doctor --fix pending checks from creating SQLite sidecars (#206485)
  fix(ci): update iOS screenshot reducer gate (#206497)
  fix: keep chat photo previews sharp within their byte limits (#206461)
  fix: let agents use short Workboard card IDs
  fix(tui): run provider sign-in in the local TUI (#200605)
  improve(config): reduce repeated directory checks for larger agent rosters (#206494)
  perf(test): reuse the Periphery producer workflow snapshot (#189681)
  fix(ci): keep locale assets within the installed package budget (#206492)
  fix: preserve failed Apple chat messages across partial history pages (#205404)
  improve: avoid merging unrelated settings for agent directory lookups (#206489)
  fix: show typing while a queued follow-up turn runs (#201920)
  fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341)
  refactor(codex): centralize native completion delivery (#206447)
  fix(subagents): finish claimed stops after session rotation (#206405)
  fix: let owners fork a chat with exec after a subagent or exec completion (#206483)
  test(cli): gate agent --local cold-start processes and workers (#206466)
  perf(ci): skip baseline inventory when line-cap debt is empty (#189909)
  refactor(test): share core process-result fixtures (#174149)
  refactor(ci): reuse canonical budget flag parsing (#189480)
  fix: recover Codex chats after oversized requests (#206475)
  ...
vincentkoc added a commit that referenced this pull request Nov 27, 2026
* commit 'fd681ab8786e062045fa5ec6261b1b06f60832eb': (923 commits)
  fix: keep doctor --fix pending checks from creating SQLite sidecars (#206485)
  fix(ci): update iOS screenshot reducer gate (#206497)
  fix: keep chat photo previews sharp within their byte limits (#206461)
  fix: let agents use short Workboard card IDs
  fix(tui): run provider sign-in in the local TUI (#200605)
  improve(config): reduce repeated directory checks for larger agent rosters (#206494)
  perf(test): reuse the Periphery producer workflow snapshot (#189681)
  fix(ci): keep locale assets within the installed package budget (#206492)
  fix: preserve failed Apple chat messages across partial history pages (#205404)
  improve: avoid merging unrelated settings for agent directory lookups (#206489)
  fix: show typing while a queued follow-up turn runs (#201920)
  fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341)
  refactor(codex): centralize native completion delivery (#206447)
  fix(subagents): finish claimed stops after session rotation (#206405)
  fix: let owners fork a chat with exec after a subagent or exec completion (#206483)
  test(cli): gate agent --local cold-start processes and workers (#206466)
  perf(ci): skip baseline inventory when line-cap debt is empty (#189909)
  refactor(test): share core process-result fixtures (#174149)
  refactor(ci): reuse canonical budget flag parsing (#189480)
  fix: recover Codex chats after oversized requests (#206475)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 28, 2026
…ma update (openclaw#206341)

* fix(update): refuse schema changes the 2026-11-17 main Git updater cannot finish

Restore the candidate --check refusal retired in openclaw#205995, without the
systemd recovery: identify the early release layout, refuse only when this
release would migrate state, and print the platform's one-time rebuild.

* fix(update): remove the early release link in the printed rebuild

On current main, openclaw gateway install binds the service to the early
updater's launcher while its release link exists, so the rebuilt Gateway
never started. Remove the link after the build, spelled from $HOME so the
early updater's path redaction leaves it usable.

* fix(update): require the state directory before the rebuild changes anything

* fix(update): put the early release link back when the rebuild's service install fails

* fix(update): keep the rebuild's shell variable out of the OPENCLAW_ namespace

* fix(update): keep the printed rebuild intact through the early updater's redaction

The early updater redacts $ followed by 16 or more name characters as a
Matrix event ID, which turned the line's restore variable into a
placeholder. Use a short variable and ${OPENCLAW_STATE_DIR}.
tideclaw-bot pushed a commit that referenced this pull request Nov 29, 2026
…205987)

## Class: completion is published before required maintenance finishes

Fleet run `4de610c8-e63d-4336-8e85-a76379cfd934` committed and served the new core, but its completion notice preceded the failed plugin result. The bug is ordering, not the core's status.

The modern Gateway-ready owner now settles once **after** required plugin work and sends one final notice afterward. A failed plugin remains a failed step, not a failed core update or a rollback trigger. Existing CLI following and capability-consent behavior remain; the failed-status/early-exit/backoff experiment is removed.

CLI completion, status, Doctor history and the Control UI reuse the existing `renderUpdateRunSummary` over recorded facts. Running results keep their phase; succeeded results name the installed after-version; skipped results keep their existing reason headline, never a guessed serving state. Failed work names its step and exact recovery command. Startup refusal diagnostics, structured failure facts, rollback compensation reasons, recorded signal output and profile-specific recovery commands remain visible. Existing discriminators distinguish repair and reconciled-history records from core updates. Background completion never rewrites the shared trial, preserving a newer pending trial and restart resumption.

## What this deletes

- `renderUpdateRunReport`, its private recovery hints and cause module.
- Routine Markdown completion publication/refresh, automatic `reportPath` output, and artifact-only admission/options plumbing.
- Obsolete completion-export tests and renderer-only assertions. Ledger, recovery, authority, privacy and step-detail assertions remain on their retained data owners.
- The abandoned failed-status classifier, campaign/retry exceptions, early-return CLI path and associated UI/test allocation.

**Kept deliberately:** explicit consent-gated **Report update failure** GitHub preview/submission, its reservation/receipt authority and sanitized issue artifacts. The remaining `update-failure-report*` code serves that user feature and triage, not routine completion. Identity/recovery and legacy result/sentinel projections remain because those manual-report and sentinel consumers still use them.

No new status, state store, flag, stored-record shape or launcher format.

## Size

`tokei` on this PR's **20 production files**, excluding tests/support/harnesses, against integrated main `6ac896f4cbb8bc29940c625cb1e2b19990e87284`:

| | Before | After | Net |
| --- | ---: | ---: | ---: |
| Production code lines | 7,758 | 7,148 | **−610** |
| Test/support lines | | | **−1,257** |

## Verification

- The earlier base Gateway-owner regression exposed the premature terminal write before plugin settlement. Final owner tests pin delayed settlement, unchanged successful core status, exact plugin recovery, one acknowledged final notice, newer-trial preservation and restart resumption.
- **Earlier focused AWS replay GREEN:** nine observed prepare/status/progress regression cases passed in99s; core and CLI-update types, scoped lint (zero warnings/errors) and format passed. https://crabbox.openclaw.ai/portal/runs/run_e5a8682ccf98bb7765b9d075be801705 . Exact qualified source was `5c6686ad20f50377f6affdec0d948f362dc37851`, tree `5ed1cb6e544fbd93604eea566b550f0c722842c8`, normal carrier `d2821086c00e55c8de35d00d7a4418168ca25a2d`; lease released with `--wait`. This is not claimed as an exact-head run after the later shared-summary/UI refinements.
- **Final pushed head:** `79182af301a6166914840dab9a705f4fa5c72fbd`. Restores the existing installed-runtime admission receipt before stop-and-repair advice, keeps historical summaries informational, and types the captured handoff notice without weakening assertions. Three requested files passed once: guidance32/32, handoff19/19, UI view15/15 (**66/66**). https://crabbox.openclaw.ai/portal/runs/run_ea4006e0b21e09bfbd763abe6e25929a . Qualified source was `985dd796d1` plus those two frozen restores, tree `45fe9f49c964b39806b431cde018432ed6e472fc`, normal carrier `81d874a77bb7de2f72307cca91f827db71ec7850`. Exact AWS lease released with `--wait`, exit0. Final-head CI remains the landing gate.
- **Repair candidate:** `1f223e15a20a04a27a4f745af81fb11b106d9d40`. Plain integrated main `6ac896f4cbb8bc29940c625cb1e2b19990e87284` passed all39 CLI tests on hydrated AWS4CPU/7730MiB, including the #205898 restart-wire case in31ms: https://crabbox.openclaw.ai/portal/runs/run_97637e77b460fbb7176bd261693cabd1 . B's timeout came from its local ledger fixture using a remote run ID; the fixture is corrected without changing main's captured connection contract.
- **Node regression batch:** nineteen files on repair predecessor `eede`, 481passed/4failed/1skipped; core types, scoped lint and format passed. https://crabbox.openclaw.ai/portal/runs/run_fbcf26ce68d5a5a539f63f6ee793237a . The four residuals were an early-return saved-notice recognition bug, two assertions pinning retired reconciled wording, and a native-refusal assertion reading a clipped excerpt instead of its retained structured cause. All are corrected without changing generic ledger storage.
- **Final-head residual proof:** summary18/18, abandoned-repair rows2/2 and native-start refusal1/1 passed; core and CLI-update types plus scoped format passed. https://crabbox.openclaw.ai/portal/runs/run_f4e633ac557bce484d1939c03cf88b3f . Source tree `9112e46c2b3081aab02b3dc9a0dfc1e0c06da55f`, normal carrier `82470c4669b7cc502049fa978dc5ed37defb6c6a`, AWS4CPU/7730MiB. Scoped lint did **not** run: its normal SDK declaration preparation failed first with TypeScript/vscode-jsonrpc `ERR_STREAM_DESTROYED`. No retry or bypass; current-head CI remains the lint gate.
- Historical failed-status screenshots, broad partial qualification and prior reviews describe the superseded design, **not** this head.
- No new upgrade source, death proof, harness test or Linux product campaign is added. Superseded remote proof jobs were cancelled and all their leases released with `--wait`.
- The ready-time settlement owner tests passed on integrated `9aba`: `gateway-trial.test.ts`18/18. Later output refinements do not change that settlement policy. Frozen `01b` UI reproduction observed unit14pass/1fail and E2E8pass/2fail. On repair predecessor `eede`, unit15/15, UI/pages/E2E types and scoped lint/format passed. Final `f087` passed both changed E2E cases (standalone repair history; warning advice and keyboard-accessible output), UI/pages/E2E types, scoped lint and format: https://crabbox.openclaw.ai/portal/runs/run_13701071e15057d5ac5c4ac5e927c65d . Source tree `3c734ef709a186303996517ecad54c5e5d4a0e9c`; exact lease released with `--wait`. The other8 E2E cases passed on `eede` and were intentionally not repeated.
- **Accepted budget cost:** exact `1f223` CI measures chat boot gzip **1,336,500→1,337,028 (+528 B)**, requests21→21; startup+1 B. Base already exceeds its cap, so normal tolerance is64 B (464 B excess). https://github.com/openclaw/openclaw/actions/runs/45885636780/job/140136424955 . Cause: `update-run-projection.ts` synchronously imports the shared summary for the existing card/view projection; the existing async result boundary already imports it dynamically. Ayaan accepted this cost for this PR through Main; no new async plumbing or budget config. Main applies the performance-only override at merge; every other gate remains required.
- **Final-head budget receipt (`79182`):** chat boot gzip **1,336,744→1,337,247 (+503 B)**, requests21→21; startup+1 B, normal tolerance64 B. https://github.com/openclaw/openclaw/actions/runs/45895112042/job/140167696819 . This is below the accepted predecessor's +528 B cost; same synchronous-summary cause, no new plumbing/config. Remaining CI gates are still pending.
- **Latest pushed head: `be86da0464892c10cbe7207ff98228eb1e81758a` (test-only delta).** The shared notice mock uses its production signature; no cast or weakened notice assertion remains. Healthy final recovery without an installed-runtime admission receipt explicitly expects update-again/no-stop advice. Two affected files passed once (**81/81**: handoff19, post-update62), focused Gateway/CLI-update types and lint passed: https://crabbox.openclaw.ai/portal/runs/run_c8784e2fe001772ae88bae53af8d9747 . Qualified source was `79182` plus the frozen test edits; only generic-type wrapping changed mechanically afterward, normal commit hooks passed. No production/budget change.
- The prior ratchet failure is infrastructure: its GitHub annotation says the hosted runner lost communication, leaving the baseline-ratchet step without a verdict. Its log fetch returned BlobNotFound/404. No old-head rerun was accepted or needed; this head's normal CI runs the ratchet again.
- **Latest pushed head: `bf3ab61efbb9dba856bfc4d651c7fc77f44549f2` (one exact-copy test assertion).** Requested same-guest owner-file comparison: plain main `993d0b77`13/13 passed ([run](https://crabbox.openclaw.ai/portal/runs/run_4983803c6c82c64295d7d513ac8b52cd)); `be86`12/13 passed ([run](https://crabbox.openclaw.ai/portal/runs/run_51b38ba2049d66bdf6437b89731bf787)), failing only the expected generic details tail. The actual last notice correctly preserves `commands.restart=false` and its app/operator remedy. This commit changes only the exact expected string, retaining acknowledgement, no-update and last-call/context assertions; no mock runtime or production change. No extra local rerun: new-head CI verifies the migrated expectation.

Co-authored-by: Ayaan Zaidi <[email protected]>

(cherry picked from commit ed8b883)

Release adaptation: Port Gateway run/notice timing and the existing maintenance result contract only; retain beta.2 CLI, Doctor and UI summary surfaces and explicit failure reports. Fold in #208074 abort/grace follow-up where applicable.

Later same-path commits from the pinned scan (separate behavior unless named as folded/selected below): 974d792 fix: keep update status quiet and app-managed updates honest (#208359); 186e941 fix: restore the dependency check on main (#207741); dae01a9 fix: keep other agents running when one store is refused (#208364); c9f7a98 fix: keep container Gateway commands from rolling back host updates (#208271); edb6820 fix: let the Gateway restart while boot plugin maintenance is running (#208074); bb37856 fix: keep Windows WebChat connected during config reloads (#208109); 516166c fix: exit once when gateway run rejects an argument after an update (#208068); 07e96dc fix: restart the Gateway after real plugin repairs (#208207); bd48ff6 fix: avoid restarting the Gateway for plugin timestamp changes (#208119); 259f71c fix: stop Linux service starts from copying the whole agent database (#207969); 7cb8975 fix: keep forked Claude chats separate after a Gateway crash (#208048); 6d300d3 fix: restart launcher-managed Gateways after exit 78 (#207972); 90ff668 fix: stop treating limited access as an Inbox alert (#207737); ec39a90 fix(whatsapp): retain sender for explicit current-message reactions (#190121); 86ca412 fix: show the saved quota reset when chat skips its only model (#207210); c4a675f fix: avoid reloading unchanged plugins after Gateway boot (#207949); 13c67a1 fix: let updates back up deeply nested databases (#207756); e2fcd4d fix: acknowledge updates when the Gateway first becomes ready (#207819); 8933edd fix: name safe recovery when agent schema markers disagree (#207705); 19e9dd6 fix(gateway): keep Linux legacy lock recovery explicit (#207340); 54b5989 test(update): move startup diagnostics to the live CLI (#207589); fbf1aae fix: give safe update ownership guidance and restore legacy result delivery (#207640); 0cbe433 test(gateway): move update admission tests to the current handler (#207545); a922203 refactor(update): remove native post-activation Doctor subprocess (#207585); c72bd9a fix(anthropic): show Claude CLI quota usage from the native login (#207543); 7ac87ad fix: avoid taking service-account ownership during updates (#207563); b3902a2 fix(update): allow in-place updates without a full state copy (#207448); 9fa8d14 refactor: trim redundant gateway test journeys (#207311); 2cf1cb6 test(cli): remove unused private fixture state (#207431); ece7a74 improve(workboard): apply the Control UI glossary and style to Workboard copy; 1c89587 fix: update system service packages without root state changes (#207304); dfd17d0 fix(docker): avoid pre-boot Doctor delays on container recreation (#207200); b616036 refactor(subagents): simplify ACP spawn relay ownership (#207023); 93ca762 improve: reduce allocations when preparing session rows (#207109); adb3716 fix(update): surface boot plugin repair advisories (#207163); f79ef8c fix: finish updates of 2026-11-17 main checkouts automatically on Linux and macOS (#207062); 3c4362b fix(update): preserve exception causes in failure history (#207085); 20c92a4 fix: converge plugins after every Gateway boot (#206926); 3078862 fix(update): clean up rejected Git update worktrees (#207040); 9993328 refactor(subagents): simplify kill claim and ownership handling (#207025); 97815bd refactor(subagents): consolidate registry cleanup and publication guards (#207064); e94f799 refactor(subagents): centralize requester turn matching (#206584); 819935f refactor(test): trim unused plugin fixture setup (#206982); 8ae0874 improve(gateway): avoid redundant cleanup for empty legacy auth stores (#206867); 4849bb7 fix(browser): report crashed tabs as tab-scoped failures (#194682); ea77ca3 refactor: report update failures from recorded runs (#206700); b19387e fix(test): cover SIGBREAK during pending update recovery (#206860); 18e53d8 fix: finish Linux upgrades after a legacy Gateway crashes (#206530); 8bd1863 chore(test): remove unused plugin contract fixture setup (#206812); f1841bc fix: stop repeating unchanged session state in every chat turn (#206766); f9a8f18 fix: clear the update warning after a retired model is repaired (#204778); 4d7e00b fix: let started participant runs and requests finish after an access change (#206747); 35cd392 improve: use less memory when waiting for an agent reply (#206733); 9845bf5 fix(test): keep readiness abort fixtures alive until stopped (#206660); 461f650 fix(ci): keep startup helpers internal (#206649); f89ae43 refactor(subagents): use cleanup and terminal owners in sweeps (#206533); a882e0f fix(agents): preserve task answers when sessions are reused (#126263); ccb6d81 fix: finish core updates when the Gateway is ready (#206560); 74f02b4 fix: refuse root updates of a system service that runs as another account (#206343); 01032b1 fix(update): keep acknowledged run IDs when status is unavailable (#206562); 3ce0582 refactor(subagents): centralize collector replay decisions (#206471); c2cfab0 chore: consolidate repeated test fixtures and guards (#198739); 219b6b0 perf(agents): render the system prompt from one manifest and halve it (#206537); 360e306 refactor(test): remove mocked outbound staging fixtures (#184863); cbdd907 fix: finish release updates after a slow launcher response (#206503); 81fc833 refactor(subagents): own dormant child Stop decisions (#206479); 91d4912 fix(update): stop using foreign recovery records as admission (#206295); 6feeb50 fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341); be3c73e fix(subagents): finish claimed stops after session rotation (#206405); 5e5bb6e fix(update): round status inspection timeouts (#206250); 41afc0f fix(update): keep successful plugin reload warnings advisory (#206372); 6d86389 fix: finish healthy Git updates after an older verifier exits; da6ec1a fix(update): bound release CLI Gateway waits (#206252); d9a36b3 improve: skip unrelated harness discovery for isolated model calls (#206323); bcdb2ef improve(cli): skip channel and web discovery for model credentials (#206240).
Later PR-number mentions: none Later commit-SHA mentions: none
Pinned PR grep: ed8b883 fix(update): settle after plugins and share one completion summary (#205987)

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation impact:auth-provider Auth, provider routing, model choice, or SecretRef resolution may break. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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: L 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.

1 participant