Skip to content

fix: let the next update finish a killed update after the machine restarted - #200994

Merged
fuller-stack-dev merged 4 commits into
openclaw:mainfrom
fuller-stack-dev:fix/update-settles-killed-update-after-reboot
Nov 18, 2026
Merged

fuller-stack-dev merged 4 commits into
openclaw:mainfrom
fuller-stack-dev:fix/update-settles-killed-update-after-reboot

Conversation

@fuller-stack-dev

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

Copy link
Copy Markdown
Member

What Problem This Solves

If openclaw update is killed and the machine then restarts, the next openclaw update refuses and tells you to run openclaw update repair. That happens even though the restart ended every process the killed update had started. The refusal exists because the proof the update relied on, a lease row in a temporary file, is gone after a restart.

User Impact

On Linux and macOS hosts, an update killed by a crash or power loss before a reboot no longer needs a manual repair. The next openclaw update settles what the killed update left and continues. Windows, containers, and updates that were killed while running an older version keep today's refusal.

Why This Change Was Made

When an update adopts its run, it now also records the boot it runs in: platform, kernel boot ID, Linux PID namespace, and a digest of the machine identity. That is the existing captureNamespacedStateLeaseProcessOwner().namespace value. It is stored as an optional namespace key on origin.driver and on each origin.previousDrivers entry. When the next update finds the lease row gone, it settles the killed run only if all of the following hold:

  • the run has no driver:identity-unavailable step and no managed handoff;
  • every recorded driver has a namespace from this same host, with the same non-null machine identity, on the same platform, from a different boot;
  • the platform is Linux or macOS, and on Linux both the recorded driver and this process are in the host's initial PID namespace;
  • the run's last write predates the current boot. A cloned machine that shares the host name, machine identity and state directory has its own boot, and its live updater keeps writing.

The installation is still claimed the normal way, the claim must land in the same lease store path, and the drivers are checked again under the claim. Every other #200680/#200866 condition is unchanged, including the recorded-exit check and the store identity comparison on the lease path.

Storage: this is additive JSON in update_runs.origin_json. There is no table, column, schema version, or migration change. The maintainer approved this field before implementation, as docs/reference/database-schemas/storage-changes.md (review checkpoint) asks; it follows the additive driver-metadata precedent in docs/reference/database-schemas/layout.md (the origin.driver paragraph, now extended).

  • The origin and driver schemas are non-strict, so older readers drop the key: src/infra/update-run-driver-schema.ts:3 (z.object) and src/infra/update-run-schema.ts:225/:234 at v2026.11.5, and the same on main.
  • Lease payload schemas are strict (src/infra/update-managed-service-handoff-schema.ts:11 processIdentitySchema and :137 currentPayloadSchema, same at v2026.11.5). The namespace never reaches them: recordedUpdateRunDrivers now returns plain process identities for every lease, recovery, interruption and backup caller, and the managed-handoff helper entry stays plain.
  • The public run record uses a closed driver (packages/gateway-protocol/src/schema/update-runs.ts:27), so toPublicUpdateRun strips the key.
  • Origin byte budget: with eight maximally escaped drivers, the namespaces would push admission identities and routing out of the 16 KiB origin. The codec now drops namespaces first in that case, so a run without them simply keeps today's repair path.

Update behavior: the installed updater runs first and cannot be patched. On the first update from a published version, the killed run was recorded by old code without a namespace, so nothing changes: it still refuses after a restart until a run recorded by this code is killed. A downgraded or older reader drops the key when parsing, and if it rewrites the run the namespaces are lost, so that run falls back to the refusal. A downgrade never reads the namespace as authority.

Not covered: a reboot in the middle of package publication still refuses through package settlement's own lease-store rule, which this PR does not change. Git-checkout behavior is untouched.

Evidence

The killed-run process test now starts each restart case from a real child updater killed with SIGKILL. It removes the lease store the way a restart clears the temporary directory, then rewrites the run's recorded driver boot to an earlier one. The current process's namespace and uptime are injected at their readers. The decision code is not mocked. The test also asserts that the killed child recorded its own real boot namespace.

  • Red on base d4195774b99: both new positive cases (Linux and macOS) refused with "The update lease store no longer holds that update's lease" (3 failed | 40 passed; the third failure was a control whose expected refusal I then corrected).
  • Green on the fix: both positive cases settle the recovery, roll back the dead run's config change, and proceed.
  • Controls that still refuse, each asserting the refusal text, that the update did not proceed, and that the reserved recovery, run status and config bytes are unchanged:
    • the same boot with the lease gone;
    • a run from an older version without a namespace, or with a null namespace;
    • a null machine identity, or a different machine identity;
    • a non-initial Linux PID namespace for this process, and for the recorded driver;
    • a managed handoff;
    • a driver:identity-unavailable step;
    • one of several drivers without a namespace, or recorded in the current boot;
    • another platform;
    • run activity after this boot began.
  • update-run-abandonment.test.ts: adoption records the namespace, keeps earlier drivers' namespaces, keeps them out of recordedUpdateRunDrivers, and strips them from the public record (checked against the wire schema).
  • update-run-ledger.test.ts: with eight maximal drivers carrying maximal namespaces, admission identities and routing are kept and the namespaces are dropped.
Commands
  • node scripts/run-vitest.mjs src/cli/update-cli/update-command-killed-run.process.test.ts on e4b80179501: 47 passed
  • node scripts/run-vitest.mjs src/infra/update-run-abandonment.test.ts src/infra/update-run-ledger.test.ts src/infra/update-run-capture-receipts.test.ts src/infra/update-run-ledger.compaction.test.ts: 73 passed
  • node scripts/run-vitest.mjs test/scripts/update-restart-module-outcome.test.ts test/scripts/eager-import-closure.test.ts: 24 passed
  • pnpm tsgo:all, pnpm check:baseline-ratchets --base d4195774b99 --no-merge-base (all ok, including session-identity and test-lines), pnpm check:docs, git diff --check
  • 17 sibling update, Doctor-maintenance and Gateway update suites (update-command-migrated, update-repair-command, update-finalization-lifecycle, doctor-update-schema-guard, update-status and others), plus update-command-install-layout.test.ts: 437 passed, 1 skipped
  • CI on 512cdd5d11e: all checks pass
  • node scripts/check-changed.mjs: all lanes ok except the dead-export scan, which reports exports in src/plugins/plugin-metrics.ts, src/auto-reply/reply/session-event-delivery.ts and src/sessions/session-controller-model.test-support.ts that this PR does not touch

Review: one independent reviewer read the diff without my conclusions. It found no critical or high defects. I applied its findings: the cloned-machine case is now refused by the last-activity check, the claim on the restart path must use the same store path, an unrecognized captured namespace records as unknown instead of failing adoption, the codec comment was corrected, and controls were added. CI then caught that the plain-identity helper pulled zod into Control UI boot bundles; it now lives in the zod-free run record module. CI also showed that update-command-install-layout.test.ts built its expected printed run from the stored origin; it now expects the driver without its namespace and asserts that the printed JSON carries none. The autoreview helper does not run on this machine, so it was not used.

…arts

The next openclaw update settled a killed update's plugin recovery only while the
temporary update lease store still held the dead updater's lease. A restart clears
that store, so the update refused and named repair even though every process of
the earlier boot was gone.

Adoption now records each driver's boot namespace on the run (additive origin
JSON). When the lease row is gone, the update settles the recovery only if every
recorded driver ran on this same identified Linux or macOS host in an earlier
boot, outside containers, then claims the installation as before.
… lease store path

A clone that shares the host name, machine identity and state directory boots on
its own, so the restart rule also requires the run's last write to predate the
current boot. The claim after a restart must land in the same lease store path, an
unrecognized captured namespace records as unknown instead of failing adoption, and
the codec comment states what yields first.
@clawsweeper

clawsweeper Bot commented Nov 18, 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 cli CLI command changes size: M labels Nov 18, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 18, 2026
…ndles

