Skip to content

fix: let the next update settle a package publication that a killed update left behind - #200550

Merged
fuller-stack-dev merged 8 commits into
openclaw:mainfrom
fuller-stack-dev:fix/update-settle-leftover-publication
Nov 17, 2026
Merged

fuller-stack-dev merged 8 commits into
openclaw:mainfrom
fuller-stack-dev:fix/update-settle-leftover-publication

Conversation

@fuller-stack-dev

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

Copy link
Copy Markdown
Member

Related: #200460

What Problem This Solves

If openclaw update is killed while it installs the new npm package (a closed terminal, an OOM kill, a crash), its publication journal stays behind. The installed package keeps working since #200460, but the next openclaw update and openclaw update repair both refused with Package publication is incomplete until someone ran a printed recovery command with a recorded external runtime. One killed update blocked every later update, and repair could not help.

User Impact

The next openclaw update or openclaw update repair now settles the leftover publication itself:

  • Killed before the new package was installed: the publication is aborted and the installed package is kept.
  • Killed after the new package was installed: unchanged, it is verified and kept (this already worked).
  • No package installed (only possible without an atomic exchange): the recorded new package is published into the gap.

The update prints what it settled and records it as a package-publication-recovery warning step in its result and run history. update repair records a settlement entry under the operation ID.

What still needs a person, measured in a real installed package: after this change the next openclaw update settles the publication and then stops at a second, separate check, Update <id> has unfinished recovery; reconcile it before starting another update, because the killed update run itself is unreconciled. One openclaw update repair clears it (repair now succeeds in one pass, where it refused before), and updates work again. That check lives in the update-run recovery admission, which this PR does not change. So the manual work goes from "printed external-runtime command, then repair" to "one openclaw update repair"; it is not zero yet.

It still refuses, with the reason and a next step, when:

  • another updater or its helper still holds the installation (wait, then retry);
  • the update lease store is gone or was replaced, for example after a reboot that cleared the temporary directory. The message now names the reinstall that supersedes the operation; before, it only said Run openclaw update repair, which refuses the same way, as does the printed command;
  • the installed package or a launcher no longer matches what the journal recorded (the message now says so and names the reinstall);
  • a rollback is in progress;
  • a different OpenClaw build wrote the journal (unchanged message with the recovery command);
  • update repair already holds a reclaimed handoff or cancelled-update claim for the installation (unchanged: it reports the recovery command). Since fix: recover older update handoffs during repair #200532 that claim is taken in the journal's lease store, so resuming under it could be made sound by passing the store identity along with the claim. This PR does not do that.

No journal field, journal version, SQLite schema, config option, wire protocol, or dependency changes.

Why This Change Was Made

