Skip to content

perf(update): replace the candidate canary with a runtime contract check - #198268

Merged
obviyus merged 7 commits into
mainfrom
perf/update-remove-candidate-canary
Nov 15, 2026
Merged

obviyus merged 7 commits into
mainfrom
perf/update-remove-candidate-canary

Conversation

@obviyus

@obviyus obviyus commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Before activation, openclaw update rehearses the candidate. It copies all SQLite state and plugin payloads into a scratch directory, runs the candidate's doctor --fix, doctor --lint, config validate and plugins list against the copy, then boots a private Gateway on it. On Peanutto's production-sized state this took 10–15 minutes of a 26-minute update (about 46%).

#197851 made that rehearsal redundant. Post-activation rollback now always has a pre-activation SQLite schema baseline, and --no-restart updates boot the activated release once (activated-gateway-startup) and roll back when it cannot become ready. Doctor and Gateway startup are proven on real state after activation, with rollback.

Change

The driver no longer rehearses. Before activation it runs only the candidate's recovery worker once: update-migrated-finalize --check (step candidate-recovery). That one stateless call already produced every canary output used later:

Canary output Replacement
candidateSchemaVersions (activation schema baseline, PostgreSQL baseline gate, post-Doctor schema check) --check state/agent
gatewayRestartCompletion --check gatewayRestartCompletion
doctorConfigWrites (delegated Doctor config writes) --check doctorConfigWrites: "pid-start-v1"
doctorConfigChanges Removed. Activation Doctor reports its own configChanges and refusal keys.
validatedConfigSnapshot Unchanged: the config read before the check
Observed canary Gateway startup ms (previous-Gateway readiness window) Removed; the existing five-minute floor or --timeout applies
Missing worker → "uses the current updater" advisory Kept as-is

