Skip to content

fix: keep the resident launcher when reinstalling Gateway - #205655

Merged
obviyus merged 1 commit into
mainfrom
update-service-reinstall-owner
Nov 26, 2026
Merged

obviyus merged 1 commit into
mainfrom
update-service-reinstall-owner

Conversation

@obviyus

@obviyus obviyus commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #205617
Related: #204516, #204866

What Problem This Solves

After an update has converted an installation to resident releases, gateway install --force can replace the launcher with the current package's dist/index.js. The Gateway can still answer health checks, but its pending trial loses the resident ready/rollback owner. Reusing a checked durable CLI can bypass the launcher for the same reason.

User Impact

Ordinary Gateway installs and reinstalls keep the selected state directory's resident launcher, including a first pending trial whose previous version is still an unmodified npm package. Explicit retained-CLI recovery keeps precedence; separate node services, unowned npm installs, and supported legacy forwarding-package layouts keep their existing entries. No flag, schema, trial-format or protocol change.

Why This Change Was Made

The existing release ownership predicate already knows that a published release or v2 trial owns the installation. Move that unchanged predicate into the existing release store and use it in the service selector; retain the existing legacy forwarding-package probe. Delete the competing inference that an ordinary install must identify its owner only from the currently serving package.

A checked same-version durable copy now uses the same service-specific planned entry as a new durable install, rather than masquerading as an explicit recovery override. The raw-string durable reuse return and its unused path calculation are removed; retained recovery strings and node entry rules are unchanged. The shared install-plan composition remains unchanged.

An unreadable/malformed trial is not silently ignored by reinstall: the existing store reader fails visibly instead of guessing a different service owner. Launcher-file existence alone does not establish ownership.

Scoped tokei production code (seven touched production files, tests excluded): 2,495 → 2,498 (+3). No line-cap exemption or guard compression. The updating contract is updated.

Evidence

  • Pinned base: 90297095602f362f3af2353a6a718c6867dad203.
  • Red on base: AWS run_c1fd8b7dc8d3b4039c9990aa60d04f68. The real buildGatewayInstallPlan/argument builder returned npm dist/index.js instead of the launcher for the pending plain-npm fallback; checked Gateway durable reuse returned its durable dist/index.js instead of the launcher. Both expected assertions failed. Settled release, legacy forwarding, orphan-launcher and node controls passed (2 failed / 4 passed selected cases); no assertion or expectation was narrowed.
  • Green: AWS run_ddbc17a2ba58265e394c69f8bd77071d: 55 tests passed in four suites, production core types plus command/service test-project types passed, exact changed-file lint and test-line guard passed (+68 before formatting, allowance400). Two formatting-only repairs were captured from AWS oxfmt and applied exactly; no behavior/type rerun. Formatting passed in AWS run_40c90a984fcc254b4765ae94d92f4302.
  • Linux product gate PASSED: run_bac6c35b5f73cb91506fe10ff177aac8. Published10→head; ordinary gateway install --force without --wrapper wrote actual openclaw-launcher.mjs (native MainPID50978). Same prepared trial fc340ad2-4263-432e-8490-e478ba20e1f1 committed/succeeded (actual attempts2); authenticated serving connection reported2026.11.11-beta.1 and matching successor build, schema43 verified. Next public run da46ec0a-1ec1-46a5-9fce-1a5c5c1092b2 was admitted, packed/installed/maintained, and finished skipped/already-current rather than stuck active; no third release trial is claimed. The corrected fixture allows legitimate phase progress during install-and-start while pinning immutable trial identity. Native stop/uninstall and npm-config cleanup passed; exact AWS leasecbx_f402bce8b884 released with --wait, exit0.
  • Source qualification: product build/proof uses pre-format carrier 5a9b2d43e7533d0ff1af9ac7fbae29ade472b6fd. Its exact diff to PR head90e1fa0147 is only two formatting hunks: a test statement wrap and a Promise type-union wrap erased at build. Main accepted formatting-only equivalence for product bytes, not exact-source identity; no stamp rewriting or rebuild. No native result or trial was fabricated. Full facts/hashes/source capsules: direction-2026-11-24/UpdateOwner-reinstall-linux-receipt.json and UpdateOwner-reinstall-linux-artifacts/fresh-receipts.tgz.
  • CI GREEN on PR head90e1fa01479033ff1495ee671c5ea7e7c8f8d8ad. Exact-head local review complete: patch correct, security cleared, no findings, confidence0.88 (~/.cache/clawsweeper-local-review/90e1fa014790.md). The product-path gap noted at review is covered by the passing qualified native receipt above. No Windows/macOS proof claimed.