Settlement already handled an untouched preparation and an installed candidate, and left "a publication that still needs file changes" to the printed command (#181307) so that nothing would be republished beneath a running Gateway. A kill between journal publication and the exchange lands in that third case, although the only file changes it needs are inside the journal's own recovery directory.

The settlement owner (settlePendingPackageActivation, shared by update and update repair) now first brings such a publication to rest with the recovery the printed command runs (the publication owner's publish(true)), then closes the aborted or published operation through the existing settlement, under one claim. It adds no second reading of the recovery directory layout. It resumes only when all of this holds:

  • The original updater is provably gone. It claims the installation in the recorded lease store through the existing update executor, which succeeds only when the recorded updater and helper processes are dead. A caller-supplied claim never resumes, because nothing shows it lives in the recorded store.
  • The lease store is the recorded one. A missing or replaced store keeps refusing.
  • No installed package is replaced. Either the untouched previous package is installed, or none is.
  • The journal still names this installation (no remount mapping).
  • This build sealed the recorded recovery helper, so the code that resumes is byte-for-byte what the printed command would run.

Everything the publication owner already refuses (changed package, changed launcher, ambiguous roles, unknown artifacts) still refuses; the refusal now carries the operation ID, a step that works, and the cause.

To stay under the 700-line cap of package-update-activation.ts, the lease inspection moved unchanged to package-update-activation-settlement.ts, and the new decision and messages live in package-update-activation-prepare.ts beside the recovery-command resolution whose helper lookup they share.

Version compatibility

  • An older installed version meets a publication this code left. Nothing new is written: journal, layout, and settlement reasons are the ones older readers already know. An older updater behaves as it does today: it settles an installed candidate or an untouched preparation, and otherwise refuses with the printed command, which runs this build's sealed helper.
  • This code meets a publication an older version left. If the older version is still installed, it runs first and this code is not involved. If this code is the installed candidate, the existing verified settlement applies, unchanged. In any other arrangement the helper-build check fails, so this code does not resume and reports the printed command, as before.
  • The installed updater cannot be patched, so the first update after a kill benefits only when the installed (previous) version already contains this change.

Evidence

Kill sweep through the real entry points

The existing kill sweep runs the real publication owner in a child process and SIGKILLs it after every boundary. Each killed installation then got the start of the next openclaw update (prepareUpdateCommand: automatic settlement, then admission) twice, the update repair CLI, and the printed command's recovery. macOS, exchange tool osascript. Base measured at f41651d3acb (journal sweep fixture given a published-style candidate with its dist inventory); the branch was cut from 96763b979fe, and later main movement did not touch these files.

Original updater dead, lease store intact, with an exchange tool (37 boundaries):

Killed after Journal Path serves Next openclaw update, base update repair, base Printed command Next update and repair, this branch
1-8: before the journal is published none previous proceeds proceeds none printed proceeds
9-21: journal published, files moving into the recovery directory preparing previous refuses Package publication is incomplete refuses, same aborts, retires settles: aborted, previous kept
22-27: prepared, untouched prepared previous settles (publication-not-started) settles aborts, retires unchanged
28-30: publish intent recorded; candidate under its own name, then waiting under previous publishing, intent publish previous refuses, same refuses, same aborts, retires settles: aborted, previous kept
31-37: exchange done, launchers, completion publishing to publication-complete candidate settles (verified candidate) settles completes, retires unchanged

Without an exchange tool (41 boundaries) rows 1-27 and the installed-candidate rows are the same, and:

Killed after Journal Path serves Next openclaw update, base update repair, base Printed command This branch
28-32: publish intent, return of the candidate, displacement intent publishing previous refuses refuses aborts, retires settles: aborted, previous kept
33-34: old package moved out, candidate not yet in publishing nothing fails with a raw ENOENT fails, same publishes, retires publishes the candidate, verifies it, settles

On this branch the second update in every row finds nothing to settle and nothing to refuse. Rows 33-34 are reachable only by an update process that does not run from that installation; openclaw cannot start there.

Rows that must still refuse (candidate waiting under previous unless noted):

Condition Base This branch
Original updater still running (stalled at the boundary), all 29 journaled boundaries refuses; in the preparing and publish-intent rows with Package publication is incomplete, naming a recovery command that itself refuses refuses everywhere with Another update executor owns this installation ... retry openclaw update repair in a moment; nothing on disk changes
Executor dead, the lease row's helper still alive, all 29 same as above same as above
Lease store removed or replaced, all 29 preparing and publish-intent rows refuse with lease database identity changed ... Run openclaw update repair; repair and the printed command refuse the same way same rows refuse; the message adds the reinstall, after which the next update retires the operation. Untouched preparation and installed-candidate rows settle as before
Installed package edited Package publication is incomplete Package publication <id> cannot be resumed ... Cause: Package publication object changed
Launcher replaced Package publication is incomplete ... cannot be resumed ... Cause: Package launcher changed outside its publication intent
Rollback in progress Package restoration is unfinished unchanged
Journal sealed by another build Package publication is incomplete with the recovery command unchanged
Settlement under a claim the caller already holds Package publication is incomplete unchanged

A replaced installation (a manual reinstall) is not a refusal, before or after: its stale journal is retired with the evidence kept.

Real installed package, Linux container

A scratch variant of the package-installed-recovery Docker cell (packed build installed with npm, Node 24, arm64) kills a real openclaw update right after the candidate takes the name previous, then runs the public commands.

Step Base This branch
next openclaw update exit 1, Package publication is incomplete prints Settled previous package update <id> (publication-not-started) ... is aborted: the installed package is kept ...; journal complete; then exit 1, Update <id> has unfinished recovery; reconcile it before starting another update.
openclaw update repair exit 1, Package publication is incomplete exit 0, coreUpdate: completed
openclaw update after repair exit 1 exit 0, new version installed
a further update exit 1 exit 0
openclaw update repair as the first command after the kill exit 1 exit 0, journal complete; the following two updates exit 0

Tests

Head afbaf028d62. Runs name the commit they ran on; later commits are a test-fixture fix, a docs wording change, and merges of main.

  • New src/cli/update-cli/update-command-publication-kill.process.test.ts, 12 cases: the every-boundary sweep through prepareUpdateCommand (settles, second update idempotent, launcher still starts the served package); the three no-tool boundaries including the missing package; update repair through the CLI with its run-history record; the dry-run preview; a lost lease store (removed and replaced) followed by the reinstall the message names; settlement under a caller's claim; and five controls (live updater, edited package, replaced launcher, rollback, another build). Against base production code 9 of the 12 cases fail, the sweep at the first journaled boundary with Package publication is incomplete; the caller's-claim, rollback and other-build controls pass on both, as intended, because those refusals did not change.
  • update-command-target-settlement.test.ts: one case that the step from admission reaches run history before the first target decision. Fails with the base update-command-target.ts.
  • Affected suites on 960bda59ed0 (this branch merged with main including fix: recover older update handoffs during repair #200532, which touched the same settlement file): 22 infra files, 415 tests, and 13 CLI files, 277 tests, all pass, plus update-repair-handoff.test.ts from fix: recover older update handoffs during repair #200532. On afbaf028d62 (one more unrelated main merge and a docs wording commit): the new file, 12 tests on Bun, and update-repair-handoff.test.ts.
  • pnpm tsgo:all and the session-identity, test-lines (+397 of 400) and max-lines checks pass on afbaf028d62. OPENCLAW_CHECK_CHANGED_SKIP_DEADCODE=1 node scripts/check-changed.mjs, the mock-export check, eager-import-closure and update-restart-module-outcome passed on 13e34c3cccd, before the fixture and docs commits.
  • First CI round, on 42225b76677: one real failure, checks-node-changed-compact-small-12. The launcher control in the new test unlinked the launcher and created it again; Linux reused the freed inode, so the launcher's recorded identity was unchanged and the update correctly resumed. The control now keeps the old link under another name. That was a fixture defect, not a product one.
  • Cost: the new file takes about 36 s of test time (--maxWorkers=1, 76 s wall with a cold compiled-subprocess generation); 23 s of that is the sweep. It stays a full sweep because the property is "no boundary leaves the next update refusing", and the earlier fix covered representative states and missed the ones between them. A new boundary in the publication now fails this test instead of shipping as a refusal.

Test audit (whole files): the new test and package-update-kill-sweep.test-support.ts (the kill-sweep helpers, moved out of package-update-release-switch.process.test.ts unchanged so both suites share it); package-update-release-switch.process.test.ts (no case or assertion changed, one stale comment corrected); its child fixture (the journal candidate now carries its module type and dist inventory, as a published package does); package-update-publication-boundary.test.ts (one expectation changed: with its updater alive, settlement now refuses with Another update executor owns this installation instead of incomplete, which is the behavior change, not a weaker assertion); update-command-target-settlement.test.ts; test/scripts/upgrade-survivor-installed-recovery.test.ts. Nothing was pruned: no dead or redundant case turned up in them.

package-installed-recovery Docker lane

Run locally for the partial-previous cut.

  • Lane bug, fixed here (second commit). On 96763b979fe the lane fails at its first tree comparison: Package tree changed: ".": mode 755 -> 755 (expected 700) ... (46815 field differences). Recovery has kept group/other read and execute access since fix(update): keep restored npm packages readable by non-root services #193272; the lane still expected owner-only modes. With the expectation and its unit tests aligned, the cut passes displacement, status, both repairs, the interrupted retirement, its resume, and archival.
  • Product gap, not fixed here. The cut then fails at its last step on both base and this branch: the final openclaw update exits 1 with Update <id> has unfinished recovery; reconcile it before starting another update. This is the update-run recovery admission refusing while the killed run is unreconciled, the same check as in the table above. The lane's expectation (the next update just works) matches the "updates always work" rule, so the lane is right and stays red until that admission reconciles a dead run itself.

One unit test in the lane's file, keeps shared evidence readable through restrictive umask, fails on this macOS host on base and on this branch alike (448 !== 1512, a setgid directory mode); it is unrelated.

Review

The repository's autoreview helper does not work on this machine. One fresh read-only reviewer agent reviewed the diff and the tests without the author's reasoning; this replaced autoreview. What it found and what was done:

  • A caller-supplied claim (repair's reclaimed handoff) could resume a publication without proof that the claim is in the recorded lease store: resumption under a caller's claim was removed, with a test.
  • The resume and the closing settlement used two claims: now one.
  • Refusals from the resume path lost their next step, and the lost-lease advice was appended to unrelated errors: both now build a new error, the second only for a missing or replaced store.
  • The dry-run preview promised a settlement it cannot verify: it now says so, a missing package is resumable only mid-publication, and a test covers it.
  • The settlement note could say "aborted" when a surviving exchange tool had published: it now follows the recovery's actual outcome.
  • Doc statements the code did not back were corrected.
  • The test-line budget and a missing mock annotation: fixed; the no-tool sweep became its three distinctive boundaries.
  • Noted, not changed: the warning step is only on stderr if the update is refused between admission and target preparation (the journal's own receipt remains); an EXDEV copy displacement is read as a replaced installation (already so before this change).

Not proven

  • Updates started by the Gateway (managed handoff). The reviewer's reading is that the handoff's own lease makes the child's settlement claim busy, for this settlement and the existing automatic ones alike. Not measured.
  • The EXDEV copy intents through the new entry (no test); a remounted installation (unchanged path, existing tests pass).
  • Linux was exercised only through the Docker probe and CI, Windows not at all (the journal is POSIX-only).
  • The update result carrying the warning end to end through a full openclaw update: covered in two halves (admission produces the step; target preparation records it).

Second independent run before landing. On 0ffc5d98176 (this branch with main merged in): pnpm tsgo:all passes; 7 files, 124 tests pass (update-command-publication-kill.process, update-command-target-settlement, package-update-publication-boundary, package-update-release-switch.process, package-update-activation-durability, package-update-activation-recovery-command, update-repair-handoff); the two restart/closure script tests, the session-identity ratchet and check-changed (dead code skipped) pass. upgrade-survivor-installed-recovery.test.ts case keeps shared evidence readable through restrictive umask fails on this macOS host on this branch and identically on main at c48b8293ae6. Head 6d471dac0fd adds a main merge of release-evidence tooling only; nothing was rerun locally for it.

An update killed between publishing its journal and installing the new
package left the next `openclaw update` and `openclaw update repair`
refusing with "Package publication is incomplete" until someone ran the
printed recovery command.

Settlement now first brings such a publication to rest with the recovery
that command runs, under a claim in the recorded lease store that proves
the original updater gone, then closes the aborted or published
operation through the existing settlement. It resumes only a journal
this build's own helper was sealed for, never replaces an installed
package, and never resumes under a caller-supplied claim. The update
records what it settled as a package-publication-recovery warning step.

Refusals that remain name their cause and a step that works: a lost
lease store and a changed installation now name the reinstall that
supersedes the operation.
Recovery keeps group/other read and execute access on retained package
contents and clears only write access (openclaw#193272). The installed recovery
lane still expected owner-only modes, so its first tree comparison
failed on every entry.
@clawsweeper

clawsweeper Bot commented Nov 17, 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 scripts Repository scripts size: XL labels Nov 17, 2026
Unlinking a link and creating it again can reuse the freed inode on
Linux, which leaves the launcher's recorded identity unchanged and the
publication legitimately resumable. The control now keeps the old link
under another name, so the new one always has a new identity.
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 17, 2026
@clawsweeper

clawsweeper Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

Lets update and repair settle eligible npm package publications left behind by a killed updater.

Example: An updater is killed with candidate 2026.12.1 waiting under previous while 2026.11.3 remains installed.

  • Before: Both update and repair refuse with Package publication is incomplete.
  • After: Settlement aborts the unpublished candidate and keeps 2026.11.3; one repair also reconciles the abandoned run so updates can proceed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful production recovery work, with an introduced Linux test failure preventing a clean validation verdict.
Proof confidence 🦐 gold shrimp (3/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 a killed npm update, both the next update and repair can refuse an unfinished publication even though the previous package still works.
Reason: The maintainer-authored direction removes an external-runtime recovery step while explicitly retaining the separate abandoned-run reconciliation boundary.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open: this maintainer-authored PR addresses a concrete recovery failure that current main still leaves unresolved.

Priority: P2
Reviewed head: 42225b766770000d22d4a5313be176f84d7aec18

Before merge

  • Allocate the replacement launcher before removing the original (P2) - Unlinking the launcher and immediately recreating the same symlink target allows Linux to reuse its inode. Recovery identifies launchers by device and inode, so this helper can leave the supposedly replaced launcher indistinguishable from the recorded original. Current-head CI demonstrates the consequence: the added “still refuses when a launcher changed” case resolves and settles instead of rejecting. Create a temporary replacement symlink while the original still exists, then rename it over the original so the control reliably exercises a different identity.
  • 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] Allocate the replacement launcher before removing the original — src/cli/update-cli/update-command-publication-kill.process.test.ts:139-140

Tests

  • Missing end-to-end proof: Supply terminal output for a v2026.11.4-to-this-build upgrade preserving existing settings and data, redacting IPs, keys, phone numbers, and non-public endpoints.
Agent review details

How this fits together

CLI update admission and repair consume the package-publication journal and executor lease, then invoke the existing publication owner to settle recovery and report its outcome.

flowchart TD
  A[Update or repair CLI] --> B[Activation settlement]
  B --> C[Recorded lease store]
  C --> D[Publication owner]
  D --> E[Installed package and journal]
  E --> F[Recovery receipt and output]
Loading

Technical review

Best possible solution:

Keep settlement with the existing recovery owners and construct the replacement launcher before renaming it over the original in the test fixture.

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

Current-main eligibility shows the incomplete-publication refusal, and the supplied base/head kill sweep and installed-package results identify the same path; no target code was executed during this review.

Is this the best way to solve the issue?

The production approach is appropriately narrow: eligible dead publications reach the existing publication and settlement owners while an installed package remains untouched.

Full review comments:

  • [P2] Allocate the replacement launcher before removing the original — src/cli/update-cli/update-command-publication-kill.process.test.ts:139-140
    Unlinking the launcher and immediately recreating the same symlink target allows Linux to reuse its inode. Recovery identifies launchers by device and inode, so this helper can leave the supposedly replaced launcher indistinguishable from the recorded original. Current-head CI demonstrates the consequence: the added “still refuses when a launcher changed” case resolves and settles instead of rejecting. Create a temporary replacement symlink while the original still exists, then rename it over the original so the control reliably exercises a different identity.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/cli/update-cli/update-command-publication-kill.process.test.ts --maxWorkers=1
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 0679b18 adds src/infra/package-update-activation.ts:348 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 0679b18b3d90; files: src/infra/package-update-activation.ts)
  • Jason (Json): Raw commit 413d9ee adds src/infra/package-update-release-switch.process.test.ts:423 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 413d9ee1ccd9; files: src/infra/package-update-release-switch.process.test.ts)
  • Vincent Koc: Raw commit 73bd213 adds scripts/e2e/lib/upgrade-survivor/installed-recovery-observations.mjs:83 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 73bd213041fe; files: scripts/e2e/lib/upgrade-survivor/installed-recovery-observations.mjs)

PR surface

Source +193, Tests +397, Docs +81, Other +1. Total +672 across 16 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 6 245 52 +193
Tests 7 568 171 +397
Docs 2 104 23 +81
Config 0 0 0 0
Generated 0 0 0 0
Other 1 4 3 +1
Total 16 921 249 +672

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.

Review metrics

Metric Value Why it matters
Production versus test growth Production +245/-52; tests and harnesses +572/-174. Production reuses existing recovery owners; test growth covers interruption and refusal boundaries and shares the existing kill-sweep scaffold.

Labels

Label changes:

  • add P2: A killed npm publication can block later updates, but the installed package remains usable and explicit recovery exists.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp 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: A killed npm publication can block later updates, but the installed package remains usable and explicit recovery exists.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp 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 17, 2026, 5:26 AM ET / 10:26 UTC.

@fuller-stack-dev
fuller-stack-dev enabled auto-merge (squash) November 17, 2026 11:19
@fuller-stack-dev
fuller-stack-dev merged commit 0ce9c77 into openclaw:main Nov 17, 2026
133 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the fix/update-settle-leftover-publication branch November 17, 2026 11:40
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 18, 2026
…pdate left behind (openclaw#200550)

* fix(update): settle a killed package publication on the next update

An update killed between publishing its journal and installing the new
package left the next `openclaw update` and `openclaw update repair`
refusing with "Package publication is incomplete" until someone ran the
printed recovery command.

Settlement now first brings such a publication to rest with the recovery
that command runs, under a claim in the recorded lease store that proves
the original updater gone, then closes the aborted or published
operation through the existing settlement. It resumes only a journal
this build's own helper was sealed for, never replaces an installed
package, and never resumes under a caller-supplied claim. The update
records what it settled as a package-publication-recovery warning step.

Refusals that remain name their cause and a step that works: a lost
lease store and a changed installation now name the reinstall that
supersedes the operation.

* fix(ci): expect readable package modes in the installed recovery lane

Recovery keeps group/other read and execute access on retained package
contents and clears only write access (openclaw#193272). The installed recovery
lane still expected owner-only modes, so its first tree comparison
failed on every entry.

* test(update): keep the replaced launcher's inode distinct

Unlinking a link and creating it again can reuse the freed inode on
Linux, which leaves the launcher's recorded identity unchanged and the
publication legitimately resumable. The control now keeps the old link
under another name, so the new one always has a new identity.

* docs(update): say what repair does with a publication under its own claim
RomneyDa added a commit that referenced this pull request Nov 19, 2026
…e publishing the package (#200460)

* fix(update): keep openclaw runnable when an npm update is killed while publishing the package

* test(update): avoid a shadowed name in the surviving exchange tool test

* test(update): keep the displacement refusal and manifest-read tests on their paths

(cherry picked from commit 413d9ee)

Companion disposition: #200273 and #200366 prerequisites included; #200532 and #200550 recovery companions follow. Release adaptation: none.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 156510063401de1ab38e8def5d0acfe381ef813f)
RomneyDa added a commit that referenced this pull request Nov 19, 2026
…pdate left behind (#200550)

* fix(update): settle a killed package publication on the next update

An update killed between publishing its journal and installing the new
package left the next `openclaw update` and `openclaw update repair`
refusing with "Package publication is incomplete" until someone ran the
printed recovery command.

Settlement now first brings such a publication to rest with the recovery
that command runs, under a claim in the recorded lease store that proves
the original updater gone, then closes the aborted or published
operation through the existing settlement. It resumes only a journal
this build's own helper was sealed for, never replaces an installed
package, and never resumes under a caller-supplied claim. The update
records what it settled as a package-publication-recovery warning step.

Refusals that remain name their cause and a step that works: a lost
lease store and a changed installation now name the reinstall that
supersedes the operation.

* fix(ci): expect readable package modes in the installed recovery lane

Recovery keeps group/other read and execute access on retained package
contents and clears only write access (#193272). The installed recovery
lane still expected owner-only modes, so its first tree comparison
failed on every entry.

* test(update): keep the replaced launcher's inode distinct

Unlinking a link and creating it again can reuse the freed inode on
Linux, which leaves the launcher's recorded identity unchanged and the
publication legitimately resumable. The control now keeps the old link
under another name, so the new one always has a new identity.

* docs(update): say what repair does with a publication under its own claim

(cherry picked from commit 0ce9c77)

Release adaptation: none. Companion disposition: update publication, custody, Doctor and best-effort maintenance fixes are ported together in dependency order; #200331 supplies the owed-step owner required by #200507/#200579.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 2dd257b6ce71507101c2563df56ff6662376ace0)
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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: XL 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