toPublicUpdateRun runs in the Control UI, so the plain-identity projection lives in the zod-free update run record module instead of beside the driver schema.
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 18, 2026
@clawsweeper

clawsweeper Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR records updater boot identities so the next update can settle interrupted recovery after a Linux or macOS host restart.

Example: A Linux package updater is killed after reserving plugin recovery, then the host restarts and clears the temporary lease store.

  • Before: The next openclaw update refuses and requests openclaw update repair.
  • After: When every recorded driver belongs to an earlier boot of the same identified host, the next update claims the installation, settles recovery, and continues.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The recovery design is useful and focused, but an existing consumer test fails and installed restart and upgrade evidence is outstanding for the new update_runs.origin_json driver metadata.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: After an updater dies and the host restarts, another update requires manual repair even though the earlier boot's processes cannot survive.
Reason: The maintainer-authored direction removes an avoidable recovery command while preserving existing refusals for unsupported or unidentifiable histories.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep this maintainer-authored PR open: it addresses a remaining recovery case on main, but introduces a confirmed failure in an existing CLI-output test.

Priority: P2
Reviewed head: e4b801795017ec2463869f8c3acc21bd520205fa

Before merge

  • Update the existing CLI assertion for private driver metadata (P2) - Adoption now persists driver.namespace, and toPublicUpdateRun correctly strips it. This existing assertion copies the raw stored origin and removes only windowsUserSid, so both unmanaged-install cases now demand namespace in public output. Exact-head CI confirms both failures in checks-node-changed-compact-small-11: https://github.com/openclaw/openclaw/actions/runs/44239791796/job/134585342512. Update the expected public driver identities to contain only host, pid, and startIdentity; retain the production projection that keeps namespaces private.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

  • [P2] Update the existing CLI assertion for private driver metadata — src/cli/update-cli/update-command-install-layout.test.ts:126-128

Tests

  • Missing end-to-end proof: Provide redacted installed-CLI output showing recovery after a real host restart, plus fresh-install and latest-stable upgrade results with settings and history intact; redact IPs, API keys, phone numbers, and non-public endpoints.
Agent review details

How this fits together

The update CLI combines persisted run history, host process identity, and installation leases to decide whether existing plugin recovery can safely finish before another update starts.

flowchart TD
  A[Update CLI] --> B[Interrupted recovery inspection]
  C[Persisted update run] --> B
  D[Host boot identity] --> B
  B --> E[Installation lease claim]
  E --> F[Existing recovery settlement]
  F --> G[Continue update]
Loading

Technical review

Best possible solution:

Keep boot evidence in the existing run ledger and reuse existing recovery settlement, with public driver identities unchanged.

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

Current main explicitly refuses when the recorded lease is absent; the author reports matching red/green process tests, which this read-only review did not execute.

Is this the best way to solve the issue?

The fix uses the existing boot-identity producer, ledger, lease claim, and settlement owner; its bounded private metadata and public projection serve the stated recovery case without a competing recovery implementation.