- Use the existing release owner for pending npm fallback and settled installs while preserving legacy forwarding and explicit recovery.
- Plan checked durable reuse through the same service-specific entry as install; remove its raw-string override.
- Prove both bugs red on base and 55 boundary/control assertions green on AWS; update the install contract.
@clawsweeper

clawsweeper Bot commented Nov 26, 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 commands Command implementations size: M labels Nov 26, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:other This issue has meaningful maintainer-visible impact outside the owned taxonomy. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 26, 2026
@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR preserves the resident launcher when reinstalling a converted Gateway or reusing a checked durable CLI.

Example: A converted Linux installation has its first pending release trial and runs openclaw gateway install --force.

  • Before: The service can select the original npm package's dist/index.js, bypassing launcher-owned trial activation.
  • After: The service selects git-install/openclaw-launcher.mjs from the selected state directory.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The implementation is focused and source-consistent, but required shipped-entry-point and upgrade proof remains incomplete.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Reinstalling a converted Gateway can bypass the component that activates, commits, and rolls back updates even while Gateway health checks succeed.
Reason: The collaborator-authored direction restores the documented installation-ownership contract through a focused repair.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it repairs concrete launcher-selection gaps that remain on main, preserves the existing recovery boundaries, and has no definite introduced defect.

Reviewed head: 90e1fa01479033ff1495ee671c5ea7e7c8f8d8ad

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Complete the recorded latest-stable Linux upgrade and ordinary reinstall without --wrapper, showing launcher ExecStart, successful subsequent trial commitment and serving, further update admission, and preserved settings/data; include checked durable reuse and redact sensitive values.
Agent review details

How this fits together

The daemon argument builder combines service options, retained or planned CLI entries, and installation ownership into the command persisted by native service installers.

flowchart TD
  A[Gateway install or repair] --> B[Shared install planner]
  C[Release slot and trial record] --> D[Release ownership predicate]
  B --> E[Daemon argument builder]
  D --> E
  E --> F[Native service definition]
  F --> G[Resident launcher]
  G --> H[Gateway release]
Loading

Technical review

Best possible solution:

Use the existing release ownership predicate for ordinary Gateway service selection and retain service-specific planned entries for checked durable reuse.

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

Source establishes both gaps: a pending trial with an unmodified npm fallback escapes the old ownership inference, and checked durable reuse becomes an explicit string that suppresses launcher selection; this read-only review ran no target code.

Is this the best way to solve the issue?

