Skip to content

fix(update): recognize Windows npm launchers for dev updates - #147653

Merged
RomneyDa merged 2 commits into
fix/update-installer-relocationfrom
fix/update-windows-launcher-relocation
Sep 14, 2026
Merged

RomneyDa merged 2 commits into
fix/update-installer-relocationfrom
fix/update-windows-launcher-relocation

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Windows npm installations can relocate a dirty development checkout while preserving local edits. Admission derives the npm prefix from the invoked package entry, so another installation first on PATH cannot receive the update.

The updater pins the package junction and three regular npm launchers, compares them with npm's staged output, and checks both families before activation. Unknown or changed launchers are refused. Existing activation and rollback remain the owners.

Stacked on #147677. Native baseline reproduced the original refusal. Native Windows CI passed on 17847d98a2a: real CMD/PowerShell, junction activation/rollback, launcher drift rejection, and repeat admission.

The final patch-identical rebase onto current main inherits its model-picker readiness test fix and #147677's separate publication rollback repair. Native proof above remains bound to 17847d98a2a; Final combined-head verification on 65b3062f9c3 passed 188 package-owner tests, 22 POSIX npm/installer CLI scenarios, production and test types, and scoped lint. Native Windows CI on that final head passed both test jobs, including the real launcher/junction/rollback fixture. Remaining Linux checks, including Gateway UI integration, are queued for unassigned Blacksmith 32-vCPU runners; full CI is not yet complete.

@clawsweeper

clawsweeper Bot commented Sep 14, 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.

@RomneyDa
RomneyDa marked this pull request as ready for review September 14, 2026 01:15
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S maintainer Maintainer-authored PR labels Sep 14, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 13, 2026, 10:54 PM ET / September 14, 2026, 02:54 UTC (Revision 4).

ClawSweeper review

What this changes

The PR recognizes Windows npm launchers when relocating edited development checkouts, validates installed and staged launchers, and adds native Windows regression coverage.

Merge readiness

⛔ Blocked before merge - 3 items remain

This remains useful Windows-specific work absent from current main. The earlier recognition defect is resolved, and no introduced correctness defect was found; published-updater qualification remains outstanding.

Priority: P2
Reviewed head: 65b3062f9c339774dace3c2984200ebd1248ff35

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with useful native boundary evidence and no blocking code finding; upgrade qualification remains required.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): The pinned native Windows job and inspected fixture support real npm/CMD/PowerShell admission, junction activation, drift rejection, and rollback through production owners. This supports the changed native boundary, while published-driver upgrade qualification remains a separate policy gap.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The pinned native Windows job and inspected fixture support real npm/CMD/PowerShell admission, junction activation, drift rejection, and rollback through production owners. This supports the changed native boundary, while published-driver upgrade qualification remains a separate policy gap.
Evidence reviewed 10 items Introduced Windows admission and validation: The pinned patch derives the package root from the invoked entry, requires regular npm launcher files, checks the original checkout identity, compares staged launcher fingerprints, and rechecks both families before activation.
Existing transaction remains authoritative: The new validator reaches package staging through updateGitInstall. prepareGitPackageExposure waits for activation before invoking the relocation assertion; package staging validates before swapping the installation.
Native boundary coverage: The complete fixture uses real npm installs, CMD, PowerShell, and junctions. It exercises competing PATH prefixes, installed/staged launcher drift, activation, repeat admission, and rollback through production owners; configuration loading is mocked.
Findings None None.
Security None None.

How this fits together

The update CLI identifies the installation invoked by the operator and prepares a replacement checkout. The existing package transaction then switches its npm exposure and retains rollback without rewriting the original checkout.

flowchart TD
  A[Windows npm invocation] --> B[Identify invoked installation]
  B --> C[Capture junction and launchers]
  C --> D[Prepare fresh checkout and npm stage]
  D --> E[Validate and recheck launchers]
  E --> F[Activate package transaction]
  F --> G[New checkout or verified rollback]
Loading

Before merge

  • Resolve merge risk (P1) - The native fixture does not qualify a published Windows updater reaching this candidate or the supported bootstrap path when the installed updater refuses a dirty checkout.
  • Resolve merge risk (P1) - Raw native-job logs could not be inspected because their download host is blocked; the pinned job metadata, captured claims, and complete fixture were inspected.
  • Complete next step (P2) - Record published-driver × candidate Windows qualification and the supported bootstrap path when an older updater refuses before staging.
Agent review details

Security

None.

PR surface

Source +44, Tests +243, Config 0. Total +287 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 54 10 +44
Tests 1 243 0 +243
Docs 0 0 0 0
Config 1 1 1 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 298 11 +287

Review metrics

