Skip to content

fix: add corepack enable to CI workflow to restore pnpm availability#317

Open
jamiesb00 wants to merge 6 commits intomainfrom
fix/ci-corepack-pnpm
Open

fix: add corepack enable to CI workflow to restore pnpm availability#317
jamiesb00 wants to merge 6 commits intomainfrom
fix/ci-corepack-pnpm

Conversation

@jamiesb00
Copy link
Copy Markdown
Contributor

Summary

  • pnpm is not available by default on the Blacksmith runner -- it must be activated via corepack
  • The check job's make check step (in workers/javascript) calls bare pnpm commands, which fail with pnpm: command not found
  • This has caused 100% CI failure since Jan 8 2026, when the Makefile was changed from npx pnpm install to bare pnpm install without a corresponding workflow update
  • The test-js job was unaffected because it uses npx pnpm directly in the workflow, which downloads pnpm on the fly

Fix

Add a single step after actions/setup-node to enable corepack and activate pnpm:

- run: corepack enable && corepack prepare pnpm@10.29.2 --activate

The version 10.29.2 is pinned in the root package.json "packageManager" field and is what corepack will resolve to anyway -- making it explicit avoids any network lookup.

Test plan

  • Verify the check job passes on this branch (pnpm available, make check in workers/javascript succeeds)
  • Verify test-js job still passes (unaffected -- continues using npx pnpm)
  • Verify test-go and test-py jobs still pass (no changes to those jobs)

The check job calls make check in workers/javascript, which invokes bare
pnpm commands. pnpm is not available on the Blacksmith runner by default.
The Makefile was changed from npx pnpm to bare pnpm without a corresponding
workflow update, breaking CI since Jan 8 2026.

Add corepack enable + corepack prepare after setup-node so pnpm@10.29.2
is available before make check runs.
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.72%. Comparing base (ef72d2f) to head (aac66dd).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #317      +/-   ##
==========================================
- Coverage   61.73%   61.72%   -0.02%     
==========================================
  Files         250      250              
  Lines       17871    17871              
  Branches      172      172              
==========================================
- Hits        11033    11031       -2     
- Misses       6053     6055       +2     
  Partials      785      785              
Flag Coverage Δ
test-go 62.36% <ø> (-0.02%) ⬇️
test-py 55.68% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@jamiesb00 jamiesb00 enabled auto-merge (squash) March 18, 2026 19:13
- check job: setup-node + corepack must run before pre-commit/action so the
  pnpm-lint-mocks hook can find pnpm; previously node was set up after pre-commit
- test-js job: make build calls make deps which calls bare pnpm; add corepack
  enable step after setup-node to make pnpm available before make build
The pnpm-lint-mocks pre-commit hook requires mocks/node_modules to be
populated. Add an explicit pnpm install step before pre-commit runs.

The make build and make check steps in test-js and check jobs require
authentication to npm.pkg.github.com to fetch private @superblocksteam
packages. Set NPM_TOKEN=${{ secrets.GITHUB_TOKEN }} on those steps.
…space

pnpm install --filter mocks installs only mocks' public dependencies
(eslint etc.) without triggering auth for private @superblocksteam/*
packages. GITHUB_TOKEN only has read access to same-repo packages and
gets 403 for cross-repo org packages.

Use AGENT_RELEASE_PAT (existing PAT secret) as NPM_TOKEN for the steps
that do a full workspace install: make check and make build in test-js.
…EASE_PAT

AGENT_RELEASE_PAT returns 401 Unauthorized for @superblocksteam/* packages.
Switch to github.token with permissions.packages:read (plus contents:read
for checkout) -- the correct modern approach for org-internal package access
in GitHub Actions.
…cross-repo packages)

github.token with packages:read returns 403 for @superblocksteam/* packages because
they are in separate repos and GitHub Actions GITHUB_TOKEN cannot access cross-repo
packages in the same org. AGENT_RELEASE_PAT (a classic PAT with read:packages scope)
is the correct credential -- it just needs rotation as the current value is expired.
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.

2 participants