Call sites:

  • openclaw update (validateUpdateCandidateWithProgress) calls checkUpdateCandidate. The progress-writer and state-worker scaffolding that kept WAL readable during the copy is gone.
  • openclaw update preflight (external supervisors) reads config and runs --check. Its receipt coverage changes from isolated-core-startup to candidate-runtime, so a supervisor can tell the weaker proof apart. --source-root is still accepted.
  • Immutable activation runs --check before drain and before rollback. The post-start private canary and its second observation are removed; live readiness verification and rollback are unchanged.
  • snapshot-space-preflight keeps only the activation database backup/rollback space check.
  • Automatic-update backoff keys on repeated identical activation failures (openclaw doctor, post-update verification, activated-gateway-startup) instead of candidate-doctor, which no longer runs. It counts runs recorded as rolled-back as well as failed, because a failed activation usually restores the previous release (ClawSweeper finding; the rolled back campaign case fails without it).
  • The previous-Gateway readiness budget uses the existing floor (5 min, 90 min on Windows) or --timeout.
  • Fix found by E2E: captureUpdateDatabases retires idle state-read workers before acquiring capture ownership. A reader started before activation lazy-imported gateway-owner-lease.worker by its old hashed chunk name; when the target rehashes that chunk the ownership check fails and automatic restore is disabled.
  • Fix found by E2E: the no-restart activated-gateway-startup boot (fix(update): roll back activated releases that fail Doctor or Gateway startup #197851) writes boot bookkeeping to real state, after which database rollback saw "changes after Doctor" and refused. adoptUpdateBootDatabaseWrites attributes the boot's own writes to the update when nothing else wrote since Doctor. Accepted edge case: a foreign write during the boot window is attributed the same way. Covered by the activated-boot case of update-command-database-rollback.test.ts (settlement and restore, not helper output).
  • Restore uses the plugin-cohort binding captured before Doctor, because the previous build cannot open a state database Doctor migrated to a newer schema (newer-schema case).

#197922's delegated rehearsal is removed

#197922 (merged 11-14) made the candidate run its own rehearsal (openclaw update rehearse, package marker openclaw.updateRehearsalProtocol: 1) when the installed updater supports delegation. This PR removes the rehearsal, so it also removes the delegation: the driver-side delegated rehearsal, the candidate-side update rehearse command, the rehearsal contract and the marker (−1,803 lines of #197922).

Rollback no longer runs without the retained runtime

Runtime retention copies the running updater so its lazy imports and workers keep working after the package or checkout is replaced. Since #185178 a retention failure only logged "continuing update without a verified retained rollback runtime". With the canary gone, rollback is the only safety net, and it loads code from that retained runtime.

Reproduced (package install, retention fault injected, then a migration that commits and a Doctor that fails): Doctor committed the migration, database rollback failed with Cannot find module …/dist/update-candidate-state-<hash>.mjs, the update ended state-migrated-no-rollback and left the target release active. The same faults without the retention failure roll back the databases and the package.

Chosen behavior: every retention failure now stops the update before staging or activation, with "Could not retain the running updater (). The update stopped before changing the installation; retry it." Cancellation and uncertain subprocess cleanup still propagate unchanged.

What was removed

Against the merge base: production +383 / −2,198 (net −1,815), tests +648 / −6,140, docs +111 / −134, config −18.

What stays, and why

Released updaters, including stable 2026.11.3, still rehearse whatever candidate they install, using the candidate's state-copy worker, rehearsal-aware Doctor and lint, update-candidate-rehearsal/-snapshot, plugin-tree copy and --update-canary startup progress. Deleting those would break upgrades from every shipped version, so the candidate side stays until no supported update source runs the canary. Historical step identities (candidate-doctor etc.) stay so existing update_runs history renders.

Review findings

  • Config-convergence test (update-cli.config-convergence.test.ts): the stateless check no longer receives config, so the test now asserts what the check does receive at its boundary, the owning profile's stateDir and OPENCLAW_CONFIG_PATH, keeps an explicit candidate-recovery refusal through the result contract, and asserts authored config bytes are unchanged.
  • Data-model compatibility: no schema, config or stored-data shape changes. Existing state from 2026.11.3 (state schema 22 → 40) and Peanutto's production databases (3.3 GB) load through the real update path below.
  • Boot-writes test: replaced by the activated-boot settlement-and-restore case in the database rollback matrix; it fails when boot-write adoption is disabled.

Evidence

Harness: real openclaw update --yes --no-restart --json --tag <packed tarball> from an npm-global install on isolated env -i state (cloned per run with cp -c), run on mbp-m5, three at a time. Base = merge base 1e64efd with inert env-gated faults; head = this branch on the same base (8065ed6; the "with fix" rows use 097a6ba, the retention fix before its refusal wording). The current head fc813bb is that change rebased onto 7310fc2; the rebase only adopted commit 764761e's "Update refused: …" wording in the snapshot-space refusal. Fault targets are the same tarball plus env-gated faults: gateway-crash (Gateway throws at boot), plugin-crash (acpx throws at load), migration-broken (state v41 adds a column then throws), committed-migration (v41 commits, then Doctor throws), retention (runtime retention throws after the native helper is bound). "Gateway after" = a fresh Gateway on the post-update state reaches /readyz. Schema = state user_version after the run (base 40, fault target 41).

Case main (canary) this PR
clean update ok; validating 65 s (retention 18, candidate Doctor 7, candidate Gateway 6) ok; validating 52 s (retention 32, candidate-recovery + admission ~20); no candidate Doctor/Gateway phase
gateway crash refused at candidate-gateway-startup; base kept activated, activated-gateway-startup failed → database rollback + package rollback; base active; Gateway after ok
committed migration + failed Doctor refused at candidate-doctor v41 committed, Doctor failed → database rollback (state back to v40) + package rollback; base active; Gateway after ok
broken migration refused at candidate-doctor Doctor failed → database + package rollback; state v40; Gateway after ok
plugin crash ok (plugin failure recorded) ok (plugin failure recorded)
retention failure + gateway crash refused at candidate-gateway-startup before fix: rolled back; with fix: refused before activation
retention failure + committed migration refused at candidate-doctor before fix: Cannot find module, rollback failed, state-migrated-no-rollback, target left active, state stuck at v41; with fix: refused before staging, base active, state v40, Gateway after ok
2026.11.3 → head — ok (2026.11.3's own canary against the kept candidate surfaces); state schema 22 → 40; Gateway after ok
main updater (contains #197922) → head — target lacks the marker → updater ran its own rehearsal → ok; Gateway after ok
Peanutto-shaped clean update (3.28 GB SQLite: Peanutto's state + 3.1 GB agent DB, its plugin set) ok; validating 236 s (retention 50, candidate snapshot 47, candidate Doctor 64, lint 22, candidate Gateway 27); update 949 s ok; validating 68 s (retention 50, candidate-recovery + admission ~18); update 839 s; Gateway after ok

Peanutto-shaped: the validating phase drops by 168 s (236 → 68 s), all of it the four rehearsal steps (160 s). Those two runs overlapped each other, so their activation and total times are not a clean comparison; small-state wall times are likewise not comparable across rows (runs overlapped three at a time). The ~950 s mean saving estimated from Peanutto's live history (where the candidate Doctor took 200–670 s) is unmeasured here.

Tests: 31 touched update test files plus the admission test pass (mbp-m5, ocx test, 957 s). The retention suites pass (50); 7 of them fail on the previous head because retention resolved instead of stopping. pnpm tsgo:core, pnpm check:test-types, oxfmt clean. oxlint reports one inherited max-lines on update-command-service-maintenance.ts (750 lines here, 756 on main).

CI notes

  • update-cli.candidate-admission.test.ts > "blocks package updates when the target requires a newer Node runtime" still asserted the multi-line diagnostic that 764761e moved into the saved report; it fails the same way on main f24c2097, whose changed-lane CI does not select this suite. Updated to assert the one-line refusal and the recovery steps.
  • extensions/a2a/src/inbound.test.ts (interleaved same-context replies) failed in an earlier run of this PR and fails locally on main f24c2097 too; this PR does not touch that plugin. The branch now includes main through test(memory): track shadow descriptors opened by async admission #199736, the fix for the earlier memory-core manager-shadow-write.test.ts failure.
  • src/gateway/github-pr-workspace-preparation.test.ts > "recovers an interrupted initial exact install (bound runtime=true)" (checks-node-changed-compact-large-22) fails 3/3 locally on both this head 97ca0de5 and main e182b8d5, also fails on main a1dd4938, and failed again on the rerun of the failed job (run 43763967024, attempt 2), with the same expect(runtime?.isPaused()).toBe(true) assertion at line 884. This PR does not touch src/gateway.

Accepted edge cases

  • Problems only Doctor or Gateway startup reveal are found after activation. The update rolls back the release and the pre-activation database baseline instead of refusing first: one activation/rollback cycle (with restart, a brief Gateway outage) in exchange for skipping the rehearsal on every successful update.
  • --no-restart with a Gateway still running the old code: the activated release is not booted (reported), as in fix(update): roll back activated releases that fail Doctor or Gateway startup #197851.
  • External supervisors using update preflight get less proof (coverage: "candidate-runtime") and must verify readiness after activation.
  • A retention failure now stops the update; the user retries or fixes the named cause.

Gaps

  • checks-fast-baseline-ratchets on dffdf91 reported database-worker/database-dialect failures after a runner shutdown signal. Both ratchets pass locally against the merge base (SQLite T1 live calls: 166 -> 166; dialect: no construct-group growth).

  • The Git-checkout path was not re-run in this round (the m5 repository was mid-repack). Retention and rollback share one owner across package and Git installs, and the earlier Git runs are in this PR's history.

  • The fixed refusal message was proven in unit tests; the E2E refusal ran on the fix before the message wording was added.

  • The main updater at the merge base refuses a relocated state directory in its canary snapshot ("Restored client credentials do not match the captured shared database": the credential receipt pins the shared database inode). The harness repoints the receipt after each cp -c; head never runs that snapshot.

@clawsweeper

clawsweeper Bot commented Nov 13, 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 scripts Repository scripts commands Command implementations size: XL labels Nov 13, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. 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: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 13, 2026
@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Replace private candidate rehearsal with a recovery-runtime contract check, retaining post-activation verification and rollback.

Example: Update an installation with 3.28 GB of SQLite state.

  • Before: The supplied baseline run spent 236 seconds validating, including copied-state Doctor and Gateway checks.
  • After: The supplied candidate run spent 68 seconds validating and reached Gateway readiness after activation.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A coherent removal of duplicate work, supported by real upgrade and fault-recovery results, with prior findings resolved and no new actionable defect found.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The supplied real npm-global update runs exercise candidate checking, activation, migration failures, Gateway failure, database and package rollback, and retention refusal on isolated state; the stable 2026.11.3 upgrade and marker-aware updater case cover existing installations.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Updates repeat expensive state copying, Doctor, and Gateway startup checks before performing activation verification.
Reason: The maintainer-authored direction removes demonstrated duplicate work while retaining recovery guarantees and explicitly accepting the changed failure timing.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it removes costly duplicate update work, preserves released-updater compatibility, and supplies upgrade and rollback evidence. No actionable introduced defect was found; current-head CI remains in progress.

Priority: P2
Reviewed head: 97ca0de540ed73b60d61755cde8f8256f1a67b84

Before merge

None.

Findings

None.

Agent review details

How this fits together

The updater stages a candidate release, checks its runtime contract, activates it, and uses the existing Doctor, readiness, and database recovery owners to verify or restore the installation.

flowchart TD
  A[Update request] --> B[Stage candidate]
  B --> C[Recovery runtime check]
  C --> D[Activate and capture database baseline]
  D --> E[Doctor and Gateway verification]
  E --> F[Complete update]
  E --> G[Restore databases and previous release]
Loading

Technical review

Best possible solution:

Use the candidate’s existing recovery contract before activation and the existing verification and rollback owners afterward, preserving released-updater entry points.

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

Current-main source performs copied-state rehearsal before activation, and the supplied real CLI runs demonstrate that work on small and production-sized state; no target code was executed during this review.

Is this the best way to solve the issue?

The change follows the smallest complete cutover: reuse the existing recovery contract, remove its superseded rehearsal driver and delegation machinery, and repair the rollback paths exposed by real update failures.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Pre-activation candidate rehearsal changes intended behavior with a stated reason (d1a69c0: Validate the candidate while the old Gateway serves and avoid stopping service for an unusable update.)
  • Candidate-owned delegated rehearsal changes intended behavior with a stated reason (3ab80ab: Allow candidate rehearsal fixes to take effect during the update that ships them, with fallback for unsupported targets.)
  • Best-effort runtime retention changes intended behavior with a stated reason (2bddc78: Continue updates after retention failures once the native recovery helper was retained; this PR supplies a concrete failed database-rollback reproduction that requires retaining the complete runtime.)
  • Post-activation Doctor and Gateway rollback keeps the original intent (da0e0ba: Restore databases and the previous release when activation Doctor or the activated Gateway fails.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit f7fa5da adds src/infra/update-retained-runtime.ts:262 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f7fa5daeebce; files: src/infra/update-retained-runtime.ts)

PR surface

PR surface statistics unavailable: the file list is incomplete.

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:

No label changes.

Label justifications:

  • P2: A measured update-performance improvement with focused recovery changes and no demonstrated urgent regression.
  • merge-risk: 🚨 compatibility: Supervisor preflight coverage changes and retention failure becomes fatal; the maintainer-authored PR explicitly accepts both changes and documents older-updater compatibility.
  • merge-risk: 🚨 availability: Doctor or startup failures can now require activation and rollback, including a brief service outage; the PR explicitly accepts this tradeoff and supplies rollback evidence.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

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-13T13:12:24.047Z sha 91930dc :: blocked before merge. :: [P2] [P2] Update config-preservation assertions for the stateless check
  • reviewed 2026-11-15T16:04:15.272Z sha 4af3b35 :: needs changes before merge. :: [P2] Include rolled-back runs in activation-failure backoff
  • reviewed 2026-11-15T16:20:13.961Z sha fc813bb :: needs changes before merge. :: [P2] Include rolled-back runs in activation-failure backoff
  • reviewed 2026-11-15T16:50:35.982Z sha dffdf91 :: needs changes before merge. :: [P2] Include rolled-back runs in activation-failure backoff
  • reviewed 2026-11-15T17:08:40.557Z sha 7f48393 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-15T18:13:08.301Z sha 818fb19 :: needs maintainer review before merge. :: none

Reviewed November 15, 2026, 4:36 PM ET / 21:36 UTC (Revision 7).

@obviyus
obviyus marked this pull request as ready for review November 13, 2026 13:54
@obviyus
obviyus marked this pull request as draft November 13, 2026 15:37
@obviyus obviyus closed this Nov 13, 2026
@obviyus obviyus reopened this Nov 13, 2026
@obviyus
obviyus marked this pull request as ready for review November 13, 2026 16:55
@obviyus

obviyus commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@obviyus
obviyus marked this pull request as draft November 13, 2026 18:32
@clawsweeper clawsweeper Bot added the clawsweeper:intake:bug Preliminary submission classification; full source review pending. label Nov 13, 2026
@obviyus
obviyus force-pushed the perf/update-remove-candidate-canary branch from 518a49d to 4af3b35 Compare November 15, 2026 15:55
@obviyus
obviyus marked this pull request as ready for review November 15, 2026 15:55
@obviyus

obviyus commented Nov 15, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 16, 2026
…eck (openclaw#198268)

## Problem

Before activation, `openclaw update` rehearses the candidate. It copies all SQLite state and plugin payloads into a scratch directory, runs the candidate's `doctor --fix`, `doctor --lint`, `config validate` and `plugins list` against the copy, then boots a private Gateway on it. On Peanutto's production-sized state this took 10–15 minutes of a 26-minute update (about 46%).

openclaw#197851 made that rehearsal redundant. Post-activation rollback now always has a pre-activation SQLite schema baseline, and `--no-restart` updates boot the activated release once (`activated-gateway-startup`) and roll back when it cannot become ready. Doctor and Gateway startup are proven on real state after activation, with rollback.

## Change

The driver no longer rehearses. Before activation it runs only the candidate's recovery worker once: `update-migrated-finalize --check` (step `candidate-recovery`). That one stateless call already produced every canary output used later:

| Canary output | Replacement |
| --- | --- |
| `candidateSchemaVersions` (activation schema baseline, PostgreSQL baseline gate, post-Doctor schema check) | `--check` `state`/`agent` |
| `gatewayRestartCompletion` | `--check` `gatewayRestartCompletion` |
| `doctorConfigWrites` (delegated Doctor config writes) | `--check` `doctorConfigWrites: "pid-start-v1"` |
| `doctorConfigChanges` | Removed. Activation Doctor reports its own `configChanges` and refusal keys. |
| `validatedConfigSnapshot` | Unchanged: the config read before the check |
| Observed canary Gateway startup ms (previous-Gateway readiness window) | Removed; the existing five-minute floor or `--timeout` applies |
| Missing worker → "uses the current updater" advisory | Kept as-is |

Call sites:

- `openclaw update` (`validateUpdateCandidateWithProgress`) calls `checkUpdateCandidate`. The progress-writer and state-worker scaffolding that kept WAL readable during the copy is gone.
- `openclaw update preflight` (external supervisors) reads config and runs `--check`. Its receipt `coverage` changes from `isolated-core-startup` to `candidate-runtime`, so a supervisor can tell the weaker proof apart. `--source-root` is still accepted.
- Immutable activation runs `--check` before drain and before rollback. The post-start private canary and its second observation are removed; live readiness verification and rollback are unchanged.
- `snapshot-space-preflight` keeps only the activation database backup/rollback space check.
- Automatic-update backoff keys on repeated identical activation failures (`openclaw doctor`, `post-update verification`, `activated-gateway-startup`) instead of `candidate-doctor`, which no longer runs. It counts runs recorded as `rolled-back` as well as `failed`, because a failed activation usually restores the previous release (ClawSweeper finding; the `rolled back` campaign case fails without it).
- The previous-Gateway readiness budget uses the existing floor (5 min, 90 min on Windows) or `--timeout`.
- **Fix found by E2E:** `captureUpdateDatabases` retires idle state-read workers before acquiring capture ownership. A reader started before activation lazy-imported `gateway-owner-lease.worker` by its old hashed chunk name; when the target rehashes that chunk the ownership check fails and automatic restore is disabled.
- **Fix found by E2E:** the no-restart `activated-gateway-startup` boot (openclaw#197851) writes boot bookkeeping to real state, after which database rollback saw "changes after Doctor" and refused. `adoptUpdateBootDatabaseWrites` attributes the boot's own writes to the update when nothing else wrote since Doctor. Accepted edge case: a foreign write during the boot window is attributed the same way. Covered by the `activated-boot` case of `update-command-database-rollback.test.ts` (settlement and restore, not helper output).
- Restore uses the plugin-cohort binding captured before Doctor, because the previous build cannot open a state database Doctor migrated to a newer schema (`newer-schema` case).

### openclaw#197922's delegated rehearsal is removed

openclaw#197922 (merged 11-14) made the candidate run its own rehearsal (`openclaw update rehearse`, package marker `openclaw.updateRehearsalProtocol: 1`) when the installed updater supports delegation. This PR removes the rehearsal, so it also removes the delegation: the driver-side delegated rehearsal, the candidate-side `update rehearse` command, the rehearsal contract and the marker (−1,803 lines of openclaw#197922).

- **No released version depends on it.** `git tag --contains e32cb9a` lists only `release-publish/*` cuts of 2026.11.3; `v2026.11.3` (npm `latest`) and `v2026.11.5-beta.1..3` do not contain it, and `npm view [email protected] openclaw.updateRehearsalProtocol` is empty. Per AGENTS.md, main and beta are not shipped contracts.
- **Updaters built from main since openclaw#197922 fall back.** When the target lacks the marker, they run their own rehearsal (the path openclaw#197922 kept for unsupported targets). Proven below: a main updater (merge base, which contains openclaw#197922) updated to this branch, rehearsed it itself and finished `ok`.

### Rollback no longer runs without the retained runtime

Runtime retention copies the running updater so its lazy imports and workers keep working after the package or checkout is replaced. Since openclaw#185178 a retention failure only logged "continuing update without a verified retained rollback runtime". With the canary gone, rollback is the only safety net, and it loads code from that retained runtime.

Reproduced (package install, retention fault injected, then a migration that commits and a Doctor that fails): Doctor committed the migration, `database rollback` failed with `Cannot find module …/dist/update-candidate-state-<hash>.mjs`, the update ended `state-migrated-no-rollback` and **left the target release active**. The same faults without the retention failure roll back the databases and the package.

Chosen behavior: **every retention failure now stops the update before staging or activation**, with "Could not retain the running updater (<reason>). The update stopped before changing the installation; retry it." Cancellation and uncertain subprocess cleanup still propagate unchanged.

- Least complex: it deletes openclaw#185178's fallback (−26 production lines) instead of making rollback independent of the copy, which would mean preloading every lazy rollback import and pinning every worker entry, a second retention mechanism.
- Measured cost on large installs: openclaw#185178 was motivated by a worker output cap that openclaw#184958 has since fixed. Peanutto (183k entries, ~4 GB retained) completed retention on all 17 updates since 2026-10-27, so this refusal would not have fired once. The remaining causes are a source file changing during the copy (retry) and a host-owned plugin link (documented fix in `docs/cli/update.md#runtime-retention-failures`).
- Retention itself goes away with Git releases in a later slice; this does not redesign it.

### What was removed

- Driver: `update-candidate-canary.ts`, `update-candidate-canary-commands.ts`, canary-only lint/failure/config helpers, Git startup-runtime selection, the validation wrapper scaffolding, and openclaw#197922's delegated rehearsal.
- Candidate: `update rehearse`, `update-rehearsal-contract.ts`, the `updateRehearsalProtocol` marker.
- openclaw#185178's retention fallback.
- Tests: the canary suites and their test-support, and the delegated-rehearsal tests.

Against the merge base: **production +383 / −2,198** (net −1,815), tests +648 / −6,140, docs +111 / −134, config −18.

### What stays, and why

Released updaters, including stable 2026.11.3, still rehearse whatever candidate they install, using **the candidate's** state-copy worker, rehearsal-aware Doctor and lint, `update-candidate-rehearsal`/`-snapshot`, plugin-tree copy and `--update-canary` startup progress. Deleting those would break upgrades from every shipped version, so the candidate side stays until no supported update source runs the canary. Historical step identities (`candidate-doctor` etc.) stay so existing `update_runs` history renders.

## Review findings

- **Config-convergence test** (`update-cli.config-convergence.test.ts`): the stateless check no longer receives config, so the test now asserts what the check does receive at its boundary, the owning profile's `stateDir` and `OPENCLAW_CONFIG_PATH`, keeps an explicit `candidate-recovery` refusal through the result contract, and asserts authored config bytes are unchanged.
- **Data-model compatibility:** no schema, config or stored-data shape changes. Existing state from 2026.11.3 (state schema 22 → 40) and Peanutto's production databases (3.3 GB) load through the real update path below.
- **Boot-writes test:** replaced by the `activated-boot` settlement-and-restore case in the database rollback matrix; it fails when boot-write adoption is disabled.

## Evidence

Harness: real `openclaw update --yes --no-restart --json --tag <packed tarball>` from an npm-global install on isolated `env -i` state (cloned per run with `cp -c`), run on mbp-m5, three at a time. Base = merge base `6b9404d` with inert env-gated faults; head = this branch on the same base (`8065ed6`; the "with fix" rows use `097a6ba`, the retention fix before its refusal wording). The merged head `97ca0de` is that change with current `main` merged in. Fault targets are the same tarball plus env-gated faults: `gateway-crash` (Gateway throws at boot), `plugin-crash` (acpx throws at load), `migration-broken` (state v41 adds a column then throws), `committed-migration` (v41 commits, then Doctor throws), `retention` (runtime retention throws after the native helper is bound). "Gateway after" = a fresh Gateway on the post-update state reaches `/readyz`. Schema = state `user_version` after the run (base 40, fault target 41).

| Case | main (canary) | this PR |
| --- | --- | --- |
| clean update | ok; validating 65 s (retention 18, candidate Doctor 7, candidate Gateway 6) | ok; validating 52 s (retention 32, `candidate-recovery` + admission ~20); **no candidate Doctor/Gateway phase** |
| gateway crash | refused at `candidate-gateway-startup`; base kept | activated, `activated-gateway-startup` failed → **database rollback + package rollback**; base active; Gateway after ok |
| committed migration + failed Doctor | refused at `candidate-doctor` | v41 committed, Doctor failed → **database rollback (state back to v40) + package rollback**; base active; Gateway after ok |
| broken migration | refused at `candidate-doctor` | Doctor failed → database + package rollback; state v40; Gateway after ok |
| plugin crash | ok (plugin failure recorded) | ok (plugin failure recorded) |
| retention failure + gateway crash | refused at `candidate-gateway-startup` | before fix: rolled back; **with fix: refused before activation** |
| retention failure + committed migration | refused at `candidate-doctor` | before fix: **`Cannot find module`, rollback failed, `state-migrated-no-rollback`, target left active, state stuck at v41**; with fix: refused before staging, base active, state v40, Gateway after ok |
| 2026.11.3 → head | — | ok (2026.11.3's own canary against the kept candidate surfaces); state schema 22 → 40; Gateway after ok |
| main updater (contains openclaw#197922) → head | — | target lacks the marker → updater ran its own rehearsal → ok; Gateway after ok |
| Peanutto-shaped clean update (3.28 GB SQLite: Peanutto's state + 3.1 GB agent DB, its plugin set) | ok; **validating 236 s** (retention 50, candidate snapshot 47, candidate Doctor 64, lint 22, candidate Gateway 27); update 949 s | ok; **validating 68 s** (retention 50, `candidate-recovery` + admission ~18); update 839 s; Gateway after ok |

Peanutto-shaped: the validating phase drops by **168 s** (236 → 68 s), all of it the four rehearsal steps (160 s). Those two runs overlapped each other, so their activation and total times are not a clean comparison; small-state wall times are likewise not comparable across rows (runs overlapped three at a time). The ~950 s mean saving estimated from Peanutto's live history (where the candidate Doctor took 200–670 s) is unmeasured here.

Tests: 31 touched update test files plus the admission test pass (mbp-m5, `ocx test`, 957 s). The retention suites pass (50); 7 of them fail on the previous head because retention resolved instead of stopping. `pnpm tsgo:core`, `pnpm check:test-types`, oxfmt clean. oxlint reports one inherited `max-lines` on `update-command-service-maintenance.ts` (750 lines here, 756 on main).


**Exact-head check on `97ca0de`** (same harness, run after the last merge of `main`): 2026.11.3 → head ok, schema 22 → 40, Gateway after ok (398 s); clean head update ok, schema unchanged, Gateway after ok (383 s); Peanutto-shaped clean update ok, Gateway after ok (738 s).

### CI notes

- `update-cli.candidate-admission.test.ts` > "blocks package updates when the target requires a newer Node runtime" still asserted the multi-line diagnostic that `4281497` moved into the saved report; it fails the same way on main `7e26d771`, whose changed-lane CI does not select this suite. Updated to assert the one-line refusal and the recovery steps.
- `extensions/a2a/src/inbound.test.ts` (interleaved same-context replies) failed in an earlier run of this PR and fails locally on main `7e26d771` too; this PR does not touch that plugin. The branch now includes main through openclaw#199736, the fix for the earlier memory-core `manager-shadow-write.test.ts` failure.
- `src/gateway/github-pr-workspace-preparation.test.ts` > "recovers an interrupted initial exact install (bound runtime=true)" (`checks-node-changed-compact-large-22`) fails 3/3 locally on both this head `97ca0de5` and main `ec3e3d7e`, also fails on main `9a5e62f0`, and failed again on the rerun of the failed job (run 43763967024, attempt 2), with the same `expect(runtime?.isPaused()).toBe(true)` assertion at line 884. This PR does not touch `src/gateway`.

## Accepted edge cases

- Problems only Doctor or Gateway startup reveal are found after activation. The update rolls back the release and the pre-activation database baseline instead of refusing first: one activation/rollback cycle (with restart, a brief Gateway outage) in exchange for skipping the rehearsal on every successful update.
- `--no-restart` with a Gateway still running the old code: the activated release is not booted (reported), as in openclaw#197851.
- External supervisors using `update preflight` get less proof (`coverage: "candidate-runtime"`) and must verify readiness after activation.
- A retention failure now stops the update; the user retries or fixes the named cause.

## Gaps

- `checks-fast-baseline-ratchets` on `dffdf91` reported `database-worker`/`database-dialect` failures after a runner shutdown signal. Both ratchets pass locally against the merge base (`SQLite T1 live calls: 166 -> 166`; dialect: no construct-group growth).

- The Git-checkout path was not re-run in this round (the m5 repository was mid-repack). Retention and rollback share one owner across package and Git installs, and the earlier Git runs are in this PR's history.
- The fixed refusal message was proven in unit tests; the E2E refusal ran on the fix before the message wording was added.
- The main updater at the merge base refuses a relocated state directory in its canary snapshot ("Restored client credentials do not match the captured shared database": the credential receipt pins the shared database inode). The harness repoints the receipt after each `cp -c`; head never runs that snapshot.

Co-authored-by: Ayaan Zaidi <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 16, 2026
Backport the successful-boot attribution fix from PR #200260. Adapt the existing boot-write adoption helper and its settlement call from #198268, without the unrelated canary-runtime changes.

Canonical fix: 533a0fa. Helper provenance: e4a3093.

Co-authored-by: RomneyDa <[email protected]>
maplel pushed a commit to maplel/openclaw that referenced this pull request Nov 24, 2026
…aw#194058)

Failed-update triage now captures the operator's environment before managed candidate admission, so a coding agent installed only on the operator's PATH is still offered when the Gateway service's PATH differs. Restores the operator-environment contract from openclaw#134490 and keeps the launch confirmation from openclaw#143139.

Proof: shipped CLI on isolated Linux (Crabbox) with a running systemd Gateway: accept launches the operator-only agent, decline starts nothing, base 18bee8e reports no agent found; published 2026.11.1 upgrades to the fix with settings intact.

Co-authored-by: TorstenW <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: steipete <[email protected]>

(cherry picked from commit 7c702c3)

Release adaptation: Capture invoking operator env before candidate admission, forward to interactive triage only; preserve latest target selectors, confirmation and lease cleanup ordering. Exact three authorized production paths plus real lifecycle regression.

Follow-up dispositions: ad4863d fix: preserve the running installation when an agent updates its Gateway (openclaw#201570); dc73ec0 fix: let updates finish when another tool briefly reads OpenClaw's databases (openclaw#202541); d07b530 fix: clarify PostgreSQL schema upgrades for Git installs (openclaw#202098); e60ea9f test(update): add a Git release upgrade-survivor scenario (openclaw#201956); 2ef6f7b fix(update): build and serve Git releases outside node_modules (openclaw#201917); dbc1aa0 fix: keep the openclaw command and Gateway working after updating a pnpm install (openclaw#201735); f5e7641 fix: Git checkout updates across a schema change no longer end as post-update-failed after the new release starts (openclaw#201600); 2183caf fix: Git checkout updates no longer fail before the new release starts on a schema change or a busy database (openclaw#201463); 47e8649 fix: explain why Doctor cannot restore a scheduled job’s account (openclaw#201550); 8f2cfd4 fix: remove updater-only restrictions from agent maintenance guidance; cb5cfb2 fix: keep a doubtful killed-update recovery on the repair path (openclaw#201361); 24cb734 fix: keep carried-over scheduled jobs running after updates (openclaw#200653); d1276e1 feat(doctor): check OpenClaw ID member roles and honor an optional roles default (openclaw#197785); 0a39956 fix: finish updates when another tool reads OpenClaw's databases during the update (openclaw#201330); ea1c9d5 fix(update): settle remounted package publications before admission (openclaw#201336); 66b5212 fix(update): isolate malformed retained-install markers (openclaw#201199); 7e79c83 fix: let the next update finish a killed source checkout update (openclaw#201009); d905d8a fix: let the next update finish a killed update after the machine restarted (openclaw#200994); fdf0c95 fix: let the next update finish a killed update that had already installed the new version (openclaw#200866); 0c19bcd chore(release): close out 2026.11.5 on main (openclaw#200577); a1940e0 fix(matrix): keep explicit recovery available during deferred migration (openclaw#200805); 18b4776 improve: explain package baseline drift during updates (openclaw#200802); 1ad4cad fix(doctor): reclaim macOS updater runtimes blocked by non-updater processes (openclaw#200732); 427c857 fix: keep one missing archived transcript from blocking every update (openclaw#200733); 802e3f7 fix(update): keep valid cold archives from blocking updates (openclaw#200659); 23fca1a fix: let the next update continue after a killed update when nothing is left to repair (openclaw#200680); 3afe212 fix: let Doctor publish unchanged plugin migrations in any order (openclaw#200658); f65e4db fix(doctor): reclaim runtimes blocked by unrelated Linux processes (openclaw#200657); dab086c fix(update): let candidate Doctor read plugin dependencies from the staged package (openclaw#200595); 3447bee fix(update): keep updates going when the predecessor writes during its stop (openclaw#200569); 0ce9c77 fix: let the next update settle a package publication that a killed update left behind (openclaw#200550); ae31ea3 fix(update): repair handoffs in the journal-pinned lease store (openclaw#200532); 74020ea fix: continue updates when initial SQLite capture is stale (openclaw#200328); 6747b1e feat(update): run Git checkout installs from releases behind the release link (openclaw#199706); e3f8a67 fix(state): keep completed retained agent stores out of startup upgrade (openclaw#200284); 3c512c5 fix(gateway): move managed update lease operations off the main thread (openclaw#200169); ea69fcb chore(release): close out 2026.11.4 on main (openclaw#199956); 618bf31 fix(state): bound startup upgrade copies and pruning to owned state (openclaw#199929); e4a3093 perf(update): replace the candidate canary with a runtime contract check (openclaw#198268); 5dbf569 fix(update): plugin failures never fail an update or Gateway health; 764761e fix(update): refuse missing host prerequisites in one line and record a cause per attempt; 4c4fef4 fix(ui): update dialog claims installation before progress is confirmed (openclaw#199254); 136e1f6 fix(update): retrying an update from a dev checkout is refused after a killed update (openclaw#198673); 3bd03da fix(update): avoid duplicate database copies while the Gateway is stopped (openclaw#198148); 68a839b fix: isolate held agent databases until explicit restoration (openclaw#198180); e333f7e chore(ci): drop retired test-lines allocation records (3/3) (openclaw#197657); fd6fa47 fix: converge Gateway updates with environment-only service overrides (openclaw#196371); 7cf5e75 fix: clarify split-install updates and blocked Doctor repairs (openclaw#196342); 6ff8c86 fix(update): retain lazy sqlite catalog generation (openclaw#197095); 930e1f7 fix: keep stable updates and recovery free of premature migrations (openclaw#196474); a15f737 fix: preserve external plugin data during update rehearsal (openclaw#196301); 92798ae fix: updates survive interrupted heartbeat runs (openclaw#195656); c1e55e2 fix(update): restore LaunchAgent registration after repair contention (openclaw#195406); 715c610 fix(doctor): repair retained ISO session end timestamps (openclaw#194685); 689cfc8 fix(update): reclaim dead closing triage repair leases (openclaw#194503); 86bc89e fix(doctor): keep standing Codex parameter advice out of retirement blockers (openclaw#193650); 691bc8d fix(backup): read the backup engine without copying the live database (openclaw#194234); 000542f fix(backup): backups and updates fail on slow storage when a header probe batch misses its deadline (openclaw#194239); 31a65d5 fix(update): skip --no-lazy-fetch on Git versions without it (openclaw#194198); e45e99d fix(update): preserve dev update sources in tag-only Git clones (openclaw#193109)

Validation: Baseline2 intended operator-agent failures/32 controls passed; candidate34/34passed (194058-green.log). Accept launches synthetic operator-only CLI with expected env, decline starts nothing. Isolated updater flow, not live systemd/upgrade qualification.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 6689fd575ada8fe40a9593784deac18ec73041cd)
(cherry picked from commit 92e7a9fa223b0dc35801f25f70be90b472d9a6b7)
maplel pushed a commit to maplel/openclaw that referenced this pull request Nov 24, 2026
)

* fix(plugins): portable plugin-state keys for PostgreSQL

Use an exclusive SQL lower bound for Doctor pagination instead of a NUL-suffixed cursor. Reject new NUL keys in test-only plugin-state fixtures while retaining legacy SQLite adoption reads.

Add real PostgreSQL Doctor regression coverage and register it in conformance and database-worker lanes. Refs openclaw#184862 openclaw#188642.

* test: account for rebased plugin-state coverage

* test(clickclack): import legacy revocations before adoption

(cherry picked from commit 395cac7)

Release adaptation: Only exclusive SQL lower bound in kernel and Doctor pagination; preserve legacy SQLite keys and public validation. Regression exercises real Doctor paging and inspected executed SQL bindings; no NUL-key fixture policy, schema or unrelated tests.

Follow-up dispositions: 8253356 fix: preserve child results after source lifecycle changes (openclaw#202708); f3f89c7 fix: show saved child results when completion delivery fails (openclaw#202664); c45faa8 fix: align CI tests with admitted tool calls (openclaw#202655); 5c9389a fix: make channels add report required plugin install failures (openclaw#202091); 52b9188 fix: show hosted model details in `models list` without a Gateway (openclaw#202490); d248a76 fix: show an outcome when kept child chats return no answer (openclaw#202423); 5148804 fix(discord): check a queued message's access again when its turn starts (openclaw#202330); 2470d62 fix: let setup use account models with a fresh catalog (openclaw#202019); 9fa0b92 fix: let PostgreSQL Gateways start with plugin-backed secrets (openclaw#201063); c180824 fix(plugins): Talk and plugin-loading requests fail on PostgreSQL Gateways (openclaw#201976); cb5cfb2 fix: keep a doubtful killed-update recovery on the repair path (openclaw#201361); 17c5fb0 fix(state): PostgreSQL state created before Template bootstrap deferral is refused as schema drift (openclaw#197425); b5c1277 fix: let resumed parents collect children stopped by restart (openclaw#201460); f920a7e chore(postgres): qualify cron completion during graceful shutdown (openclaw#201246); 1680f54 fix(openai): new ChatGPT subscription models missing until an OpenClaw release (openclaw#201130); 0d8820a fix(media): image descriptions use the ChatGPT OAuth route when OpenAI has no API key (openclaw#199299); ee3e16e test(agents): trim and fold low-value regression suites (openclaw#198916); b8029b4 test(agents): qualify PostgreSQL simple-completion acquisition (openclaw#200956); 703c82d fix(sessions): record queued input end causes and recover them across crashes (openclaw#200533); 23fca1a fix: let the next update continue after a killed update when nothing is left to repair (openclaw#200680); d565e17 fix(ci): retire deleted session fork test from inventory (openclaw#200611); 4cf12c6 chore(postgres): qualify prompt refresh and rebalance CI (openclaw#200488); d460273 fix(templates): release earlier Template-managed agents (openclaw#200303); ff75829 fix(update): --no-restart update fails when the Gateway restarts itself during Doctor's stop (openclaw#200181); 0b2ad60 chore(postgres): cover compaction watched-session prompts (openclaw#200117); b90c573 test: consolidate redundant coverage (198795 recut) (openclaw#198943); a042363 test: consolidate redundant coverage (198793, part 2) (openclaw#198936); 9bfad2b test: consolidate suites while retaining recovery owners (openclaw#198933); 4e9812c test: consolidate redundant coverage (198789, part 2) (openclaw#198932); 90814f5 fix(subagents): stops a finished sub-agent's chat being deleted before its parent reads the result; 799bc0b fix(ci): stabilize hourly fixtures and retire unused exports (openclaw#199851); e4a3093 perf(update): replace the candidate canary with a runtime contract check (openclaw#198268); a4cc2ad fix: undo cold-session compaction CPU and latency regressions (openclaw#199561); 55fec79 fix(agents): stop divergent mid-turn overflow recovery (openclaw#199636); 2c4413a fix: reduce Gateway stalls under filesystem pressure (openclaw#197510); 37d977f fix: output reducers are skipped in headless and Code Mode runs (openclaw#199434); c9ee264 fix(compaction): concurrent sessions wait for each other's summaries during compaction (openclaw#196550); 2471ddc feat: let agents review generated images before delivery (openclaw#198227); 21f7dc6 fix(github): publication fails with PostgreSQL session or state stores (openclaw#193749); 63d9e57 fix(ci): new PostgreSQL suites are omitted from conformance (openclaw#198390); 466a4b6 fix(telegram): steered answers quote the wrong input (openclaw#178124); 87b6f52 fix(delivery): resend routed Telegram finals after an ambiguous network failure (openclaw#192779); 68a839b fix: isolate held agent databases until explicit restoration (openclaw#198180); cff99b2 fix(agents): keep provider history append-only across runs (openclaw#197874); 8a328bf feat: add an opt-in usage-ranked tool index (openclaw#197128); 097e648 fix(ci): plan only executable infra tests (openclaw#197911); 76385fd fix(models): discovered models become "Unknown model" after restart or an ended sign-in (openclaw#197784); 89d4177 fix(plugin-state): guarded calls fail until Gateway restart after an unknown write outcome (openclaw#197790); baca36e fix(sessions): commit selected invitations with original messages (openclaw#184512); 699e538 fix(sessions): drain passive notices on sessions_send resumes; d6ded18 chore(ci): drop retired test-lines allocation records (2/3) (openclaw#197656); e0dd020 fix(agents): collect process results at suspended-run capacity; 4897740 feat(auth): preserve delegated OCE user profiles and permissions (openclaw#196856); 7197ce1 feat(templates): install bundled plugins through native management (openclaw#196349); 9c6ee9b feat: let Template automations start paused for onboarding (openclaw#196323); 79a6214 fix(message): retain local final replies in conversation history (openclaw#187795); caa978c feat(templates): open durable chat before verified setup (openclaw#196392); 78e73aa fix(sessions): cold PostgreSQL conversations fail after idle readers close (openclaw#189991); b6ed907 perf(sessions): persist active transcript facts for hydration (openclaw#193682); 1595dd2 feat(plugins): reauthorize accepted session work (openclaw#176886); b43ad0a fix(models): avoid reloading plugins on catalog refresh (openclaw#193903); 0947d02 fix(ci): avoid unrelated PostgreSQL runs and admit owned tests (openclaw#193870); 428ca7d feat(openclaw-id): add Gateway membership authority and publication behind the Labs flag (openclaw#192335); c718583 fix(update): repair refuses forever after a verified update fails a later step (openclaw#193132); 3f64174 fix: deliver background replies after a reload retires the turn registry (openclaw#193130); 982f3b1 fix(imessage): report Automation failures after Gateway updates (openclaw#186117); 31b28e9 fix(agents): wait for a peer OAuth refresh before failing request auth (openclaw#192906); cf50d4a feat(storage): support read-only PostgreSQL standby inspection (openclaw#192645); 82fd4e6 fix(agents): retain stale session target refusal reasons (openclaw#192681); 8ac4e19 fix(worktrees): reserve capacity on PostgreSQL (openclaw#192537); 718b349 fix: reduce session startup stalls under storage contention; 08f4a19 refactor(skills): move Skill Workshop into its bundled plugin (openclaw#192471); 837402a fix(clawrouter): keep upstream credit failures off the shared key (openclaw#192575); f38495f fix(plugins): reject late routing from canceled runs (openclaw#192492); dc5d61a improve(sessions): reduce unnecessary maintenance query rows (openclaw#192023); c4bf0dc fix(sessions): avoid extra maintenance scans for embedded archives (openclaw#184507); e44b3d6 fix(team-reports): recover after database connection loss (openclaw#192020); 991fb33 fix(logbook): recover after database connection loss (openclaw#192011); e6d0d2e fix(test): include omitted PostgreSQL conformance suites (openclaw#191962); da5ff0f fix(codex): reject native hooks from a previous run (openclaw#191788); 09f0b0b feat(plugins): add skill usage runtime for plugins (openclaw#191661); 00b2ff4 fix: parent sessions miss child approvals with a custom session store (openclaw#189827); be44b10 fix: stop completed session writes retaining request data (openclaw#191197); d40aa7c fix(sessions): replay creation requests across Gateway restarts (openclaw#190862); d894035 fix: await Doctor shared-state repair preparation (openclaw#190875); b515cc7 feat: fork threaded conversations with Telegram support (openclaw#190783); def6349 feat(plugins): plugins can run a hidden forked turn of a session with their own tools (openclaw#190950); d983e34 feat(plugins): plugin commands can continue the agent with a replacement prompt, on every channel (openclaw#190908); ea3f0b8 fix(ci): provision Node test prerequisites and retain Baseten routing (openclaw#191050); 29503e1 fix(update): Gateway stays stopped after the updater process dies mid-update (openclaw#188497); fc8c2d0 fix(update): preserve unfinished handoff artifacts (openclaw#190571); 7c26e8c fix(ci): cover PostgreSQL managed update handoffs (openclaw#190336); 4913d41 fix(ci): prevent truncated PostgreSQL target listings (openclaw#189509); 8925f62 fix(gateway): start restored PostgreSQL homes on the first attempt (openclaw#190291); 177fe32 feat(models): preserve inference capabilities in opt-in catalog v3 (openclaw#189678); 7faf32d feat: retain repository disk authority through recovery (openclaw#189106); a658df3 feat(database): capture externally quiesced SQLite migrations; 0f9e7f7 feat(database): capture exact SQLite migration capsules; 4fb684e feat(backup): add PostgreSQL local companion checkpoints; c89a101 fix(doctor): migrate auth profiles on PostgreSQL stores (openclaw#189639); 799de09 fix(ci): split oversized workspace and setup files (openclaw#189356); 21ee847 fix(acp): keep completed run conversations resumable (openclaw#189273); fce0e56 perf(sessions): open cold history without restoring archives (schema 39) (openclaw#188397)

Validation: Baseline1 NUL-binding assertion failure/21passing; candidate22/22passes (188693-green.log). Real SQLite Doctor path and generated SQL proved; no native PostgreSQL server execution claimed.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 0895146d8c1493146f5c6461eee0b10c329bdd1e)
(cherry picked from commit f8ccaa70bc9773d6bbb569bc0e275eee0c544ead)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts 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.

1 participant