Skip to content

build: upgrade to pnpm 12 - #17156

Merged
nwparker merged 1 commit into
stablyai:mainfrom
nwparker:nwparker/pnpm12
Aug 29, 2026
Merged

nwparker merged 1 commit into
stablyai:mainfrom
nwparker:nwparker/pnpm12

Conversation

@nwparker

@nwparker nwparker commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Upgrade Orca's package manager from pnpm 10 to pnpm 12 while preserving the dependency, patch, architecture, hoisting, release-age, and build-script policies we already rely on.

What Changed

  • Pin pnpm 12.0.0 and regenerate the desktop and mobile lockfiles with pnpm 12.
  • Move pnpm settings from the now-ignored package.json#pnpm and .npmrc locations into each pnpm-workspace.yaml, including explicit build allow/deny policy.
  • Migrate all 22 CI setup steps from the pnpm-10-only pnpm/action-setup action to pnpm/setup@v2, with automatic installs disabled and the integrity-pinned packageManager declaration as the single version source.
  • Update the headless-pairing Docker bootstrap and make the Windows native rebuild path accept pnpm 12's native pnpm.exe as well as Corepack's pnpm.cmd.
  • Normalize two existing dependency patches for pnpm 12's Rust patch parser and update the xterm patch generator for pnpm 12's diff flags, multi-document lockfile, and flattened patch hashes.

Why

pnpm 11+ no longer reads project pnpm settings from package.json#pnpm or non-registry settings from .npmrc, and pnpm 12 uses a stricter native patch parser. Moving the settings and normalizing the patches keeps installs reproducible instead of silently dropping policy or failing on a clean install.

CI Performance

Measured against the median of five adjacent successful pnpm 10 PR runs (33274209872, 33274471001, 33274584159, 33274625294, and 33274749051) versus the green pnpm 12 run 33274652961:

Lane pnpm 10 median pnpm 12 Change
Eight test-shard dependency steps, aggregate 250s 202s -48s / -19%
Eight test shards, aggregate job time 2,277s 2,113s -164s / -7%
Slowest test shard (parallel-suite wall-time proxy) 325s 309s -16s / -5%
Typecheck dependency step 20s 14s -30%
Typecheck job 82s 75s -9%
Static-analysis dependency step 30s 23s -23%
Static-analysis job 192s 178s -7%
Windows package dependency step 134s 97s -37s / -28%
Windows package job 302s 244s -58s / -19%
macOS package dependency step 30s 27s -10%
macOS package job 188s 209s +21s / +11%

Across the 12 directly comparable jobs, aggregate runner time fell from a 3,101s median to 2,819s: 282 runner-seconds saved per PR run (~4m42s, 9%). Jobs fan out, so aggregate runner time is not the same as workflow wall time. Hosted-runner/cache noise is material; the macOS package job shows that build/sign/package work can dominate the faster dependency phase. This is a CI/install improvement, not an application-runtime performance change.

Linked Issue

N/A — direct package-manager maintenance upgrade.

Visual Proof

N/A — toolchain and dependency-install behavior only; no UI or interaction changes.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Verified on macOS arm64 with Node 24:

  • corepack pnpm --version → 12.0.0
  • Frozen desktop and mobile installs, including patched dependencies
  • pnpm tc
  • pnpm --dir mobile typecheck
  • Focused contract suite: 105 tests passed, 1 intentional skip
  • pnpm run check:code-quality:changed → 0 findings
  • node config/scripts/regenerate-xterm-patches.mjs --check → patches in sync
  • All 22 pnpm/setup@v2 workflow steps parse with automatic install disabled and no duplicated version pin
  • Full PR matrix: 31 successful, 4 intentionally skipped, 0 failed/pending, including Windows native smoke/package, macOS/Linux native smoke, all eight Node 24 shards, cross-version wire compatibility, typecheck, static analysis, mobile, xterm sync, Git compatibility, and changed-spec Electron E2E