Full review comments:

  • [P2] Update the existing CLI assertion for private driver metadata — src/cli/update-cli/update-command-install-layout.test.ts:126-128
    Adoption now persists driver.namespace, and toPublicUpdateRun correctly strips it. This existing assertion copies the raw stored origin and removes only windowsUserSid, so both unmanaged-install cases now demand namespace in public output. Exact-head CI confirms both failures in checks-node-changed-compact-small-11: https://github.com/openclaw/openclaw/actions/runs/44239791796/job/134585342512. Update the expected public driver identities to contain only host, pid, and startIdentity; retain the production projection that keeps namespaces private.
    Confidence: 1

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Automatic interrupted-update admission changes intended behavior with a stated reason (23fca1a: The matching lease proved that the dead updater's child processes were gone before automatic settlement.)
  • Driver adoption and abandonment keeps the original intent (7f9bf1d: Recorded process identities and retained drivers prevent reconciliation from treating live or unobservable update work as abandoned.)
  • Recovery metadata and public projection keeps the original intent (44b5df1: Operational recovery facts must survive ledger rewrites while private fields remain outside public history and JSON.)
  • Admission identity budget keeps the original intent (acffa76: Admission identities and routing must remain usable within the bounded origin record.)
  • Namespaced process ownership keeps the original intent (a11879c: Durable process custody distinguishes kernel and PID namespaces rather than assuming a PID identifies work across restarts.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/cli/update-cli/update-command-install-layout.test.ts --maxWorkers=1
  • pnpm test src/infra/update-run-abandonment.test.ts --maxWorkers=1
  • git diff --check

What I checked:

Likely related people:

  • Jason (Json): Raw commit 23fca1a adds src/cli/update-cli/update-plugin-cohort-settlement.ts:228 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 23fca1a96393; files: src/cli/update-cli/update-plugin-cohort-settlement.ts)
  • Peter Steinberger: Raw commit 7f9bf1d adds src/infra/update-run-ledger.ts:204 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7f9bf1d79aef; files: src/infra/update-run-ledger.ts)
  • Josh Avant: Raw commit a11879c adds src/infra/state-lease-process-owner.ts:101 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: a11879cd40f6; files: src/infra/state-lease-process-owner.ts)

PR surface

Source +183, Tests +193, Docs +21. Total +397 across 16 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 9 207 24 +183
Tests 3 197 4 +193
Docs 4 29 8 +21
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 16 433 36 +397

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 P2: This improves recovery after an interrupted command-line update and host restart; manual repair remains available.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: This improves recovery after an interrupted command-line update and host restart; manual repair remains available.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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 18, 2026, 12:08 AM ET / 05:08 UTC.

@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Landing review on 512cdd5d11e.

ClawSweeper's two items:

  • The install-layout assertion was fixed in 512cdd5d11e. CI on this head is green.
  • Data-model compatibility: runs stored before this change, without namespace or with null, still load and keep today's refusal. The process-test controls "an older version recorded the run without its boot" and "the run recorded that its boot was unknown" cover this. Going the other way, v2026.11.5 parses origin.driver and previousDrivers with non-strict z.object (src/infra/update-run-driver-schema.ts:3, src/infra/update-run-schema.ts), so published readers drop the key. The namespace never reaches strict lease payloads or the closed wire driver; update-run-abandonment.test.ts checks the public record against the wire schema.

Extra local check: with os.uptime() throwing on the restart path, the inspection fails and the update refuses with admission's own "has unfinished recovery". No update proceeds, and the reserved recovery and config stay unchanged. I ran this as a temporary control in update-command-killed-run.process.test.ts; it passed and was not committed.

Not proven: a real host restart. Boot identity and uptime are injected at their readers.

@fuller-stack-dev
fuller-stack-dev merged commit d905d8a into openclaw:main Nov 18, 2026
136 checks passed
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

@fuller-stack-dev
fuller-stack-dev deleted the fix/update-settles-killed-update-after-reboot branch November 18, 2026 06:05
fuller-stack-dev added a commit to fuller-stack-dev/openclaw that referenced this pull request Nov 18, 2026
Keep both openclaw#200994's restart rule and this branch's checkout gates in
inspectInterruptedUpdateRecovery, and strip gitActivation beside the
driver namespaces in toPublicUpdateRun. A killed checkout update after a
reboot settles only when both proofs hold; tests cover it and the origin
codec keeping gitActivation exact when namespaces yield.
RomneyDa added a commit that referenced this pull request Nov 18, 2026
* fix(update): include cold archives in candidate snapshots

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

* fix(update): preserve file archives in rehearsal snapshots

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

* fix(update): preserve source WAL state during archive inventory

Classify cold archive SQL under its existing candidate-state subprocess owner. Preserve incomplete WAL source families so header inspection retains private cleanup custody.

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

---------

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

