Repository navigation
fix: keep the resident launcher when reinstalling Gateway - #205655
Conversation
- 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.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis 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.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete 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: Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe 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]
Technical reviewBest 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
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +2, Tests +71, Docs +2. Total +75 across 10 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 25, 2026, 8:15 PM ET / November 26, 2026, 01:15 UTC. |
|
Landed as b9d0210. Fixes #205617. After an installation has converted to the resident launcher, a plain |
…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) ...
…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]>
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]>
## 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]>
…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]>
## 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)
## 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]>
Closes #205617
Related: #204516, #204866
What Problem This Solves
After an update has converted an installation to resident releases,
gateway install --forcecan replace the launcher with the current package'sdist/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
90297095602f362f3af2353a6a718c6867dad203.buildGatewayInstallPlan/argument builder returned npmdist/index.jsinstead of the launcher for the pending plain-npm fallback; checked Gateway durable reuse returned its durabledist/index.jsinstead 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.gateway install --forcewithout --wrapper wrote actualopenclaw-launcher.mjs(native MainPID50978). Same prepared trialfc340ad2-4263-432e-8490-e478ba20e1f1committed/succeeded (actual attempts2); authenticated serving connection reported2026.11.11-beta.1 and matching successor build, schema43 verified. Next public runda46ec0a-1ec1-46a5-9fce-1a5c5c1092b2was admitted, packed/installed/maintained, and finishedskipped/already-currentrather 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.direction-2026-11-24/UpdateOwner-reinstall-linux-receipt.jsonandUpdateOwner-reinstall-linux-artifacts/fresh-receipts.tgz.~/.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.