Skip to content

fix(ci): preserve prepared pnpm when selecting Node - #196352

Merged
vincentkoc merged 3 commits into
mainfrom
fix/ci-preserve-prepared-pnpm-20261110
Nov 10, 2026
Merged

vincentkoc merged 3 commits into
mainfrom
fix/ci-preserve-prepared-pnpm-20261110

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Dependency reconciliation can bypass the prepared pnpm launcher when install-dependencies.sh prepends the selected Node directory to PATH. On Testbox, this discards the launcher’s hydrated cache defaults and downloads packages a second time.

User Impact

CI and remote checks retain their selected package manager while using the selected Node runtime. A caller without pnpm on its original PATH still gets the existing Node-directory fallback. Frozen lockfile policy and install options are unchanged.

Why This Change Was Made

Resolve pnpm before adding NODE_BIN, and use that quoted executable for version probes and installation. Extend the existing frozen-policy regression with competing launchers and a fallback case. The exact 15-line test allocation records this coverage.

This completes the installer path behind the Testbox launchers introduced in #196332.

Evidence

In live run 42728915476, SSH reconciliation still downloaded 1,480 packages after hydration. Source inspection identified the PATH prepend selecting the original Node-directory pnpm instead of the prepared launcher.

A reproduction executing the real installer exits through the wrong pnpm on the base and uses the prepared launcher successfully with this patch. Independent caller review confirmed setup already prepares pnpm, while the fallback preserves Node-directory-only callers.

Validation:

  • Four focused shell regressions passed: prepared pnpm wins, frozen true/false/invalid remains correct, and Node-directory-only fallback works. Test time: 7.7 seconds; command wall time: 16.1 seconds. CI timing remains pending.
  • Focused typecheck, lint, workflow validation, final-head formatting, test-line budget, and whitespace checks passed.
  • Local ClawSweeper found no correctness or security issues in the production change. Independent review covered the caller contracts and fixture isolation.
  • Local dependencies were installed with lifecycle scripts disabled for these shell tests; this is not a full native build qualification.

Live cache reuse passed on Blacksmith Testbox tbx_01m71esg6gsscxktt07bcxvht5 in run 42731004451, allocated through workflow ref main with the exact reviewed source capsule. Selected-source reconciliation completed in 84 ms. Both the pnpm and Corepack launchers resolved the installed store; a clean-environment pnpm install --frozen-lockfile --offline passed in 0.12 seconds. Source input hashes matched. This verifies cache handoff, not a statistically controlled runner-cost comparison; the broader sizing experiment stays separate.

@clawsweeper

clawsweeper Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@vincentkoc vincentkoc self-assigned this Nov 10, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS labels Nov 10, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 10, 2026 00:41
@vincentkoc
vincentkoc enabled auto-merge (squash) November 10, 2026 00:45
@vincentkoc
vincentkoc merged commit e1af431 into main Nov 10, 2026
200 of 203 checks passed
@vincentkoc
vincentkoc deleted the fix/ci-preserve-prepared-pnpm-20261110 branch November 10, 2026 00:53
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant