Skip to content

fix: let Git updates build when pnpm uses a global virtual store - #205010

Merged
RomneyDa merged 2 commits into
openclaw:mainfrom
fuller-stack-dev:fix/git-update-global-pnpm-store
Nov 26, 2026
Merged

RomneyDa merged 2 commits into
openclaw:mainfrom
fuller-stack-dev:fix/git-update-global-pnpm-store

Conversation

@fuller-stack-dev

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

Copy link
Copy Markdown
Member

Related: #204775

What Problem This Solves

openclaw update on a Git (source checkout) install stops at staging: prepare:build with "The new version could not be built. The current version is still running." whenever the host's user-level pnpm config sets virtualStoreType: global (pnpm 12). The Gateway keeps serving the old build, and every later update fails the same way. A plain pnpm install && pnpm build in a checkout on such a host fails too.

Root cause: pnpm-workspace.yaml pins nodeLinker: isolated but not the virtual store type, so pnpm takes global from the user config and links node_modules/typescript (and every other dependency) into the shared store under the user's home. The build's declaration-input guard (scripts/lib/local-check-runtime.mts, used by scripts/lib/tsdown-declaration-boundary.mts) requires compiler inputs to sit physically inside the checkout and rejects it: Declaration input escapes checkout: … shared installs and external symlinks are unsupported. The older Git runner wrote virtualStoreType: project into the candidate's workspace file (src/infra/update-runner-git-commands.ts). The release-based path src/update/prepare-git.ts runs pnpm install --frozen-lockfile and pnpm build in a worktree of the target commit with the Gateway's environment and no store setting, so the user config wins.

User Impact

  • Git installs on hosts with a global pnpm virtual store can update again once the target contains this change. No action, migration or config change is needed.
  • Developers who set virtualStoreType: global in their user pnpm config get a project-local node_modules/.pnpm in OpenClaw checkouts instead of links into the global store. The first install after this change relinks into the checkout, and pnpm may ask to remove and reinstall node_modules. That uses more disk per checkout, but it is the only layout the build accepts.
  • No lockfile, dependency, schema, config-key or protocol change. pnpm install --frozen-lockfile accepts the existing lockfile; the setting is not recorded in it.

Why This Change Was Made

The installed updater cannot be patched, but it installs and builds inside the target tree, so the target's own pnpm-workspace.yaml reaches it. One line there, virtualStoreType: project next to nodeLinker: isolated, fixes the update path and plain source builds together. Relaxing the declaration guard was not an option, because the guard protects build correctness.

Update behavior: this reaches already-installed updaters, because they install and build the target commit inside its own tree. The first update toward a commit that contains this line succeeds; an update toward an older target still fails safely, as before (Gateway keeps serving, nothing activated). No migration and no Doctor change.

Scope notes:

  • src/update/prepare-git.ts still does not apply resolvePnpmCandidateEnv (src/infra/update-package-manager.ts). That belongs to the update stream's owner and is tracked on Design: prepared-release updates (state, ownership and plan) #204775. It matters for one case this PR does not cover: pnpm 12.15 gives the environment variable pnpm_config_virtual_store_type=global precedence over the workspace file (measured below), so a Gateway that exports that variable still builds with the global store.
  • The old runner's own write of virtualStoreType: project is kept. It is now redundant for targets that contain this line but still covers dev and preflight candidates whose target predates it, and it also sets virtualStoreDir.

Audit:

  • Readers of pnpm-workspace.yaml: CI setup and crabbox hydration set only store-dir/virtual-store-dir; dependency-fingerprint.mjs hashes the file (one cache miss); check-dependency-pins.mts reads only overrides and package extensions; scripts/worktree-setup.mjs only checks the file exists. None asserts the store type.
  • test/scripts/baileys-materialization.test.ts writes virtualStoreType: global into its own fixture workspace and env after reading the repo file, so it is unaffected (passes on the head).
  • Docs: CONTRIBUTING.md (source dependency layout) and docs/install/updating/update-methods.md (candidate builds) now state that the workspace pins the project store.

Evidence

Tested commits: base ddc83401337 (red), PR head ac2ec1ef7a7 for the direct green and update cell G2. The branch was then rebased onto 4f873f44066 (head 4dd5ed51ab5). That movement changes only a Swift test and drops one export keyword in src/state/state-upgrade-tree.ts; neither touches installs, the workspace file or the declaration guard, so the proofs were not rerun.

1. Direct build, macOS, user pnpm config virtualStoreType: global, no environment overrides