Release adaptation: the baseline does not contain the #195487 header-cleanup
suite. Keep that unrelated suite absent; carry the new incomplete-WAL inventory
assertions into the existing inventory suite instead. Add a per-change 214-line
allocation for the source regression, chunk fallback, and WAL preservation tests.
No schema, updater protocol, authority, or archive-integrity changes.

Companion audit at 9e917f0:
- #200733 is selected as the next dependency-closure repair: missing archives
  must warn instead of blocking updates, and Windows copies must not share live
  read-only inode attributes. Do not qualify this intermediate checkpoint alone.
- #200076 and #200930 are independent cold-history performance changes, not
  prerequisites for this snapshot repair.
- #201009, #200994, #200866, #200577, #200805, #200802, and #200732 overlap only
  adjacent update documentation and independent repair flows; not prerequisites.

Proof on base 309067b:
- New production-subprocess regression: 4/4 fail before, 4/4 pass after.
- Cold archives, chunks, and inventory: 31/31 pass after.
- Additional budget/cleanup/import siblings: 46/47 pass. Configured-cache
  containment fails identically on the unchanged base at budget.test.ts:737;
  retained as an independent failure, not weakened or repaired here.
- Targeted lint and format, documentation links, SQLite worker ratchet, and
  test-line ratchet pass. SQLite T1 counts remain 170; compatibility 15.
- Worker typecheck was blocked at dependency custody, without guard bypass.
  Parent canonical core typecheck, typed lint (five files), and formatting
  passed with its owned dependencies. Full installed-upgrade/FRV proof remains
  pending the assembled candidate, including selected companion #200733.

(cherry picked from commit 802e3f7)

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Proof recordings: base and merge

Terminal recordings of the killed-run process test this PR added, run again after merge on this Mac. Base uses the base this PR names for its red run, d4195774b99. Head/green uses the merge commit d905d8a6857. Each video shows its label, the exact SHA, the command, the raw output, the exit code and the final status. Idle gaps are capped at 1 s and playback is sped up 3x; nothing is re-typed.

Full raw logs are not attached yet because the artifact store rejected uploads; the excerpts below are not the complete record.

node scripts/run-vitest.mjs src/cli/update-cli/update-command-killed-run.process.test.ts

  • Base / red, at a precondition: product code at d4195774b99, with this test file copied unchanged from d905d8a6857. Result: 15 failed | 32 passed (47), exit 1. Both restart cases (Linux and macOS) and all 13 restart controls fail at the same line: expect(stored.driver.namespace).toEqual(expect.any(String)) receives undefined, because base never records the boot namespace of the updater that ran. Recording that namespace is part of this fix, and the merged test checks it before it removes the lease store. So this run shows base cannot carry the boot fact the restart decision needs. It does not show the refusal text the PR body quotes ("The update lease store no longer holds that update's lease"): the merged test stops before reaching it, and no log of that earlier red run was kept.
pr200994-process-base-red-d4195774b99.mp4
  • Head / green: d905d8a6857. Result: 47 passed (47), exit 0, including settles a run killed before a linux machine restarted, then proceeds and the darwin case.
pr200994-process-head-green-d905d8a6857.mp4
Excerpts from these runs
# base d4195774b99 (+ head test file)
FAIL ... > settles a run killed before a linux machine restarted, then proceeds
FAIL ... > settles a run killed before a darwin machine restarted, then proceeds
FAIL ... > still refuses when ... (13 restart controls)
AssertionError: expected undefined to deeply equal Any<String>
 ❯ src/cli/update-cli/update-command-killed-run.process.test.ts:476:39
    476|       expect(stored.driver.namespace).toEqual(expect.any(String));
      Tests  15 failed | 32 passed (47)
[test] failed 1 Vitest shard in 473.00s
[test] FAILED (exit 1)

# head/green d905d8a6857
 ✓ ... > settles a run killed before a linux machine restarted, then proceeds
 ✓ ... > settles a run killed before a darwin machine restarted, then proceeds
      Tests  47 passed (47)
[test] passed 1 Vitest shard in 356.14s
From the original run (not a new run)