Metric Value Why it matters
Native launcher coverage 2 shells, 3 launcher forms The fixture checks CMD and PowerShell execution while validating the complete npm launcher family.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the shared transaction and npm-generated launcher comparison, with a qualified upgrade path that preserves local edits and explains how older installations obtain the repaired updater.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the shared transaction and npm-generated launcher comparison, with a qualified upgrade path that preserves local edits and explains how older installations obtain the repaired updater.

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

Yes, from source: the pinned base rejects Windows dirty-checkout relocation unconditionally, and the native fixture supplies a concrete npm-linked reproduction. No target code was executed during this read-only review.

Is this the best way to solve the issue?

Yes for the implementation: it extends the existing admission and transaction owners without copying npm wrapper templates; upgrade qualification remains incomplete.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The pinned native Windows job and inspected fixture support real npm/CMD/PowerShell admission, junction activation, drift rejection, and rollback through production owners. This supports the changed native boundary, while published-driver upgrade qualification remains a separate policy gap.

Label justifications:

  • P2: This is a bounded Windows development-update improvement with preservation and rollback coverage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The pinned native Windows job and inspected fixture support real npm/CMD/PowerShell admission, junction activation, drift rejection, and rollback through production owners. This supports the changed native boundary, while published-driver upgrade qualification remains a separate policy gap.
  • proof: sufficient: Contributor real behavior proof is sufficient. The pinned native Windows job and inspected fixture support real npm/CMD/PowerShell admission, junction activation, drift rejection, and rollback through production owners. This supports the changed native boundary, while published-driver upgrade qualification remains a separate policy gap.

Evidence

What I checked:

  • Introduced Windows admission and validation: The pinned patch derives the package root from the invoked entry, requires regular npm launcher files, checks the original checkout identity, compares staged launcher fingerprints, and rechecks both families before activation. (src/cli/update-cli/update-command-target.ts:100, 65b3062f9c33)
  • Existing transaction remains authoritative: The new validator reaches package staging through updateGitInstall. prepareGitPackageExposure waits for activation before invoking the relocation assertion; package staging validates before swapping the installation. (src/cli/update-cli/update-command-git.ts:561, 65b3062f9c33)
  • Native boundary coverage: The complete fixture uses real npm installs, CMD, PowerShell, and junctions. It exercises competing PATH prefixes, installed/staged launcher drift, activation, repeat admission, and rollback through production owners; configuration loading is mocked. (src/cli/update-cli/update-command-target.windows.test.ts:23, 65b3062f9c33)
  • Pinned native job succeeded: GitHub confirms checks-windows-node-test-2 succeeded on the reviewed head, including its test execution step: https://github.com/openclaw/openclaw/actions/runs/34799031235/job/103837968744. Raw log retrieval redirected to a host blocked by the review environment; this limits independent log inspection, not the recorded job result. (65b3062f9c33)
  • Launcher generator contract: The patch's staged-output comparison and native npm fixture depend on npm's launcher generation. Installed cmd-shim 7.0.0 identifies npm/cmd-shim as its repository; its source generates extensionless, CMD, and PowerShell wrappers using relative package targets. This corroborates the generator contract but does not establish the Windows runner's exact dependency version. (lib/index.js)
  • Current main still lacks relocation admission: The fetched main target resolver switches to Git only from non-Git installations and has no dirty-checkout relocation admission. The Windows contribution is therefore still distinct from current main. (src/cli/update-cli/update-command-target.ts, dce5ea72e8ea)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record the published-driver × candidate Windows result and the supported path for obtaining the repaired updater.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-14T01:23:57.818Z sha c03d3c311d0c6bcbe393c4a8853d87a878b4df76 :: blocked before merge. :: [P2] Complete Windows recognition before enabling the success test in CI
  • reviewed 2026-09-14T01:51:00.449Z sha 17847d9 :: blocked before merge. :: none
  • reviewed 2026-09-14T02:36:10.164Z sha 65b3062 :: blocked before merge. :: none

@RomneyDa
RomneyDa force-pushed the fix/update-windows-launcher-relocation branch from c03d3c3 to 17847d9 Compare September 14, 2026 01:42
@RomneyDa
RomneyDa changed the base branch from fix/update-dirty-relocation to fix/update-installer-relocation September 14, 2026 01:42
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 14, 2026
@RomneyDa
RomneyDa force-pushed the fix/update-windows-launcher-relocation branch from 17847d9 to 65b3062 Compare September 14, 2026 02:23
@RomneyDa
RomneyDa force-pushed the fix/update-installer-relocation branch from 39205f2 to 16cd95f Compare September 14, 2026 02:23
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 14, 2026
@RomneyDa
RomneyDa merged commit 2f7ec3a into fix/update-installer-relocation Sep 14, 2026
226 of 297 checks passed
@RomneyDa
RomneyDa deleted the fix/update-windows-launcher-relocation branch September 14, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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.

1 participant