fix: export corepack env vars + disable vp env node management#77
Merged
darcyclarke merged 1 commit intomainfrom Mar 17, 2026
Merged
fix: export corepack env vars + disable vp env node management#77darcyclarke merged 1 commit intomainfrom
darcyclarke merged 1 commit intomainfrom
Conversation
f7acd2a to
ae23b0a
Compare
ae23b0a to
6a0eaa4
Compare
Two issues causing the run/run benchmark to fail: 1. **vp env management**: The vp installer auto-enables Node.js version management in CI ($CI env var), creating shims that intercept node/npm/corepack. Fixed by running 'vp env off' after install. 2. **corepack strict mode**: COREPACK_ENABLE_STRICT and COREPACK_ENABLE_AUTO_PIN were set in setup.sh but never exported or persisted via GITHUB_ENV. In corepack 0.34+, strict mode (on by default) refuses to run a package manager that doesn't match the packageManager field. Since zpm's prepare sets packageManager=yarn@6.0.0-rc.15 and cleanup relies on vlt pkg rm to remove it, any cleanup hiccup leaves the field in place — and corepack immediately rejects pnpm. Additionally, auto-pin (on by default) causes corepack to ADD a packageManager field when one doesn't exist, contaminating the fixture state between benchmark iterations. Fixed by exporting the vars and persisting them to GITHUB_ENV so all subsequent CI steps (including the benchmark run) inherit them.
6a0eaa4 to
fcf140e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Since the vp PR (#76) was merged, the
run/runbenchmark job fails consistently on every CI run:Failing runs: 23092848951, 23108493842, 23139487059
Root Causes (two issues)
1. vp installer hijacks Node.js
The vp installer auto-enables Node.js version management when
$CIis set (always true in GitHub Actions). This creates shims at~/.vite-plus/bin/node,npm,npxthat intercept all Node.js calls.Evidence: npm stayed at 11.9.0 instead of upgrading to 11.11.1 after
npm install -g npm@latest.2. Corepack env vars not persisted across CI steps
setup.shsetsCOREPACK_ENABLE_STRICT=0andCOREPACK_ENABLE_AUTO_PIN=0, but these were never exported or written to$GITHUB_ENV. They only applied within the setup step itself.In the benchmark step, corepack 0.34+ runs with defaults:
COREPACK_ENABLE_STRICT=1: Refuses to run a PM that doesn't match thepackageManagerfield. Since zpm's prepare setspackageManager=yarn@6.0.0-rc.15, and the cleanup may not fully restore it (thegit checkout -- packages/ package.jsoninclean_workspace_protocolfails silently whenpackages/doesn't exist in therunfixture), pnpm's prepare seespackageManager=yarnand corepack immediately rejects it (exit code 1 in ~0.04s).COREPACK_ENABLE_AUTO_PIN=1: Corepack auto-adds apackageManagerfield when one doesn't exist, contaminating the fixture between iterations.Reproduction (corepack 0.34.6):
Fix
vp env offafter installing vp to disable its Node.js shimsCOREPACK_ENABLE_STRICT=0andCOREPACK_ENABLE_AUTO_PIN=0to$GITHUB_ENVso all CI steps inherit them