Skip to content

fix: set up the harness with pnpm/setup - #57

Merged
zkochan merged 4 commits into
mainfrom
remove-corepack
Aug 15, 2026
Merged

zkochan merged 4 commits into
mainfrom
remove-corepack

Conversation

@zkochan

@zkochan zkochan commented Aug 15, 2026

Copy link
Copy Markdown
Member

Fixes the failed benchmark run: the job installed its pnpm through corepack, and corepack exports COREPACK_ROOT to every child process — so the pnpm 12 the benchmark bootstraps saw it, concluded it was corepack-managed, and refused self-update with ERR_PNPM_CANT_SELF_UPDATE_IN_COREPACK before anything was measured. Reproduced locally by exporting COREPACK_ROOT and running the provisioning.

pnpm/setup removes corepack from the job entirely: it installs a standalone, signature-verified pnpm at the version the repo's packageManager field pins, installs the Node.js the harness runs on (runtime: node@24), and runs pnpm install — replacing the corepack block, actions/setup-node, and the explicit install step in one go.

🤖 Generated with Claude Code

The job installed its pnpm through corepack, and corepack exports
COREPACK_ROOT to every child process — so the pnpm 12 the benchmark
bootstraps saw it, concluded it was corepack-managed, and refused
`self-update` (ERR_PNPM_CANT_SELF_UPDATE_IN_COREPACK), failing the run
before anything was measured.

pnpm/setup installs a standalone, signature-verified pnpm at the version
the repo's packageManager field pins, installs the Node.js the harness
runs on, and runs `pnpm install` — replacing the corepack block,
actions/setup-node, and the explicit install step.

Co-Authored-By: Claude Fable 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Aug 15, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@zkochan, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 19 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 793bb0e5-db2b-4553-bfd6-f8784e3e27fe

📥 Commits

Reviewing files that changed from the base of the PR and between 67caa4b and b69d3b3.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • .github/workflows/benchmark.yml
  • package.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

pnpm/setup reads the runtime from package.json, so the version lives with
the rest of the harness's pins instead of in the workflow.

Co-Authored-By: Claude Fable 5 <[email protected]>
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix benchmark workflow by using pnpm/setup instead of corepack

🐞 Bug fix ⚙️ Configuration changes 🕐 Less than 10 minutes

Grey Divider

AI Description

• Replace corepack-based pnpm install with pnpm/setup to avoid COREPACK_ROOT interference.
• Pin harness Node.js runtime via pnpm/setup (node@24) and run pnpm install implicitly.
• Remove redundant setup-node and explicit pnpm install steps to unblock benchmark execution.
Diagram

graph TD
  A["GitHub Actions: benchmark job"] --> B["actions/checkout@v4"] --> C["pnpm/setup@v2 (node@24 + pnpm install)"] --> D["Install fnm"] --> E["Benchmark harness runs"]
  X["corepack (removed)"] -. "avoids COREPACK_ROOT" .-> C
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Keep corepack, but explicitly sanitize COREPACK_ROOT
  • ➕ Minimal change to existing approach (still uses corepack).
  • ➕ Avoids introducing a new action dependency.
  • ➖ Easy to miss other corepack-related env/behavior changes.
  • ➖ More fragile over time as corepack behavior evolves; requires ongoing maintenance.
2. Use actions/setup-node with pnpm cache + install pnpm without corepack
  • ➕ Avoids corepack entirely while keeping common setup-node patterns.
  • ➕ Can retain explicit control over pnpm version installation method.
  • ➖ More steps and bespoke scripting than pnpm/setup.
  • ➖ Still requires you to keep pnpm version in sync with packageManager pin.
3. Avoid pnpm self-update in provisioning (if feasible)
  • ➕ Eliminates the specific failure mode triggering ERR_PNPM_CANT_SELF_UPDATE_IN_COREPACK.
  • ➕ Less reliance on pnpm mutating itself at runtime.
  • ➖ May not be compatible with how the harness bootstraps/benchmarks pnpm versions.
  • ➖ Could reduce fidelity if self-update behavior is part of the benchmark scenario.

Recommendation: The PR’s approach (pnpm/setup) is the most robust: it removes corepack from the job entirely (eliminating COREPACK_ROOT leakage), ensures pnpm is signature-verified and aligned with the repo’s packageManager pin, and simplifies the workflow by combining Node runtime setup and pnpm install. Alternatives either add fragility (env sanitization) or reintroduce scripting complexity.

Files changed (1) +5 / -9

Other (1) +5 / -9
benchmark.ymlReplace corepack/setup-node with pnpm/setup for harness provisioning +5/-9

Replace corepack/setup-node with pnpm/setup for harness provisioning

• Removes the corepack-based pnpm installation and actions/setup-node usage, switching to pnpm/setup@v2 with runtime node@24. This also drops the explicit pnpm install step because pnpm/setup performs the install, preventing COREPACK_ROOT from causing pnpm self-update failures in the benchmark bootstrap.

.github/workflows/benchmark.yml

The pin moves from `packageManager` to `devEngines.packageManager` as a
range on the v12 line, next to the runtime pin, and the `engines` field —
which contradicted it — goes away. pnpm/setup reads both pins, so the
workflow names no versions at all. The lockfile is regenerated by pnpm 12,
which also records the pinned runtime in it; a frozen-lockfile install and
the tests pass under it.

Co-Authored-By: Claude Fable 5 <[email protected]>
The devEngines.packageManager range pin now has its resolution in
pnpm-lock.yaml's env document — pnpm 12.0.0-rc.6 with the platform-binary
closure — so every machine on the project runs the same pnpm rather than
whatever satisfying version it happens to have. Written by pnpm itself
(with pnpm/pnpm#13932 applied; the fastpath of released rc.6 preserves the
entry and installs with it frozen).

Co-Authored-By: Claude Fable 5 <[email protected]>
@zkochan
zkochan merged commit c8e3c7b into main Aug 15, 2026
3 checks passed
zkochan added a commit that referenced this pull request Aug 15, 2026
The Node.js version management scenarios measure pnpm's per-project
runtime switching, and a globalShims override in the inherited
environment reaches into both halves of it: at link time it makes
`pnpm runtime set` write a plain link instead of the switching shim, and
at run time it turns an already-written shim's dispatch off. CI is such
an environment since #57 — pnpm/setup exports
PNPM_CONFIG_GLOBAL_SHIMS={"node":false} to keep the runtime it installed
authoritative for the job — which made the pinned-project scenario run
the global default and fail its version assertion. The runner now blanks
the override (empty means unset to pnpm) in the environment it builds.

Co-authored-by: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant