Repository navigation
chore: provision node and bun via nix instead of pnpm - #1271
Conversation
`package.json` declared `engines.runtime` for node and bun with `onFail: download`, so pnpm fetched and managed those runtimes itself. That made every environment depend on a pnpm-managed download at runtime instead of the pinned Nix toolchain. Drop `engines.runtime` and provide both runtimes explicitly: - dev shell: add `nodejs_24` (bun was already present). - test job: install `nodejs_24` for Vitest (dropping the unused bun). - pkg-pr-new: add `nodejs_24` and `bun` for the tsdown / ensure-native-binary prepack scripts that previously relied on the managed runtimes. - perf jobs: add `nodejs_24` alongside the existing bun. - release: add `bun`; node still comes from `setup-node`, which is kept for the npm registry auth and provenance setup. Verified locally with a clean pnpm state: `pnpm install --frozen-lockfile` no longer manages runtimes and Vitest runs on the PATH node.
The lockfile recorded the `engines.runtime` node/bun entries as `runtime:` dependencies. With `engines.runtime` removed, regenerate the lockfile so `pnpm install --frozen-lockfile` stays in sync and no longer resolves the pnpm-managed runtimes.
Pin to the unversioned `pnpm` and `nodejs` attributes rather than `pnpm_11` / `nodejs_24`. `pnpm` currently resolves to 11.1.1 (same as the explicit alias, matching the lockfile) and `nodejs` tracks the active LTS, so the dev shell and CI follow the maintained defaults without hard-coding a major.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR updates toolchain provisioning across CI workflows, release workflow, and dev shell by migrating from ChangesToolchain Provisioning Updates
🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — Removes pnpm-managed runtime downloads (engines.runtime) for node and bun, provisioning both via Nix instead across the dev shell and all CI jobs.
- Drop
engines.runtime— Remove managed node/bun frompackage.json; regeneratepnpm-lock.yamlto dropruntime:entries - Update dev shell —
pnpm_11→pnpm, addnodejs(bun already present) - Update CI test job — Replace
pnpm_11/bunwithpnpm/nodejs(Vitest needs Node, not Bun) - Update CI
pkg-pr-new— Explicitly provisionnodejs+bunsince pnpm no longer auto-downloads them - Update CI perf jobs — Add
nodejsalongside existingbun - Update release — Add explicit
bunforensure-native-binaryprepack script
Big Pickle (free via Pullfrog for OSS) | 𝕏
ccusage performance comparisonPR SHA: This compares the Rust PR release binary against the configured base package on the same CI runner. Package runner startupExecution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one
Cached bunx execution performanceRuns the same large fixture through Fixtures: Claude
Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
ccusage performance comparisonPR SHA: This compares the PR package against the configured base package on the same CI runner. Package runner startupExecution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one
Cached bunx execution performanceRuns the same large fixture through Fixtures: Claude
Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |

Summary
Recreated from #1270 (which was auto-closed when its stacked base branch was
deleted on merge). Now targets
maindirectly with #1268/#1269 already landed.package.jsondeclaredengines.runtimefor node and bun withonFail: download, so pnpm fetched and managed those runtimes itself ratherthan using the pinned Nix toolchain. This removes that and provisions both
runtimes via Nix.
What changed
engines.runtime; pnpm-lock.yaml resynced (managed runtimes removed).nodejs(bun already present).test: installnodejsfor Vitest.pkg-pr-new: addnodejs+bunfor the tsdown / ensure-native-binary prepack scripts.nodejsalongside bun.bun; node still comes fromsetup-node(kept for npm registry auth / provenance).pnpm/nodejsnixpkgs attributes (pnpm 11.1.1, node LTS 24.x).Verification
With a clean pnpm state, after removing
engines.runtime:pnpm install --frozen-lockfileno longer manages/downloads node or bun.pnpm exec vitest runruns on the PATH Nix node; 34 tests pass.Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by cubic
Provision Node and Bun via Nix instead of
pnpmruntime downloads. Removesengines.runtimeand updates dev shell and CI to use Nix-pinnednodejsandbunfor reproducible builds.Refactors
nodejs; switch to nixpkgs defaults (pnpm,nodejs); keepbun.pnpm/nodejs/justvia Nix for Vitest.pkg-pr-new: installpnpm/nodejs/bunfortsdownandensure-native-binaryprepack scripts.nodejsalongsidebun.setup-nodefor npm auth/provenance; installpnpmandbunvia Nix.Dependencies
engines.runtimefrompackage.jsonto stoppnpm-managed runtime downloads.pnpm-lock.yamlto dropruntime:entries for Node and Bun.Written for commit 52e7887. Summary will update on new commits.
Summary by CodeRabbit