Concerns / Follow-ups

  • Major .0 release: pnpm 12.0.0 has less ecosystem soak than a later 12.x. The exact version plus integrity pin prevents surprise drift, but follow-up point-release upgrades remain manual.
  • Lockfile consumers: pnpm 12 prepends a package-manager lock document and flattens patchedDependencies hashes. Known repository consumers now handle this and the full matrix is green; future custom lockfile readers must parse all YAML documents rather than assuming one document.
  • Windows executable shape: pnpm/setup@v2 installs native pnpm.exe, while Corepack commonly exposes pnpm.cmd. The affected native rebuild path now supports both and Windows smoke/package pass; future direct Windows child-process calls should not assume only .cmd exists.
  • Performance variance: the dependency phase is consistently faster in the sampled hot lanes, but end-to-end gains vary with runner/cache state and downstream build work. macOS packaging was 11% slower in the measured pnpm 12 run despite a 10% faster dependency step.
  • Policy preservation: minimumReleaseAge, hoisting, architecture targets, overrides, patches, and explicit build allow/deny policy are preserved in the canonical workspace files.

Review

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Cross-platform target architectures remain explicit for macOS, Linux, and Windows on x64/arm64.
  • The CI action installs pnpm's signed/checksummed native per-platform binary, performs one frozen script-free dependency install, and keeps actions/setup-node ordering/cache behavior intact.
  • SSH execution and folder-workspace behavior are unaffected; mobile's independent workspace and lockfile are migrated and validated separately.
  • The verified PR head is 5ab025b; GitHub reports the PR clean and mergeable.

Checklist

  • This PR is small and focused
  • I explained what changed and why (including ELI5)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The repository upgrades its package manager from pnpm 10 to pnpm 12. pnpm settings move from package manifests and .npmrc files into workspace YAML files. GitHub Actions workflows switch to pnpm/setup@v2 and add workspace-file validation. Patch-generation scripts and tests support pnpm 12 lockfile output. Windows process-tree build settings and process enumeration change. Packaging tests and documentation now reference workspace configuration.

Merge Risk: 🟡 Moderate · up to 5ab02

The workflows can select older refs whose package-manager metadata is incompatible with the new setup behavior, causing CI or release jobs to fail before dependencies are installed. Merge should wait for a compatibility path for those refs or explicit owner acceptance of the bounded release risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 10 files. (26 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely summarizes the primary change: upgrading the repository from pnpm 10 to pnpm 12.
Description check ✅ Passed The description is comprehensive and covers the required sections, including scope, rationale, testing, cross-platform impact, and checklist completion. However, the Linked Issue section contains "N/A…
Full details: Docstring Coverage

Explanation

Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 10 files. (26 skipped: 26 unsupported.)

Full details: Description check

Explanation

The description is comprehensive and covers the required sections, including scope, rationale, testing, cross-platform impact, and checklist completion. However, the Linked Issue section contains "N/A" even though the template requires an issue link.

  • Fix all pre-merge checks with AI

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.

@greptile-apps

greptile-apps Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Greptile Summary

The PR upgrades the desktop and mobile workspaces to pnpm 12 while migrating package-manager policy and CI setup to pnpm 12-compatible locations and interfaces.

  • Pins pnpm 12.0.0 and regenerates both lockfiles.
  • Moves hoisting, release-age, architecture, patch, override, and build-script policies into workspace manifests.
  • Migrates CI workflows to pnpm/setup@v2.
  • Normalizes dependency patches and updates patch-generation contracts.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains within the eligible follow-up-review scope.

No blocking failure remains.

Important Files Changed

Filename Overview
package.json Pins pnpm 12 and removes package-level pnpm configuration now represented by the root workspace manifest.
pnpm-workspace.yaml Centralizes desktop dependency overrides, patch declarations, architecture targets, hoisting, release-age, and build policies.
mobile/pnpm-workspace.yaml Adds pnpm 12-compatible mobile overrides, patch declarations, release-age policy, and build permissions.
.github/actions/install-node-dependencies/action.yml Migrates the shared dependency-install action to the new pnpm setup action and extends the clean-install guard to the workspace manifest.
config/scripts/regenerate-xterm-patches.mjs Updates patch generation and lockfile hash handling for pnpm 12’s patch and lockfile formats.
pnpm-lock.yaml Regenerates the desktop lockfile with pnpm 12’s flattened patched-dependency hashes.
mobile/pnpm-lock.yaml Regenerates the independent mobile lockfile for pnpm 12.

Reviews (2): Last reviewed commit: "build: upgrade to pnpm 12" | Re-trigger Greptile

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2ec5d2ba-99d3-4110-bcaa-3733a7549b39

📥 Commits

Reviewing files that changed from the base of the PR and between 0bf5361 and 5ab025b.

⛔ Files ignored due to path filters (2)
  • mobile/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (40)
  • .github/actions/install-node-dependencies/action.yml
  • .github/workflows/adhoc-mac-build.yml
  • .github/workflows/daemon-relocation-spike.yml
  • .github/workflows/daily-mac-build.yml
  • .github/workflows/dev-channel-win-build.yml
  • .github/workflows/golden-e2e-experiment.yml
  • .github/workflows/hourly-mac-build.yml
  • .github/workflows/linux-wayland-gpu-sandbox.yml
  • .github/workflows/mobile-android-release.yml
  • .github/workflows/mobile-ios-release.yml
  • .github/workflows/mobile.yml
  • .github/workflows/release-cut.yml
  • .github/workflows/release-mac-build.yml
  • .github/workflows/terminal-ime-e2e.yml
  • .github/workflows/terminal-perf.yml
  • .github/workflows/win-crash-survival-e2e.yml
  • .github/workflows/win-update-e2e.yml
  • .github/workflows/win-update-survival-e2e.yml
  • .github/workflows/windows-signing-rehearsal.yml
  • .github/workflows/windows-terminal-restart-e2e.yml
  • .npmrc
  • config/docker/headless-pairing/Dockerfile.build
  • config/patches/@vscode__windows-process-tree@0.8.0.patch
  • config/patches/@xterm__addon-webgl@0.20.0-beta.286.patch
  • config/scripts/computer-e2e-workflow.test.mjs
  • config/scripts/ensure-native-runtime.mjs
  • config/scripts/install-node-dependencies-action.test.mjs
  • config/scripts/package-electron-runtime-contract.test.mjs
  • config/scripts/pr-workflow-parallelism.test.mjs
  • config/scripts/regenerate-xterm-patches.mjs
  • config/scripts/regenerate-xterm-patches.test.mjs
  • config/scripts/verify-telemetry-constants.mjs
  • config/scripts/windows-process-tree-patch-contract.test.mjs
  • docs/reference/windows-process-enumeration.md
  • mobile/.npmrc
  • mobile/package.json
  • mobile/pnpm-workspace.yaml
  • package.json
  • pnpm-workspace.yaml
  • tests/e2e/terminal-windows-codex-multiline-paste.spec.ts
💤 Files with no reviewable changes (3)
  • mobile/.npmrc
  • .npmrc
  • mobile/package.json

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.

Comment on lines +1196 to +1198
uses: pnpm/setup@v2
with:
version: 10.24.0
run_install: false
install: false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

Make package-manager setup compatible with selected refs.

These workflows check out caller-selected tags, branches, or SHAs, then invoke pnpm/setup@v2 without a version input. A selected tree that declares pnpm 10.24.0 or lacks package-manager metadata can fail during setup, before dependency installation. Add a compatibility path for pre-pnpm-11 refs at all affected setup sites, or select setup behavior from the checked-out manifest.

📍 Affects 2 files
  • .github/workflows/release-cut.yml#L1196-L1198 (this comment)
  • .github/workflows/adhoc-mac-build.yml#L174-L176

@nwparker
nwparker merged commit b17f60d into stablyai:main Aug 29, 2026
35 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
nwparker added a commit that referenced this pull request Oct 19, 2026
The root moved to pnpm 12 in #17156 but these two isolated workspaces were
left on pnpm 10, so CI and deploys carried a second pnpm and pnpm/action-setup.

- Pin the root's integrity-checked pnpm 12.14.0 and regenerate both
  lockfiles (only the pnpm 12 package-manager document is added; the
  dependency graph is unchanged).
- Move settings pnpm 12 ignores out of .npmrc and package.json#pnpm into
  each pnpm-workspace.yaml; onlyBuiltDependencies becomes allowBuilds, and
  cloud keeps esbuild's script skipped as pnpm 10 did. package-manager-strict
  is gone in pnpm 12, whose own version pinning supersedes it.
- docs/site drops --ignore-workspace: under pnpm 12 it skips the workspace
  file, losing the overrides and failing the frozen install. vercel.json now
  pins install/build so a stale dashboard command cannot reintroduce it.
- Cloud and docs workflows use pnpm/setup@v2 like the root; the relay
  unit-test step uses the root's pnpm instead of npx pnpm@10.
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