The patch uses existing owners, moves the predicate without changing its semantics, and preserves recovery, wrapper, node-service, and legacy-forwarding behavior without adding persistent state or configuration.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • State-selected resident launcher keeps the original intent (0fea252: Keep ordinary service installs with the selected state's resident owner while preserving explicit retained recovery precedence.)
  • Durable CLI reuse and planning keeps the original intent (3819dd1: Keep background services outside disposable runner caches and plan same-version service entries without installing during inspection.)
  • Release ownership predicate keeps the original intent (0fea252: A published release or v2 trial retains resident update ownership, including before first activation; the predicate is moved unchanged.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Ayaan Zaidi: Raw commit 0fea252 adds src/daemon/program-args.ts:270 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 0fea252c72db; files: src/daemon/program-args.ts)

PR surface

Source +2, Tests +71, Docs +2. Total +75 across 10 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 7 49 47 +2
Tests 2 112 41 +71
Docs 1 3 1 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 10 164 89 +75

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:

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

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

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

Reviewed November 25, 2026, 8:15 PM ET / November 26, 2026, 01:15 UTC.

@obviyus
obviyus merged commit b9d0210 into main Nov 26, 2026
186 checks passed
@obviyus
obviyus deleted the update-service-reinstall-owner branch November 26, 2026 01:45
@obviyus

obviyus commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator Author

Landed as b9d0210. Fixes #205617. After an installation has converted to the resident launcher, a plain openclaw gateway install --force now keeps the launcher as the service's start command, instead of pointing the service at the Git install's dist/index.js. Before this, reinstalling the service silently dropped the launcher and its rollback. An explicit --restore-service-cli still takes precedence. Proof: the boundary tests failed on main and pass here. On Linux (run_bac6c35b5f73cb91506fe10ff177aac8), an update from 2026.11.10 followed by a plain --force reinstall without --wrapper kept the launcher, the same trial committed, and the next update was admitted and served. That run used the formatting-only predecessor 5a9b2d43e7. CI is green on the exact head.

vincentkoc added a commit that referenced this pull request Nov 26, 2026
…irement-rule

* origin/main: (172 commits)
  test(gateway): expect a revoked person's Goal retry to be hidden as not found (#205698)
  fix: keep browser disabled when only hardening relay authentication (#203137)
  fix: recover Linux stream automations after command-anchor crashes (#203149)
  fix(whatsapp): identify voice-note captions as text in delivery receipts (#205381)
  fix(test): unblock restart-auth plugin and worker publication qualification (#205679)
  chore(ui): refresh control ui locales (#205691)
  fix: reduce memory during SQLite usage refresh (#201064)
  fix(plugins): readmit native captures with a dangling host link
  chore(i18n): refresh native locales (#205680)
  fix(update): hash SQLite lock bytes as zeros so Windows exclusion cannot fail verification (#205668)
  fix(skill-workshop): skip the skill diet for skills with Markdown outside support directories (#204881)
  fix(plugins): clarify dated SDK migration notices (#200932)
  fix: keep the resident launcher when reinstalling Gateway (#205655)
  fix: show the whole reply when you reopen a TUI session (#200455)
  test(ui): wait for restored speech player authorization (#199502)
  feat: let agents post approved GitHub comments (#204301)
  fix(agents): honor imageMaxDimensionPx at the provider and CLI image handoffs (#205663)
  chore(ui): refresh control ui locales (#205664)
  fix(google): preserve playback when Google Live splits audio into parts (#205364)
  fix: show named characters in exported session messages (#205362)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 26, 2026
…05655)

Closes openclaw#205617
Related: openclaw#204516, openclaw#204866

## What Problem This Solves

After an update has converted an installation to resident releases, `gateway install --force` can replace the launcher with the current package's `dist/index.js`. The Gateway can still answer health checks, but its pending trial loses the resident ready/rollback owner. Reusing a checked durable CLI can bypass the launcher for the same reason.

## User Impact

Ordinary Gateway installs and reinstalls keep the selected state directory's resident launcher, including a first pending trial whose previous version is still an unmodified npm package. Explicit retained-CLI recovery keeps precedence; separate node services, unowned npm installs, and supported legacy forwarding-package layouts keep their existing entries. No flag, schema, trial-format or protocol change.

## Why This Change Was Made

The existing release ownership predicate already knows that a published release **or v2 trial** owns the installation. Move that unchanged predicate into the existing release store and use it in the service selector; retain the existing legacy forwarding-package probe. Delete the competing inference that an ordinary install must identify its owner only from the currently serving package.

A checked same-version durable copy now uses the same service-specific planned entry as a new durable install, rather than masquerading as an explicit recovery override. The raw-string durable reuse return and its unused path calculation are removed; retained recovery strings and node entry rules are unchanged. The shared install-plan composition remains unchanged.

An unreadable/malformed trial is not silently ignored by reinstall: the existing store reader fails visibly instead of guessing a different service owner. Launcher-file existence alone does not establish ownership.

Scoped tokei production code (seven touched production files, tests excluded): **2,495 → 2,498 (+3)**. No line-cap exemption or guard compression. The updating contract is updated.

## Evidence

- Pinned base: `7fa79a55c4cf9eafe50b4e161e28e00e4e147e06`.
- **Red on base:** [AWS run_c1fd8b7dc8d3b4039c9990aa60d04f68](https://crabbox.openclaw.ai/portal/runs/run_c1fd8b7dc8d3b4039c9990aa60d04f68). The real `buildGatewayInstallPlan`/argument builder returned npm `dist/index.js` instead of the launcher for the pending plain-npm fallback; checked Gateway durable reuse returned its durable `dist/index.js` instead of the launcher. Both expected assertions failed. Settled release, legacy forwarding, orphan-launcher and node controls passed (2 failed / 4 passed selected cases); no assertion or expectation was narrowed.
- **Green:** [AWS run_ddbc17a2ba58265e394c69f8bd77071d](https://crabbox.openclaw.ai/portal/runs/run_ddbc17a2ba58265e394c69f8bd77071d): **55 tests passed in four suites**, production core types plus command/service test-project types passed, exact changed-file lint and test-line guard passed (+68 before formatting, allowance400). Two formatting-only repairs were captured from AWS oxfmt and applied exactly; no behavior/type rerun. Formatting passed in [AWS run_40c90a984fcc254b4765ae94d92f4302](https://crabbox.openclaw.ai/portal/runs/run_40c90a984fcc254b4765ae94d92f4302).
- **Linux product gate PASSED:** [run_bac6c35b5f73cb91506fe10ff177aac8](https://crabbox.openclaw.ai/portal/runs/run_bac6c35b5f73cb91506fe10ff177aac8). Published10→head; ordinary `gateway install --force` **without --wrapper** wrote actual `openclaw-launcher.mjs` (native MainPID50978). Same prepared trial `fc340ad2-4263-432e-8490-e478ba20e1f1` committed/succeeded (actual attempts2); authenticated serving connection reported2026.11.11-beta.1 and matching successor build, schema43 verified. Next public run `da46ec0a-1ec1-46a5-9fce-1a5c5c1092b2` was admitted, packed/installed/maintained, and finished `skipped/already-current` rather than stuck active; **no third release trial is claimed**. The corrected fixture allows legitimate phase progress during install-and-start while pinning immutable trial identity. Native stop/uninstall and npm-config cleanup passed; exact AWS leasecbx_f402bce8b884 released with `--wait`, exit0.
- Source qualification: product build/proof uses pre-format carrier **5a9b2d43e7533d0ff1af9ac7fbae29ade472b6fd**. Its exact diff to PR head90e1fa0147 is only two formatting hunks: a test statement wrap and a Promise type-union wrap erased at build. Main accepted formatting-only equivalence for product bytes, **not exact-source identity**; no stamp rewriting or rebuild. No native result or trial was fabricated. Full facts/hashes/source capsules: `direction-2026-11-24/UpdateOwner-reinstall-linux-receipt.json` and `UpdateOwner-reinstall-linux-artifacts/fresh-receipts.tgz`.
- Exact-head local review is complete: patch correct, security cleared, no findings, confidence0.88 (`~/.cache/clawsweeper-local-review/90e1fa014790.md`). The product-path gap noted at review is covered by the passing native receipt above. CI pending; no Windows/macOS proof claimed.

Co-authored-by: Ayaan Zaidi <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 26, 2026
Closes #205617
Related: #204516, #204866

## What Problem This Solves

After an update has converted an installation to resident releases, `gateway install --force` can replace the launcher with the current package's `dist/index.js`. The Gateway can still answer health checks, but its pending trial loses the resident ready/rollback owner. Reusing a checked durable CLI can bypass the launcher for the same reason.

## User Impact

Ordinary Gateway installs and reinstalls keep the selected state directory's resident launcher, including a first pending trial whose previous version is still an unmodified npm package. Explicit retained-CLI recovery keeps precedence; separate node services, unowned npm installs, and supported legacy forwarding-package layouts keep their existing entries. No flag, schema, trial-format or protocol change.

## Why This Change Was Made

The existing release ownership predicate already knows that a published release **or v2 trial** owns the installation. Move that unchanged predicate into the existing release store and use it in the service selector; retain the existing legacy forwarding-package probe. Delete the competing inference that an ordinary install must identify its owner only from the currently serving package.

A checked same-version durable copy now uses the same service-specific planned entry as a new durable install, rather than masquerading as an explicit recovery override. The raw-string durable reuse return and its unused path calculation are removed; retained recovery strings and node entry rules are unchanged. The shared install-plan composition remains unchanged.

An unreadable/malformed trial is not silently ignored by reinstall: the existing store reader fails visibly instead of guessing a different service owner. Launcher-file existence alone does not establish ownership.

Scoped tokei production code (seven touched production files, tests excluded): **2,495 → 2,498 (+3)**. No line-cap exemption or guard compression. The updating contract is updated.

## Evidence

- Pinned base: `90297095602f362f3af2353a6a718c6867dad203`.
- **Red on base:** [AWS run_c1fd8b7dc8d3b4039c9990aa60d04f68](https://crabbox.openclaw.ai/portal/runs/run_c1fd8b7dc8d3b4039c9990aa60d04f68). The real `buildGatewayInstallPlan`/argument builder returned npm `dist/index.js` instead of the launcher for the pending plain-npm fallback; checked Gateway durable reuse returned its durable `dist/index.js` instead of the launcher. Both expected assertions failed. Settled release, legacy forwarding, orphan-launcher and node controls passed (2 failed / 4 passed selected cases); no assertion or expectation was narrowed.
- **Green:** [AWS run_ddbc17a2ba58265e394c69f8bd77071d](https://crabbox.openclaw.ai/portal/runs/run_ddbc17a2ba58265e394c69f8bd77071d): **55 tests passed in four suites**, production core types plus command/service test-project types passed, exact changed-file lint and test-line guard passed (+68 before formatting, allowance400). Two formatting-only repairs were captured from AWS oxfmt and applied exactly; no behavior/type rerun. Formatting passed in [AWS run_40c90a984fcc254b4765ae94d92f4302](https://crabbox.openclaw.ai/portal/runs/run_40c90a984fcc254b4765ae94d92f4302).
- **Linux product gate PASSED:** [run_bac6c35b5f73cb91506fe10ff177aac8](https://crabbox.openclaw.ai/portal/runs/run_bac6c35b5f73cb91506fe10ff177aac8). Published10→head; ordinary `gateway install --force` **without --wrapper** wrote actual `openclaw-launcher.mjs` (native MainPID50978). Same prepared trial `fc340ad2-4263-432e-8490-e478ba20e1f1` committed/succeeded (actual attempts2); authenticated serving connection reported2026.11.11-beta.1 and matching successor build, schema43 verified. Next public run `da46ec0a-1ec1-46a5-9fce-1a5c5c1092b2` was admitted, packed/installed/maintained, and finished `skipped/already-current` rather than stuck active; **no third release trial is claimed**. The corrected fixture allows legitimate phase progress during install-and-start while pinning immutable trial identity. Native stop/uninstall and npm-config cleanup passed; exact AWS leasecbx_f402bce8b884 released with `--wait`, exit0.
- Source qualification: product build/proof uses pre-format carrier **5a9b2d43e7533d0ff1af9ac7fbae29ade472b6fd**. Its exact diff to PR head90e1fa0147 is only two formatting hunks: a test statement wrap and a Promise type-union wrap erased at build. Main accepted formatting-only equivalence for product bytes, **not exact-source identity**; no stamp rewriting or rebuild. No native result or trial was fabricated. Full facts/hashes/source capsules: `direction-2026-11-24/UpdateOwner-reinstall-linux-receipt.json` and `UpdateOwner-reinstall-linux-artifacts/fresh-receipts.tgz`.
- Exact-head local review is complete: patch correct, security cleared, no findings, confidence0.88 (`~/.cache/clawsweeper-local-review/90e1fa014790.md`). The product-path gap noted at review is covered by the passing native receipt above. CI pending; no Windows/macOS proof claimed.

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit b9d0210)

Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
obviyus added a commit that referenced this pull request Nov 26, 2026
## What Problem This Solves

A same-version Git update can leave bundled plugins pinned to an older release directory. The new core starts, but post-update plugin activation rejects the stale installation claim and can abort the reload batch.

Related: #204866, #205655.

## User Impact

Packaged bundled plugins follow the selected core without a second path-install owner. User settings and explicit local/source-checkout selections stay intact; this does not uninstall plugins or delete their code. Existing registered Git-plugin peer-link repair stays in its current owner.

No schema, stored-record shape, launcher format, or public plugin API changes.

## Why This Change Was Made

The existing stale-record owner ran after channel synchronization and required a different package version. Retire proven foreign compiled-bundle records before planning, using the existing physical ownership policy instead of version and path-string guesses. Dev synchronization also stops creating redundant records for packaged bundles. The late competing prune operation and its obsolete wrapper are removed.

Production code on this PR's three runtime files, measured with `tokei` against `81bc5ec79fe4`: **848 → 829 lines (−19)**. Net test lines: **+21**. Record retirement and development-channel synchronization use one loop.

## Evidence

- Base regression: **9 intended assertion failures / 8 passes** on `81bc5ec79fe4`, covering same-version foreign bundles and dev image ownership.
- Repaired source: **146 tests / 13 focused files** pass in **295.98 s**; core/plugin/Doctor type lanes, scoped lint and format checks pass.
- Full build **327 s**; canonical package and tarball integrity check **147 s**, passed on the same source: https://crabbox.openclaw.ai/portal/runs/run_dc18498ac0ce67bf255a724603a87da8 . Normal transport carrier `52ac74c7ea423bf3ba7dc40fa7ede4f87d3a923e`; qualified tree `ab0be1d46d2b4479f5d61dab4caf3732957a006e` is identical to committed head `ed2da82d62dccacc41f779b61341714a98677c32`. The build stamp names the carrier, not the eventual PR SHA.
- Linux product proof is incomplete: published `2026.11.10` → first Git release → resident predecessor and predecessor plugin completion passed, but the harness's diagnostic plugin locator was refused before candidate activation. No candidate retirement/reload pass or zero-stale-record result is claimed. Raw failure and partial proof: #205952 (comment) . Native profile was stopped/uninstalled, exact AWS lease released with `--wait`. The final proposed retry was cancelled before allocation under the direction to stop adding proof machinery.
- Final head `075c60763f62537163644c935f22c166329cb419` only folds the two adjacent record loops into one, preserving updated source-owned records before the final retirement filter. Owner red/green tests and the clean review above qualify the behavior before this loop consolidation; CI runs on the final head. Main's accepted live follow-up is the next Peanutto nightly.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 27, 2026
…05952)

## What Problem This Solves

A same-version Git update can leave bundled plugins pinned to an older release directory. The new core starts, but post-update plugin activation rejects the stale installation claim and can abort the reload batch.

Related: openclaw#204866, openclaw#205655.

## User Impact

Packaged bundled plugins follow the selected core without a second path-install owner. User settings and explicit local/source-checkout selections stay intact; this does not uninstall plugins or delete their code. Existing registered Git-plugin peer-link repair stays in its current owner.

No schema, stored-record shape, launcher format, or public plugin API changes.

## Why This Change Was Made

The existing stale-record owner ran after channel synchronization and required a different package version. Retire proven foreign compiled-bundle records before planning, using the existing physical ownership policy instead of version and path-string guesses. Dev synchronization also stops creating redundant records for packaged bundles. The late competing prune operation and its obsolete wrapper are removed.

Production code on this PR's three runtime files, measured with `tokei` against `158fa1971e14`: **848 → 829 lines (−19)**. Net test lines: **+21**. Record retirement and development-channel synchronization use one loop.

## Evidence

- Base regression: **9 intended assertion failures / 8 passes** on `158fa1971e14`, covering same-version foreign bundles and dev image ownership.
- Repaired source: **146 tests / 13 focused files** pass in **295.98 s**; core/plugin/Doctor type lanes, scoped lint and format checks pass.
- Full build **327 s**; canonical package and tarball integrity check **147 s**, passed on the same source: https://crabbox.openclaw.ai/portal/runs/run_dc18498ac0ce67bf255a724603a87da8 . Normal transport carrier `52ac74c7ea423bf3ba7dc40fa7ede4f87d3a923e`; qualified tree `ab0be1d46d2b4479f5d61dab4caf3732957a006e` is identical to committed head `ed2da82d62dccacc41f779b61341714a98677c32`. The build stamp names the carrier, not the eventual PR SHA.
- Linux product proof is incomplete: published `2026.11.10` → first Git release → resident predecessor and predecessor plugin completion passed, but the harness's diagnostic plugin locator was refused before candidate activation. No candidate retirement/reload pass or zero-stale-record result is claimed. Raw failure and partial proof: openclaw#205952 (comment) . Native profile was stopped/uninstalled, exact AWS lease released with `--wait`. The final proposed retry was cancelled before allocation under the direction to stop adding proof machinery.
- Final head `075c60763f62537163644c935f22c166329cb419` only folds the two adjacent record loops into one, preserving updated source-owned records before the final retirement filter. Owner red/green tests and the clean review above qualify the behavior before this loop consolidation; CI runs on the final head. Main's accepted live follow-up is the next Peanutto nightly.

Co-authored-by: Ayaan Zaidi <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 28, 2026
## What Problem This Solves

A same-version Git update can leave bundled plugins pinned to an older release directory. The new core starts, but post-update plugin activation rejects the stale installation claim and can abort the reload batch.

Related: #204866, #205655.

## User Impact

Packaged bundled plugins follow the selected core without a second path-install owner. User settings and explicit local/source-checkout selections stay intact; this does not uninstall plugins or delete their code. Existing registered Git-plugin peer-link repair stays in its current owner.

No schema, stored-record shape, launcher format, or public plugin API changes.

## Why This Change Was Made

The existing stale-record owner ran after channel synchronization and required a different package version. Retire proven foreign compiled-bundle records before planning, using the existing physical ownership policy instead of version and path-string guesses. Dev synchronization also stops creating redundant records for packaged bundles. The late competing prune operation and its obsolete wrapper are removed.

Production code on this PR's three runtime files, measured with `tokei` against `81bc5ec79fe4`: **848 → 829 lines (−19)**. Net test lines: **+21**. Record retirement and development-channel synchronization use one loop.

## Evidence

- Base regression: **9 intended assertion failures / 8 passes** on `81bc5ec79fe4`, covering same-version foreign bundles and dev image ownership.
- Repaired source: **146 tests / 13 focused files** pass in **295.98 s**; core/plugin/Doctor type lanes, scoped lint and format checks pass.
- Full build **327 s**; canonical package and tarball integrity check **147 s**, passed on the same source: https://crabbox.openclaw.ai/portal/runs/run_dc18498ac0ce67bf255a724603a87da8 . Normal transport carrier `52ac74c7ea423bf3ba7dc40fa7ede4f87d3a923e`; qualified tree `ab0be1d46d2b4479f5d61dab4caf3732957a006e` is identical to committed head `ed2da82d62dccacc41f779b61341714a98677c32`. The build stamp names the carrier, not the eventual PR SHA.
- Linux product proof is incomplete: published `2026.11.10` → first Git release → resident predecessor and predecessor plugin completion passed, but the harness's diagnostic plugin locator was refused before candidate activation. No candidate retirement/reload pass or zero-stale-record result is claimed. Raw failure and partial proof: #205952 (comment) . Native profile was stopped/uninstalled, exact AWS lease released with `--wait`. The final proposed retry was cancelled before allocation under the direction to stop adding proof machinery.
- Final head `075c60763f62537163644c935f22c166329cb419` only folds the two adjacent record loops into one, preserving updated source-owned records before the final retirement filter. Owner red/green tests and the clean review above qualify the behavior before this loop consolidation; CI runs on the final head. Main's accepted live follow-up is the next Peanutto nightly.

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit 05c15ac)
tideclaw-bot pushed a commit that referenced this pull request Nov 30, 2026
## What Problem This Solves

A same-version Git update can leave bundled plugins pinned to an older release directory. The new core starts, but post-update plugin activation rejects the stale installation claim and can abort the reload batch.

Related: #204866, #205655.

## User Impact

Packaged bundled plugins follow the selected core without a second path-install owner. User settings and explicit local/source-checkout selections stay intact; this does not uninstall plugins or delete their code. Existing registered Git-plugin peer-link repair stays in its current owner.

No schema, stored-record shape, launcher format, or public plugin API changes.

## Why This Change Was Made

The existing stale-record owner ran after channel synchronization and required a different package version. Retire proven foreign compiled-bundle records before planning, using the existing physical ownership policy instead of version and path-string guesses. Dev synchronization also stops creating redundant records for packaged bundles. The late competing prune operation and its obsolete wrapper are removed.

Production code on this PR's three runtime files, measured with `tokei` against `81bc5ec79fe4`: **848 → 829 lines (−19)**. Net test lines: **+21**. Record retirement and development-channel synchronization use one loop.

## Evidence

- Base regression: **9 intended assertion failures / 8 passes** on `81bc5ec79fe4`, covering same-version foreign bundles and dev image ownership.
- Repaired source: **146 tests / 13 focused files** pass in **295.98 s**; core/plugin/Doctor type lanes, scoped lint and format checks pass.
- Full build **327 s**; canonical package and tarball integrity check **147 s**, passed on the same source: https://crabbox.openclaw.ai/portal/runs/run_dc18498ac0ce67bf255a724603a87da8 . Normal transport carrier `52ac74c7ea423bf3ba7dc40fa7ede4f87d3a923e`; qualified tree `ab0be1d46d2b4479f5d61dab4caf3732957a006e` is identical to committed head `ed2da82d62dccacc41f779b61341714a98677c32`. The build stamp names the carrier, not the eventual PR SHA.
- Linux product proof is incomplete: published `2026.11.10` → first Git release → resident predecessor and predecessor plugin completion passed, but the harness's diagnostic plugin locator was refused before candidate activation. No candidate retirement/reload pass or zero-stale-record result is claimed. Raw failure and partial proof: #205952 (comment) . Native profile was stopped/uninstalled, exact AWS lease released with `--wait`. The final proposed retry was cancelled before allocation under the direction to stop adding proof machinery.
- Final head `075c60763f62537163644c935f22c166329cb419` only folds the two adjacent record loops into one, preserving updated source-owned records before the final retirement filter. Owner red/green tests and the clean review above qualify the behavior before this loop consolidation; CI runs on the final head. Main's accepted live follow-up is the next Peanutto nightly.

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

(cherry picked from commit 05c15ac)

Release adaptation: Retain bundled selection at the existing channel update and Doctor convergence owners; adapt documentation and assert the complete stable install-record set instead of importing the absent main reload batch. Existing discovered-owner and Doctor convergence assertions remain.

Companion audit: PR #205952 is selected; keep bundled update/Doctor consumer changes together and preserve explicit links and npm installations.

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

Labels

cli CLI command changes commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime impact:other This issue has meaningful maintainer-visible impact outside the owned taxonomy. 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: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: gateway install replaces the resident launcher with a release-slot entry after conversion

1 participant