Log kept from the proof run quoted in the PR body, with paths redacted. The SHA was not recorded in the log.

# unit/killed-run.green.log (published sha256 0c194eb648fce2915ca8269aff695b01aedb5716e6c61f2969267a6572b4d5af)
 ✓ ... > settles a run killed before a linux machine restarted, then proceeds
 ✓ ... > settles a run killed before a darwin machine restarted, then proceeds
      Tests  47 passed (47)
Manifest
Video Side SHA Command Result MP4 sha256
pr200994-process-base-red-d4195774b99.mp4 base / red (precondition) d4195774b99 + head test file node scripts/run-vitest.mjs src/cli/update-cli/update-command-killed-run.process.test.ts 15 failed / 32 passed, exit 1 62cdc39a7a2b377b10db9938974d8019951ec90383cffdebbb2ddc2304a54b48
pr200994-process-head-green-d905d8a6857.mp4 head / green d905d8a6857 same 47 passed, exit 0 6d002aac7c10d5f26cc049af2841acb4b854b1271204bcbaa5ec634f53a0cc62

Recorded with asciinema 3.2.1 in a 150x50 terminal and rendered with agg 1.9.0 and ffmpeg (idle capped at 1 s, 3x). Sanitizing: neutral working directory and prompt, and XDG_CACHE_HOME pointed at a neutral copy of the pinned Bun cache so serialized errors do not print a home path. Recorded output was checked for usernames, home paths, host names, emails and tokens; none were found, so no redaction was applied.

Not covered by these recordings: the base refusal text itself (see above), a real machine reboot (the test replaces the lease store and the recorded boot), and the ledger and abandonment unit tests named in the PR body.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 19, 2026
…tarted (openclaw#200994)

* fix(update): settle a killed update's recovery after the machine restarts

The next openclaw update settled a killed update's plugin recovery only while the
temporary update lease store still held the dead updater's lease. A restart clears
that store, so the update refused and named repair even though every process of
the earlier boot was gone.

Adoption now records each driver's boot namespace on the run (additive origin
JSON). When the lease row is gone, the update settles the recovery only if every
recorded driver ran on this same identified Linux or macOS host in an earlier
boot, outside containers, then claims the installation as before.

* fix(update): require the killed run to predate this boot and keep its lease store path

A clone that shares the host name, machine identity and state directory boots on
its own, so the restart rule also requires the run's last write to predate the
current boot. The claim after a restart must land in the same lease store path, an
unrecognized captured namespace records as unknown instead of failing adoption, and
the codec comment states what yields first.

* fix(update): keep the driver identity projection out of Control UI bundles

toPublicUpdateRun runs in the Control UI, so the plain-identity projection lives in the zod-free update run record module instead of beside the driver schema.

* test(update): expect the printed run without the driver's boot namespace
RomneyDa added a commit that referenced this pull request Nov 19, 2026
…tarted (#200994)

* fix(update): settle a killed update's recovery after the machine restarts

The next openclaw update settled a killed update's plugin recovery only while the
temporary update lease store still held the dead updater's lease. A restart clears
that store, so the update refused and named repair even though every process of
the earlier boot was gone.

Adoption now records each driver's boot namespace on the run (additive origin
JSON). When the lease row is gone, the update settles the recovery only if every
recorded driver ran on this same identified Linux or macOS host in an earlier
boot, outside containers, then claims the installation as before.

* fix(update): require the killed run to predate this boot and keep its lease store path

A clone that shares the host name, machine identity and state directory boots on
its own, so the restart rule also requires the run's last write to predate the
current boot. The claim after a restart must land in the same lease store path, an
unrecognized captured namespace records as unknown instead of failing adoption, and
the codec comment states what yields first.

* fix(update): keep the driver identity projection out of Control UI bundles

toPublicUpdateRun runs in the Control UI, so the plain-identity projection lives in the zod-free update run record module instead of beside the driver schema.

* test(update): expect the printed run without the driver's boot namespace

(cherry picked from commit d905d8a)

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant