Skip to content

ci(musl): replace corepack with oxc-project/setup-node#367

Merged
Boshen merged 8 commits intomainfrom
boshen/musl-setup-node
Apr 29, 2026
Merged

ci(musl): replace corepack with oxc-project/setup-node#367
Boshen merged 8 commits intomainfrom
boshen/musl-setup-node

Conversation

@Boshen
Copy link
Copy Markdown
Member

@Boshen Boshen commented Apr 29, 2026

Summary

The musl test job runs in a Node Alpine container and used corepack enable to bootstrap pnpm. Node 25 unbundles corepack, so the renovate bump from node:22-alpine3.21 to node:25-alpine3.21 (#361) fails with corepack: command not found (see run 24967913479).

Use oxc-project/setup-node@v1.2.0, which installs pnpm directly and gates the pnpm-store cache to main (save on main, restore-only on PRs). Mirrors the existing pattern at .github/workflows/ci.yml:148-153 (action + follow-up pnpm install for test bins).

🤖 Generated with Claude Code

The musl test job runs in a Node Alpine container and used corepack to
bootstrap pnpm. Node 25 unbundles corepack, so the renovate bump from
node:22-alpine3.21 to node:25-alpine3.21 (#361) fails with
\`corepack: command not found\`.

Use oxc-project/setup-node@v1.2.0, which installs pnpm directly and
gates the pnpm-store cache to main (save on main, restore-only on PRs).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 80d5dbca6b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml Outdated
run: |
corepack enable
pnpm install
- uses: oxc-project/setup-node@4c26e7cb3605b6bdef5450dacd02c434b10fd8ba # v1.2.0
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep musl job on a musl-compatible Node runtime

Replacing corepack enable with oxc-project/setup-node in the Alpine-based test-musl job can make the job use a glibc Node distribution (actions/setup-node resolves linux-x64 tarballs) instead of the container’s musl Node, which can break the subsequent pnpm install/ignored-test phase on Alpine. This regression is specific to the musl container path (node:*-alpine) and is introduced by this step swap, so the musl job may start failing even though it previously worked with the image-provided Node + corepack.

Useful? React with 👍 / 👎.

oxc-project/setup-node uses actions/setup-node, which only distributes
glibc Node binaries. Inside node:22-alpine3.21, the glibc binary
shadows the container's musl Node and can't run, so fspy's `node_fs`
tests fail with ENOENT when spawning a node subprocess.

Install pnpm via `npm install -g pnpm` in the musl job — the alpine
image already provides musl-native Node + npm. Also drop the now-redundant
actions/setup-node + follow-up pnpm install in the matrix `test` job
(oxc-project/setup-node already runs pnpm install).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 42e67cec27

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml Outdated
architecture: x64
if: ${{ matrix.target == 'x86_64-apple-darwin' }}

- uses: oxc-project/setup-node@4c26e7cb3605b6bdef5450dacd02c434b10fd8ba # v1.2.0
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep x64 Node for x86_64 macOS test matrix

This change removes the only step that forced architecture: x64 for the x86_64-apple-darwin leg, but that leg still runs on an arm64 macOS runner and the inline comment explains the ignored tests require an x64 Node process (for the x86_64 fspy preload dylib under Rosetta). With only oxc-project/setup-node (no architecture input), Node defaults to runner architecture, so the x86_64 matrix can execute ignored tests against arm64 Node and fail.

Useful? React with 👍 / 👎.

Boshen and others added 3 commits April 29, 2026 20:03
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Points at oxc-project/setup-node#19 (auto-skip-alpine), which detects
Alpine via /etc/alpine-release and skips actions/setup-node so the
container's musl Node is preserved. Replaces the npm-install workaround.
Will re-pin to the merge SHA once #19 lands.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
oxc-project/setup-node already runs pnpm/action-setup internally, so the
darwin-only step was a no-op. Stale comment referenced an architecture
limitation that the action no longer has.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 655c76905d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml Outdated
architecture: x64
if: ${{ matrix.target == 'x86_64-apple-darwin' }}

- uses: oxc-project/setup-node@4c26e7cb3605b6bdef5450dacd02c434b10fd8ba # v1.2.0
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Set x64 Node for the x86_64 macOS test leg

This unconditional oxc-project/setup-node call no longer forces an x64 Node runtime for the matrix.target == 'x86_64-apple-darwin' job, so that leg will default to the runner architecture (arm64) and can run ignored tests under the wrong Node ABI for x86_64-only preload artifacts. Fresh evidence: the pinned action (oxc-project/setup-node@4c26e7c) defines an architecture input and states it defaults to runner architecture when unset, and this step does not pass with: architecture: x64 for that matrix entry.

Useful? React with 👍 / 👎.

Boshen and others added 3 commits April 29, 2026 21:31
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Picks up Alpine auto-skip so the musl job can use the action directly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The x86_64-apple-darwin job runs on an arm64 Mac runner under Rosetta.
Without explicitly requesting x64 Node, oxc-project/setup-node installs
the runner's native arm64 Node and fspy's x86_64 preload dylib can't be
injected into spawned node processes, breaking the node_fs tests.

Pass architecture: x64 conditionally when matrix.target is the cross
target; other targets get the default (runner-native) Node.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Boshen Boshen merged commit cae7216 into main Apr 29, 2026
12 checks passed
@Boshen Boshen deleted the boshen/musl-setup-node branch April 29, 2026 14:22
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