Fresh worktree each time, pnpm install --frozen-lockfile && pnpm build, pnpm 12.15.0 from the packageManager pin.

  • RED, base ddc83401337: pnpm config get virtualStoreType = global; node_modules/typescript -> ../../../../../Library/pnpm/store/v11/links/@/typescript/…; install exit 0, build exit 1 in tsdown-ai: ERROR Error: Declaration input escapes checkout: ~/Library/pnpm/store/v11/links/@/typescript/7.1.0-dev.20261028.1/…/node_modules/typescript/package.json … shared installs and external symlinks are unsupported.
  • GREEN, head ac2ec1ef7a7: pnpm config get virtualStoreType = project; node_modules/typescript -> .pnpm/[email protected]/node_modules/typescript; install exit 0, build exit 0 (total 3m 21.8s).
gugs-direct-red.mp4
gugs-direct-green.mp4

2. Update cell, Linux Docker (real systemd user Gateway), installed updater from base x candidate

Each cell: Git install cloned from a local upstream at ddc83401337, built with pnpm build:runtime, managed Gateway via openclaw gateway install, a Gateway-gated SQLite writer probing during the run. Then ~/.config/pnpm/config.yaml gets virtualStoreType: global (written after the install was built, since the base itself cannot build under it), upstream main moves to the target, and openclaw update --yes --json runs.

  • RED (R1), target = base + empty commit 688aa5d60c8: status=failed reason=build-failed; nextAction: The new version could not be built. The current version is still running.; steps prepare:install=completed, prepare:build=failed (tsdown-ai failed after 6.15s, stack frames under ~/.local/share/pnpm/store/v11/links/…); process exit 1 after 40 s. Serving build before and after: 2026.11.8-ddc834013375-…, readyz true, systemd NRestarts=0; writer 217 probes, 0 failed, no outage.
  • GREEN (G2), target = PR head ac2ec1ef7a7: status=succeeded, steps through prepare:build=completed, validating, activating, restarting; process exit 0 after 350 s. Serving build after: 2026.11.8-ac2ec1ef7a78-…, readyz true, release link moved to the new release, whose pnpm-workspace.yaml has virtualStoreType: project and whose node_modules/typescript -> .pnpm/typescript@…. The writer saw one 12.3 s outage, during the planned restart onto the new build (NRestarts=1).
  • Same container after G2, base tree ddc83401337, same user config: install exit 0, typescript linked into pnpm-home/store/v11/links/…, build exit 1 with ERROR Error: Declaration input escapes checkout: /home/appuser/um/pnpm-home/store/v11/links/@/typescript/…. This confirms the R1 build failure is the same guard on Linux. (The R1 ledger keeps only the tail of the build output.)
  • An earlier green cell G1 toward the first push 847eb181a24 (same workspace change, no test/docs) also succeeded.
gugs-cell-red-R1.mp4
gugs-cell-green-G2.mp4

The cell recordings replay the decisive raw lines from each cell's own step outputs; the direct recordings are live with idle time compressed. Full raw logs are not attached; the decisive lines are above.

Published stable driver x candidate (installed updater from v2026.11.9)

Tested: installed v2026.11.9 (0032b1d7ffd); targets current main 4a180835802 (S-main) and PR head 4dd5ed51ab5 (S-head). Same Linux Docker harness with a real systemd user Gateway, one fresh container per cell. The source mirror has history back to 2026-10-25, so the release branch (forked from main at 9559c51dd05) connects to both targets.

Install, as the v2026.11.9 install docs describe for a server checkout: Git checkout detached at the tag, pnpm install --frozen-lockfile && pnpm build:runtime, pnpm add --global "openclaw@link:$PWD", openclaw gateway install --force, config update.channel: dev. State: a Gateway-gated writer filling the agent database to 331 MiB and probing /readyz every 250 ms. A separate table holds 1,000 marker rows with a known SHA-256. ui.seamColor is set to #5a17d0 with the installed CLI (openclaw config set ui.seamColor '"#5a17d0"'). Then ~/.config/pnpm/config.yaml gets virtualStoreType: global, upstream main moves to the target, and the installed CLI runs openclaw update --yes --json --channel dev.

S-main (to 4a180835802) S-head (to 4dd5ed51ab5)
openclaw update result status=ok, run succeeded, exit 0 status=ok, run succeeded, exit 0
Wall time 458 s 475 s
Candidate install / build (preflight worktree) exit 0 in 7 s / exit 0 in 110 s exit 0 in 7 s / exit 0 in 114 s
Gateway outage (/readyz every 250 ms) one outage, 181.1 s (updater reports 182 s) one outage, 191.1 s (updater reports 192 s)
Serving build before 2026.11.9-0032b1d7ffd0-… 2026.11.9-0032b1d7ffd0-…
Serving build after 2026.11.9-4a180835802d-…, readyz true 2026.11.8-4dd5ed51ab55-…, readyz true
ui.seamColor after #5a17d0 #5a17d0
Marker rows after 1000, same SHA-256 69cb2f125f43dd66…, quick_check=ok 1000, same SHA-256, quick_check=ok
Agent DB after 331 MiB, schema 38 -> 44 331 MiB, schema 38 -> 44
node_modules/typescript in the installed tree .pnpm/[email protected]/…, resolves inside the tree same
Final pnpm-workspace.yaml no virtualStoreType key (main has none), file matches HEAD one virtualStoreType: project (line 43), file matches HEAD
Checkout after main at target, git status --porcelain empty main at target, git status --porcelain empty

Decisive raw lines (S-head; S-main matches except where the table differs):

$ openclaw update --yes --json --channel dev   # the installed v2026.11.9 CLI
   status=ok run.status=succeeded before=0032b1d7ffd after=4dd5ed51ab5
   preflight-deps-install exit=0 7s, preflight-build exit=0 114s, preflight-runtime-stage exit=0 43s
   verification: runningBuildId=2026.11.8-4dd5ed51ab55-2026-11-25T02-42-28.208Z readyz=True versionMatch=True
-- after the update
   43:virtualStoreType: project
   virtualStoreType-key-count=1
   pnpm-workspace.yaml matches HEAD
   link: .pnpm/[email protected]/node_modules/typescript
   typescript resolves inside tree: yes
   {"seamColor":"#5a17d0","updateChannel":"dev","port":34819,"authMode":"token"}
   virtualStoreType: global        # user pnpm config, unchanged

What this shows: the stable driver already builds under a global user store, because its own candidate preparation writes virtualStoreType: project into the preflight worktree. This PR neither breaks nor changes that. With the PR's line already in the target file, that write replaced the existing key: the final file has one key, matches HEAD, and no workspace backup is left behind. The cell is a no-regression control, not a red/green pair. The stable driver had no failure to fix here.

Observations that are the same in both directions, so they do not come from this PR:

  • The long outage belongs to the stable driver's in-place activation. It stops the Gateway before checkout, and its own step list puts a 105 s Git object import (git-import-admitted-target, 4.98 GB pack) inside that window. The cell's upstream borrows objects from a shallow mirror, so the import is probably larger here than on an ordinary clone. Not measured on one.
  • On restart, the driver's service reconciliation rewrote the unit's ExecStart from <checkout>/dist/index.js to the pnpm global link path of the same package (it served the target build).
  • The PR head reports version 2026.11.8 because its base predates main's version bump; the dev channel accepted it.
stable-driver-S-main.mp4
stable-driver-S-head.mp4

3. Regression test

test/scripts/pnpm-install-isolation.test.ts already runs real pnpm 12 offline in a private HOME. It now copies virtualStoreType from the repo's workspace file, writes virtualStoreType: global into the fixture's private user pnpm config, and asserts each installed package file resolves inside its checkout (the guard's requirement), in addition to the existing cross-checkout isolation checks.

  • Red on base ddc83401337 (workspace without the line): AssertionError: expected '../store/v11/links/@/isolation-fixtur…' not to match /^\.\./u.
  • Green on head: passes.
  • Precedence measured with this fixture on pnpm 12.15: the workspace setting beats user config, but the environment variable pnpm_config_virtual_store_type=global beats the workspace setting. The test covers user config only.

Checks (head ac2ec1ef7a7, rebased content identical)

  • git diff --check: clean.
  • pnpm check:docs: pass.
  • node scripts/run-vitest.mjs test/scripts/pnpm-install-isolation.test.ts test/scripts/baileys-materialization.test.ts: 2 passed.
  • pnpm changed:lanes --json: all (root config surface). node scripts/check-changed.mjs: typecheck all, format, dependency pin, package-lock, config docs and the other guards pass. Two failures, both in files this PR does not touch: full lint (eslint(max-lines) in about 25 untouched files) and the dead-export scan (src/state/state-upgrade-tree.ts: skipEntry, fixed on main by fix(ci): remove unused state upgrade export #204988, now in the base).

Not proven

  • macOS update cells, from either driver (the macOS evidence is the direct build only); Windows not run; other package managers not run.
  • Stable driver from a branch checkout (the stable-driver cells start detached at the tag), and stable-driver outage on a full, non-shallow clone.
  • A Gateway environment that exports pnpm_config_virtual_store_type=global (see scope notes).

Review

One independent reviewer read the diff and the raw evidence. Its findings, all addressed: extend the existing pnpm isolation test instead of adding none (done); the update-methods doc wording (done); the env-variable precedence gap (measured and documented above). $autoreview does not run on this machine.

…ual store

Pin virtualStoreType to project in the workspace. The build's declaration
guard requires dependencies physically inside the checkout, and the updater
installs and builds the target tree under the host's user pnpm config.
@clawsweeper

clawsweeper Bot commented Nov 25, 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 size: XS labels Nov 25, 2026
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Nov 25, 2026
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ Dependency graph changes approved

A repository admin or SecOps member approved this revision with an explicit dependency approval comment.

A later push requires a fresh approval comment unless the author is a repository admin or SecOps member.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 25, 2026
@clawsweeper

clawsweeper Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

Pins pnpm’s project virtual store so source builds and Git update candidates keep dependencies inside their checkout.

Example: A host uses pnpm 12.15 with user configuration virtualStoreType: global.

  • Before: Git update preparation fails when the declaration guard finds TypeScript in the shared store.
  • After: Dependencies resolve inside node_modules/.pnpm and the candidate builds successfully.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A minimal repair with meaningful real-pnpm regression coverage, production update evidence, and latest-stable compatibility validation.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Public terminal results cover direct macOS install/build recovery, Linux installed-main updater recovery through activation and readiness, and an exact-head upgrade from v2026.11.9 preserving settings and database checksums; linked recordings could not be downloaded because the designated scratch directory is read-only.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Git installations cannot prepare updates when user-level pnpm configuration selects the global virtual store.
Reason: The maintainer-authored change restores a documented build invariant with one existing workspace setting and addresses a demonstrated failure without weakening validation.

Merge readiness

⛔ Blocked before merge - 1 item remains

This PR fixes a current source-build and Git-update failure with a focused workspace setting; no actionable patch defects were found, and enforced current-head approvals remain outstanding.

Reviewed head: 4dd5ed51ab55e8b4181289732aff7cbea5ca1f8a

Before merge

  • Await maintainer action - A maintainer must approve the current revision, and a repository admin or SecOps member must provide the required dependency approval for head 4dd5ed5.

Findings

None.

Agent review details

How this fits together

Git update preparation installs and builds a target worktree; its pnpm workspace configuration determines dependency placement before the declaration guard validates compiler inputs.

flowchart TD
  A[Host pnpm configuration] --> C[Candidate pnpm install]
  B[Target workspace configuration] --> C
  C --> D[Project dependency store]
  D --> E[Declaration input guard]
  E --> F[Built update release]
Loading

Technical review

Best possible solution:

Merge the workspace-level repair after the enforced approvals, retaining updater compatibility for older targets and the separately tracked environment override follow-up.

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

The inherited pnpm configuration and declaration guard establish the failure path in current source, corroborated by supplied macOS build and Linux updater red/green results; no target code was executed during this review.

Is this the best way to solve the issue?

Pinning the existing pnpm setting in the target workspace is the smallest repair that reaches both already-installed release updaters and direct source builds while preserving compiler-input isolation.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Workspace dependency layout keeps the original intent (4675e3d: Use isolated linking to enable whole-package APFS clone reuse without enabling the global virtual store.)
  • Compiler-input install isolation keeps the original intent (7fc68b8: Prevent sibling installs from changing compiler-input metadata by using clone-or-copy imports.)
  • Existing regression fixture keeps the original intent (e794898: Consolidate test scaffolding while retaining distinct integrity and lifecycle contracts.)
  • Update-method documentation keeps the original intent (056d140: Separate alternative update methods from the main updating guide.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Tests +13, Docs +5, Config +3. Total +21 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 17 4 +13
Docs 2 7 2 +5
Config 1 3 0 +3
Generated 0 0 0 0
Other 0 0 0 0
Total 4 27 6 +21

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:

  • merge-risk: 🚨 compatibility: Existing source installs using a global virtual store switch to project-local dependencies and may require relinking with additional disk use; the maintainer-authored PR explicitly accepts this necessary layout change and supplies stable-upgrade compatibility evidence.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

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

Workflow

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

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-25T01:39:42.676Z sha 4dd5ed5 :: blocked before merge. :: none

Reviewed November 24, 2026, 9:58 PM ET / November 25, 2026, 02:58 UTC (Revision 2).

@fuller-stack-dev

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Nov 25, 2026
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Requesting a dependency review from obviyus.

The dependency guard holds this PR because it touches pnpm-workspace.yaml. The whole dependency change is one setting:

virtualStoreType: project

It makes pnpm keep the virtual store inside the checkout even when the host's user pnpm config enables a global one. Without it, a Git-channel openclaw update on such a host cannot build the target tree. No package, version, lockfile entry or override changes.

Head is 4dd5ed51ab55e8b4181289732aff7cbea5ca1f8a and will not move while this is under review. If the change looks right, the guard needs a new comment containing only:

/allow-dependencies-change

@vincentkoc

Copy link
Copy Markdown
Member

/allow-dependencies-change

@RomneyDa
RomneyDa merged commit 4afbe0b into openclaw:main Nov 26, 2026
130 checks passed
tideclaw-bot pushed a commit that referenced this pull request Nov 26, 2026
…5010)

* fix: build Git updates when the user's pnpm config uses a global virtual store

Pin virtualStoreType to project in the workspace. The build's declaration
guard requires dependencies physically inside the checkout, and the updater
installs and builds the target tree under the host's user pnpm config.

* test: keep installs inside the checkout when user pnpm config selects a global store

(cherry picked from commit 4afbe0b)
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 26, 2026
…5010)

* fix: build Git updates when the user's pnpm config uses a global virtual store

Pin virtualStoreType to project in the workspace. The build's declaration
guard requires dependencies physically inside the checkout, and the updater
installs and builds the target tree under the host's user pnpm config.

* test: keep installs inside the checkout when user pnpm config selects a global store

(cherry picked from commit 4afbe0b)
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
@fuller-stack-dev
fuller-stack-dev deleted the fix/git-update-global-pnpm-store branch November 26, 2026 18:35
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 27, 2026
…nclaw#205010)

* fix: build Git updates when the user's pnpm config uses a global virtual store

Pin virtualStoreType to project in the workspace. The build's declaration
guard requires dependencies physically inside the checkout, and the updater
installs and builds the target tree under the host's user pnpm config.

* test: keep installs inside the checkout when user pnpm config selects a global store
tideclaw-bot added a commit that referenced this pull request Nov 28, 2026
* fix(update): let a Git release install switch back to its npm package

The npm package an npm-to-Git switch leaves forwarding to the Git release launcher (#200578) is this installation's own, but the update executor refused to reserve it ('Occupied slot does not resolve to its original installation') and package activation refused to publish into it, so openclaw update --channel stable on a Git release install always failed.

Refs #200578

* fix(update): settle a switch-back publication with the package's own authority

The post-update continuation compared the publication's recorded authority (keyed by the reserved npm package) with the executor's installation authority, so a completed switch back from Git reported 'Package publication recovery is pending'. One helper now gives both package activation and its continuation the authority this executor publishes at a root.

Refs #200578

* fix(update): key a Git-to-package switch by its package destination

Drops the executor slot and publication-authority changes: the post-core continuation runs the installed target, whose executor authority is the parent's install lease, so the lease itself must be the npm package for every published target to accept the recorded publication.

Refs #200578

* fix(update): rebind the Git install's Gateway service after a switch to its package

The package-root executor admission moves to the package-activation module so the switch can admit the package destination after its inspection.

Refs #200578

* fix(update): leave the Git install's Gateway service to its owner on a switch to its package

A Git release service definition is not refreshable here (service-definition-not-writable), so the rebind attempt refused the whole switch. The service stays on the Git release with the existing skip warning; rebinding it is a maintainer decision.

Refs #200578

* test(update): key a Git-to-npm switch by its package destination before npm has a copy

Refs #200578

* test(update): prove a Git-to-npm switch reserves its package destination through target resolution

Through resolveUpdateCommandTarget and a real executor: on base the package swap's reservation refuses with 'Occupied slot does not resolve to its original installation.' (forwarding package) or ENOENT realpath (no npm copy); both pass with the destination-keyed admission. Replaces the executor-only case.

Refs #200578

* fix(update): rebind the managed Gateway when switching back to npm

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

* fix: let a Git install switch back to the npm package

Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: ecdf2764-e5c4-8a1b-b3be-ed34bfd6646e

---------

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 152254c)

Release adaptation: Admit an inspected empty npm destination as the primary install root, while keeping the checkout lease for existing targets and acquiring it before restoring any interrupted npm link. Retain the stable writable-service and ownership checks, using the existing split-root rebind and recovery owners. Adapt regressions to a legacy checkout; do not import #200578 or its launcher/forwarder fixtures.

Follow-ups: 4afbe0b (#205010) changes pnpm virtual-store behavior and documents it separately; not required for the npm lease or service recovery. No later production code touches.

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

dependencies-changed PR changes dependency-related files docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants