Repository navigation
fix(env-installer): stop pinning the exe package from pnpm v12 - #13599
Conversation
From v12 the unscoped `pnpm` package is itself the native executable, so `@pnpm/exe` is no longer published alongside it. The env lockfile now pins only `pnpm` for those versions, in both stacks, instead of resolving a package that does not exist. The native-binary leg of the engine identity check followed `@pnpm/exe` by name, so it silently verified nothing once that package is absent. It now follows whichever package carries the host's platform binary as an optional dependency: `@pnpm/exe` for the majors that publish it, the unscoped `pnpm` from v12. On the TypeScript side the wanted version can arrive as a range or a dist-tag (`pnpm with latest`), so `pnpm` is resolved first and the second resolution only happens for the versions that do ship `@pnpm/exe`.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (8)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughThe changes make package-manager lockfile resolution and engine identity verification version-aware. pnpm versions 12 and later use native platform binaries supplied through ChangesNative engine resolution
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Installer
participant PackageResolver
participant EnvLockfile
participant EngineVerifier
Installer->>PackageResolver: resolve pnpm version
PackageResolver-->>Installer: return version-specific dependencies
Installer->>EnvLockfile: record selected packages
EnvLockfile-->>EngineVerifier: provide platform package metadata
EngineVerifier->>EngineVerifier: select native wrapper
EngineVerifier-->>Installer: verify native binary identity
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. 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. Comment |
PR Summary by QodoFix env lockfile pnpm v12 pins and verify native binary integrity
AI Description
Diagram
High-Level Assessment
Files changed (9)
|
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously reported named-registry version misclassification is corrected by extracting the concrete semver before deciding whether Reviews (2): Last reviewed commit: "chore(env-installer): sync tsconfig refe..." | Re-trigger Greptile |
Micro-Benchmark ResultsLinux |
Code Review by Qodo
Context used✅ Compliance rules (platform):
24 rules 1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
pnpm11/engine/pm/commands/src/self-updater/verifyPnpmEngineIdentity.ts (1)
107-125: 🔒 Security & Privacy | 🔴 Critical | ⚡ Quick winTS silently skips native-binary verification when wrapper metadata is missing; Rust fails closed for the same case. The root cause is the
?? {}fallback inverifyPnpmEngineIdentity.ts, which lets verification succeed without ever checking the actual native binary.
pnpm11/engine/pm/commands/src/self-updater/verifyPnpmEngineIdentity.ts#L107-L125: throw aPnpmErrorwhen the wrapper's snapshot/optionalDependenciesare missing, and again when no platform candidate matches, mirroring theErr(EngineIdentityUnverifiable)behavior inpnpm/crates/cli/src/cli_args/self_update/verify_engine.rs'scollect_engine_components.pnpm11/engine/pm/commands/test/self-updater/verifyPnpmEngineIdentity.test.ts#L104-L135: add a test with a wrapper snapshot missingoptionalDependencies(or missing a matching platform entry) and assertverifyPnpmEngineIdentityrejects it.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pnpm11/engine/pm/commands/src/self-updater/verifyPnpmEngineIdentity.ts` around lines 107 - 125, Update native wrapper handling in verifyPnpmEngineIdentity to throw a PnpmError when the wrapper snapshot or optionalDependencies are missing, and again when no platform candidate matches, instead of silently continuing without verification. Add a test in verifyPnpmEngineIdentity.test.ts covering missing optionalDependencies or a missing platform entry and assert that verifyPnpmEngineIdentity rejects.pnpm11/installing/env-installer/src/resolvePackageManagerIntegrities.ts (1)
34-45: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
isPackageManagerResolvednever checks the specifier, and no test covers a specifier-only change. The root cause is inresolvePackageManagerIntegrities.ts: the short-circuit check compares only the resolved version, never the specifier, unlike the Rustis_package_manager_resolved_with_depswhich requires both to match.
pnpm11/installing/env-installer/src/resolvePackageManagerIntegrities.ts#L34-L45: add awantedSpecifierparameter toisPackageManagerResolvedand requirepmDeps[name]?.specifier === wantedSpecifierin addition to the version check, matching the Rust contract.pnpm11/installing/env-installer/test/resolvePackageManagerIntegrities.test.ts#L1-L39: add a test where the specifier changes but the resolved version stays the same, and assertisPackageManagerResolvedreturnsfalse, mirroring the Rust test!is_package_manager_resolved(&env, "~11.0.0", "11.0.0").🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pnpm11/installing/env-installer/src/resolvePackageManagerIntegrities.ts` around lines 34 - 45, Update isPackageManagerResolved in pnpm11/installing/env-installer/src/resolvePackageManagerIntegrities.ts:34-45 to accept wantedSpecifier and require each dependency’s specifier and resolved version to match, preserving the Rust contract. Add a test in pnpm11/installing/env-installer/test/resolvePackageManagerIntegrities.test.ts:1-39 where the specifier changes while the resolved version remains the same, and assert isPackageManagerResolved returns false.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@pnpm11/engine/pm/commands/test/self-updater/verifyPnpmEngineIdentity.test.ts`:
- Around line 104-135: Add test coverage around verifyPnpmEngineIdentity using
an envLockfileV12 variant whose native pnpm snapshot omits optionalDependencies
or its matching platform entry, while package metadata remains otherwise valid.
Assert the verification rejects with the expected “Refusing to run pnpm” error,
covering both missing platform metadata cases without changing the existing
valid-lockfile test.
In
`@pnpm11/installing/env-installer/test/resolvePackageManagerIntegrities.test.ts`:
- Around line 1-39: Add a test in the resolvePackageManagerIntegrities suite
that keeps the pinned package version equal to the requested version but changes
its specifier, and assert isPackageManagerResolved returns false. Cover the
relevant pnpm/@pnpm/exe lockfile dependency shape using envLockfile, matching
the Rust behavior without changing existing tests.
---
Outside diff comments:
In `@pnpm11/engine/pm/commands/src/self-updater/verifyPnpmEngineIdentity.ts`:
- Around line 107-125: Update native wrapper handling in
verifyPnpmEngineIdentity to throw a PnpmError when the wrapper snapshot or
optionalDependencies are missing, and again when no platform candidate matches,
instead of silently continuing without verification. Add a test in
verifyPnpmEngineIdentity.test.ts covering missing optionalDependencies or a
missing platform entry and assert that verifyPnpmEngineIdentity rejects.
In `@pnpm11/installing/env-installer/src/resolvePackageManagerIntegrities.ts`:
- Around line 34-45: Update isPackageManagerResolved in
pnpm11/installing/env-installer/src/resolvePackageManagerIntegrities.ts:34-45 to
accept wantedSpecifier and require each dependency’s specifier and resolved
version to match, preserving the Rust contract. Add a test in
pnpm11/installing/env-installer/test/resolvePackageManagerIntegrities.test.ts:1-39
where the specifier changes while the resolved version remains the same, and
assert isPackageManagerResolved returns false.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 7bf7731a-4a53-48c3-be24-3aeedee8c82a
📒 Files selected for processing (9)
.changeset/env-lockfile-skips-pnpm-exe-from-v12.mdpnpm/crates/cli/src/cli_args/self_update/verify_engine.rspnpm/crates/cli/src/cli_args/self_update/verify_engine/tests.rspnpm/crates/env-installer/src/resolve_package_manager_integrities.rspnpm/crates/env-installer/src/tests.rspnpm11/engine/pm/commands/src/self-updater/verifyPnpmEngineIdentity.tspnpm11/engine/pm/commands/test/self-updater/verifyPnpmEngineIdentity.test.tspnpm11/installing/env-installer/src/resolvePackageManagerIntegrities.tspnpm11/installing/env-installer/test/resolvePackageManagerIntegrities.test.ts
Review follow-ups on the v12 engine-pin change: The v12 env lockfile pins only `pnpm`, so the pre-command test fixture had to drop its `@pnpm/exe` entry — it was the one test the change broke across every CI job. The TypeScript engine check treated a wrapper with no platform binaries in the lockfile as nothing to verify, so the bytes that actually execute went unchecked. It now fails closed on a missing snapshot, missing optional dependencies, or no host candidate, with the messages pacquet already used. A pnpm resolved from a named registry is referenced as `<registry>:<version>`, which does not parse as semver; the qualifier is now stripped before the version decides the package set. An exact specifier skips the probing resolution entirely, since the package set is known before resolving.
|
Correction to my thread replies above: they cite Written by an agent (Claude Code, claude-opus-5). |
khutchinskh-cmyk
left a comment
There was a problem hiding this comment.
Documentation Index
Fetch the complete documentation index at: https://docs.coderabbit.ai/llms.txt
Use this file to discover all available pages before exploring further.
Issue trackers
CodeRabbit integrates with popular issue tracking systems to enrich reviews with issue context, validate requirements, create issues from review comments, and design Coding Plans.
export const ProPlanBadge = ({tip = "This feature is available as part of the Pro, Pro+ and Enterprise plans. Please refer to our pricing page for more information about our plans and features.", title = "Pro Plan", cta = "Read more", href = "https://coderabbit.ai/pricing", disabled = false}) => {
return
<Badge icon="shield-check" disabled={disabled || undefined}>
{title}
;
};
Supported integrations
Works automatically without setup{" "} Works automatically without setup Works through your Azure DevOps platform setup Connect via the CodeRabbit Forge app from Atlassian Marketplace OAuth-based integration for Linear workspacesFeatures
CodeRabbit connects with your issue tracking systems to bring issue context into every stage of development, from planning through code review. Here's what the integration enables:
Pulls in issue details: descriptions, acceptance criteria, and discussions, so CodeRabbit understands *why* a change is being made. Assesses whether your code changes properly address the linked issue's acceptance criteria and flags any gaps. Analyzes your issues and codebase to generate step-by-step Coding Plans for a handoff to any coding agent or IDE copilot. Creates new issues directly from PR review comments, ensuring nothing discussed during review gets lost.Integration Guides
Install and configure the Jira Cloud integration via the Atlassian Marketplace Install and configure the Linear integration via OAuth
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13599 +/- ##
==========================================
- Coverage 88.00% 87.98% -0.02%
==========================================
Files 567 567
Lines 97930 97939 +9
==========================================
- Hits 86179 86176 -3
- Misses 11751 11763 +12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Code review by qodo was updated up to the latest commit bfb396d |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
On Qodo's remaining finding ( For a non-exact spec the second pass resolves both names in a single Pinning the second pass to the already-resolved version would also move the recorded If a dist-tag really can point at different versions for the two packages, the fix belongs with the specifier-recording contract in both stacks, not in this change. Written by an agent (Claude Code, claude-opus-5). |
Integrated-Benchmark Report (Linux)Commit: Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time). Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.47695114186,
"stddev": 0.14418759326606134,
"median": 2.40855428476,
"user": 1.63007974,
"system": 1.3188662199999999,
"min": 2.34929107876,
"max": 2.76586336776,
"times": [
2.37390905776,
2.61503766676,
2.76586336776,
2.40282834076,
2.34929107876,
2.41428022876,
2.37545801076,
2.64301830876,
2.37844969276,
2.45137566576
]
},
{
"command": "pacquet@main",
"mean": 2.51631262246,
"stddev": 0.15596113282435203,
"median": 2.50241495476,
"user": 1.62693194,
"system": 1.30397292,
"min": 2.35160141576,
"max": 2.71126598776,
"times": [
2.38077071476,
2.35160141576,
2.60123472776,
2.71001767476,
2.71126598776,
2.58059604076,
2.42423386876,
2.35878193376,
2.35925595476,
2.68536790576
]
},
{
"command": "pnpr@HEAD",
"mean": 1.49101798076,
"stddev": 0.15745921023383455,
"median": 1.4253696527600002,
"user": 1.2170675399999997,
"system": 1.11976272,
"min": 1.34402478476,
"max": 1.7802543697600002,
"times": [
1.45969894376,
1.34402478476,
1.37516316876,
1.36619194376,
1.7802543697600002,
1.6348152097600002,
1.35835743776,
1.6889924117600001,
1.39104036176,
1.51164117576
]
},
{
"command": "pnpr@main",
"mean": 1.4745974244600002,
"stddev": 0.1477351603109294,
"median": 1.43808343576,
"user": 1.19865034,
"system": 1.13047412,
"min": 1.34650088776,
"max": 1.78033196076,
"times": [
1.78033196076,
1.39404157376,
1.34650088776,
1.50660683976,
1.44437571776,
1.35169662276,
1.34731253976,
1.68598574376,
1.43179115376,
1.45733120476
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.25257255478,
"stddev": 0.0070046567260178645,
"median": 0.25060492698000003,
"user": 0.19539304,
"system": 0.51554104,
"min": 0.24634816048000002,
"max": 0.26747596548,
"times": [
0.25332810348,
0.24685265948000001,
0.24881652848000002,
0.24634816048000002,
0.26008329848,
0.25639805348,
0.26747596548,
0.24652499548,
0.24750445748000002,
0.25239332548000004
]
},
{
"command": "pacquet@main",
"mean": 0.24725746998000003,
"stddev": 0.006493875693547237,
"median": 0.24548293448000003,
"user": 0.20718343999999997,
"system": 0.49624554,
"min": 0.24063504748,
"max": 0.25829567448,
"times": [
0.25829567448,
0.24133460048000002,
0.25713780048,
0.24170002548000002,
0.24738923048000003,
0.25213583748,
0.24644303248000002,
0.24452283648,
0.24298061448000002,
0.24063504748
]
},
{
"command": "pnpr@HEAD",
"mean": 0.27421823108000004,
"stddev": 0.00521459954961582,
"median": 0.27463892048000005,
"user": 0.20635603999999996,
"system": 0.52827864,
"min": 0.26583492548000004,
"max": 0.28332460548,
"times": [
0.27807534148,
0.27484555648000003,
0.27301705748,
0.27819003948000004,
0.26967581548,
0.27637416248,
0.28332460548,
0.26583492548000004,
0.27443228448,
0.26841252248
]
},
{
"command": "pnpr@main",
"mean": 0.26514731458,
"stddev": 0.005745041667101113,
"median": 0.26469072198,
"user": 0.19572963999999998,
"system": 0.51904054,
"min": 0.25832726248000004,
"max": 0.27670253448000004,
"times": [
0.27175114048000004,
0.25832726248000004,
0.26445998548,
0.27670253448000004,
0.26312338748,
0.26492145848000004,
0.25908643048,
0.26719664248,
0.25993457448,
0.26596972948000003
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.58012914652,
"stddev": 0.01287366477436416,
"median": 2.5801250402200004,
"user": 1.6258584800000002,
"system": 1.3255100000000002,
"min": 2.55135874672,
"max": 2.60372765472,
"times": [
2.57620926172,
2.57786636372,
2.5783130127200002,
2.60372765472,
2.58371225672,
2.5857365417200002,
2.55135874672,
2.58193706772,
2.58529340272,
2.57713715672
]
},
{
"command": "pacquet@main",
"mean": 2.5765514264200005,
"stddev": 0.00982746216258867,
"median": 2.57451649272,
"user": 1.60488328,
"system": 1.3063301,
"min": 2.56023610672,
"max": 2.58967447172,
"times": [
2.56749736972,
2.5710923987200003,
2.58726242372,
2.57310035872,
2.58884755672,
2.58041087272,
2.58967447172,
2.57146007872,
2.5759326267200002,
2.56023610672
]
},
{
"command": "pnpr@HEAD",
"mean": 1.63358233652,
"stddev": 0.11031651849652473,
"median": 1.64378732972,
"user": 1.1955448800000001,
"system": 1.1508046,
"min": 1.45850570072,
"max": 1.7808129537200001,
"times": [
1.61596727372,
1.6716073857200002,
1.5517447127200001,
1.4785033247200001,
1.71929885072,
1.74848229372,
1.7808129537200001,
1.45850570072,
1.61551244872,
1.69538842072
]
},
{
"command": "pnpr@main",
"mean": 1.5934344162200003,
"stddev": 0.1646334238583409,
"median": 1.5709037447200003,
"user": 1.1788690800000001,
"system": 1.1543645000000002,
"min": 1.42131638472,
"max": 1.8691666257200001,
"times": [
1.42954479372,
1.43416109572,
1.62498610872,
1.5756991557200002,
1.8691666257200001,
1.47315088872,
1.7104955887200002,
1.82971518672,
1.42131638472,
1.5661083337200001
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.3889564613,
"stddev": 0.010431230249907091,
"median": 0.38942997870000007,
"user": 0.4944728800000001,
"system": 0.7125832999999999,
"min": 0.37398375670000006,
"max": 0.4100726927,
"times": [
0.37398375670000006,
0.37668978170000006,
0.38847670470000006,
0.4100726927,
0.38962332470000005,
0.38998294170000003,
0.39338764370000007,
0.39734062870000003,
0.38077050570000004,
0.38923663270000003
]
},
{
"command": "pacquet@main",
"mean": 0.3824805525,
"stddev": 0.01233814989658622,
"median": 0.3818965662,
"user": 0.51185608,
"system": 0.6651657999999999,
"min": 0.36671411970000006,
"max": 0.4005498417,
"times": [
0.38074667570000004,
0.38304645670000004,
0.39049965070000003,
0.36754820670000005,
0.3910214437,
0.36671411970000006,
0.3984447877,
0.4005498417,
0.37233200870000005,
0.37390233370000003
]
},
{
"command": "pnpr@HEAD",
"mean": 0.29787411020000004,
"stddev": 0.0044264668294785176,
"median": 0.2972251722,
"user": 0.18751868,
"system": 0.5078354999999999,
"min": 0.28998583270000006,
"max": 0.3034521627,
"times": [
0.30287846770000004,
0.3034521627,
0.3012386757,
0.29801384270000003,
0.2949559547,
0.28998583270000006,
0.2959991377,
0.2964365017,
0.2938578277,
0.30192269870000005
]
},
{
"command": "pnpr@main",
"mean": 0.2960724544000001,
"stddev": 0.005070095624020318,
"median": 0.2963812067,
"user": 0.20448588,
"system": 0.4860617999999999,
"min": 0.2848497797,
"max": 0.3042338117,
"times": [
0.2972841217,
0.29556060970000003,
0.29939738870000004,
0.2848497797,
0.2990911157,
0.29203044870000006,
0.2965538857,
0.29620852770000006,
0.29551485470000005,
0.3042338117
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.7228200362200004,
"stddev": 0.007136685379103555,
"median": 1.7213835515200002,
"user": 0.72315806,
"system": 0.7586162799999999,
"min": 1.7142871665200001,
"max": 1.7349668795200002,
"times": [
1.72883933352,
1.7142871665200001,
1.72634833352,
1.72446757252,
1.7181834045200002,
1.73033853652,
1.7182995305200002,
1.71538396152,
1.7170856435200001,
1.7349668795200002
]
},
{
"command": "pacquet@main",
"mean": 1.7140506523200003,
"stddev": 0.011781385953133675,
"median": 1.71364487502,
"user": 0.7190873600000002,
"system": 0.74720018,
"min": 1.69814766652,
"max": 1.7341372945200002,
"times": [
1.70925951852,
1.71582131652,
1.73209434052,
1.71346573852,
1.71382401152,
1.6993480575200002,
1.71518661652,
1.7341372945200002,
1.70922196252,
1.69814766652
]
},
{
"command": "pnpr@HEAD",
"mean": 0.29739666682,
"stddev": 0.0044480500473983746,
"median": 0.29713660302,
"user": 0.19783656,
"system": 0.49793588,
"min": 0.28882141352,
"max": 0.30660205052,
"times": [
0.29723380252,
0.29486425852,
0.28882141352,
0.29775592452,
0.30071802452,
0.29703940351999997,
0.29629525052,
0.30660205052,
0.29796601152,
0.29667052852
]
},
{
"command": "pnpr@main",
"mean": 0.29439878132,
"stddev": 0.006146451481995238,
"median": 0.29318150902,
"user": 0.18115946,
"system": 0.49888027999999995,
"min": 0.28657618152,
"max": 0.30559215852,
"times": [
0.28860193752,
0.29150217652,
0.28657618152,
0.29822014752,
0.28902586652,
0.29239727552,
0.30225786052,
0.29584846652,
0.29396574252,
0.30559215852
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.17924577981999998,
"stddev": 0.0036740183566633645,
"median": 0.17789565082,
"user": 0.16182826999999997,
"system": 0.08377019250000001,
"min": 0.17524373882,
"max": 0.18635483882,
"times": [
0.17971730382,
0.18635483882,
0.17799237882,
0.18203686682,
0.17669856681999999,
0.17636214081999999,
0.17572844582,
0.18045126482,
0.17766676382,
0.17779892282,
0.18485110982,
0.17574388982,
0.17524373882,
0.17630583482,
0.17934826482,
0.18563214582
]
},
{
"command": "pacquet@main",
"mean": 0.18014431519500002,
"stddev": 0.004543140638712417,
"median": 0.18008228232,
"user": 0.15687552000000002,
"system": 0.0890461925,
"min": 0.17249617781999999,
"max": 0.19271185582,
"times": [
0.18073511882,
0.17249617781999999,
0.18125012782,
0.18339564482,
0.18104498782,
0.17719681082,
0.18061262982,
0.17987247582,
0.17468219882,
0.18515130682,
0.19271185582,
0.18029208882,
0.17727097282,
0.17812778482,
0.17878463282,
0.17868422881999999
]
},
{
"command": "pnpr@HEAD",
"mean": 0.09144222213034485,
"stddev": 0.0033854367998303945,
"median": 0.09147773682,
"user": 0.02241964068965517,
"system": 0.011473711724137931,
"min": 0.08514803582000001,
"max": 0.09753084482,
"times": [
0.09753084482,
0.08826686582000001,
0.08514803582000001,
0.09123718382000001,
0.09147773682,
0.08916222882000001,
0.08915645082000001,
0.09601956682000001,
0.09265817282000001,
0.09365537982000001,
0.08773002582,
0.09086265382000001,
0.09407136182,
0.09326877782000001,
0.08535883882,
0.08798655682,
0.09101105582,
0.09580501482,
0.09284779682000001,
0.09370068982,
0.09735947982000001,
0.08836617482,
0.09412612582,
0.09038158982000001,
0.08594186382,
0.09191041882,
0.09470914682,
0.08992852082000001,
0.09214588282000001
]
},
{
"command": "pnpr@main",
"mean": 0.09062451785225804,
"stddev": 0.0036419361668289167,
"median": 0.09049182882000001,
"user": 0.02231018129032258,
"system": 0.011290670322580645,
"min": 0.08573709982000001,
"max": 0.09838560482000001,
"times": [
0.08931367682000001,
0.09451684182,
0.09372321082000001,
0.09076204482000001,
0.09134040382000001,
0.08675050982,
0.08608015482,
0.08885730082000001,
0.08971586782,
0.08631045582,
0.08647805382000001,
0.09176668982000001,
0.09068497682000001,
0.08573709982000001,
0.08620354482,
0.09221065682000001,
0.09003080582,
0.09126087082,
0.09015572882,
0.09670878382,
0.09462009782000001,
0.09171484582,
0.09838383582,
0.09049182882000001,
0.08909869182,
0.09552197382000001,
0.08623671482,
0.09171820282000001,
0.09838560482000001,
0.08863875082,
0.08594182782000001
]
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.8354306487311113,
"stddev": 0.08773414539113152,
"median": 0.84635558462,
"user": 0.7768958222222222,
"system": 0.2065518666666667,
"min": 0.6882669896200001,
"max": 1.00197671162,
"times": [
1.00197671162,
0.73792086162,
0.6882669896200001,
0.83604653762,
0.86942780362,
0.8227619176200001,
0.8476875486200001,
0.8684318836200001,
0.84635558462
]
},
{
"command": "pacquet@main",
"mean": 0.89765475762,
"stddev": 0.12934297952274,
"median": 0.90212011562,
"user": 0.8349250444444443,
"system": 0.23009208888888885,
"min": 0.64857023562,
"max": 1.05914683462,
"times": [
0.84019334562,
1.03307656762,
0.9132130956200001,
0.64857023562,
0.81629047462,
0.8474892356200001,
0.90212011562,
1.01879291362,
1.05914683462
]
},
{
"command": "pnpm@HEAD",
"mean": 2.8984893925088895,
"stddev": 0.09017595657663453,
"median": 2.87062887262,
"user": 4.134120711111112,
"system": 0.31097686666666663,
"min": 2.8214590306200003,
"max": 3.12158181862,
"times": [
2.84431618962,
2.85294537162,
2.87062887262,
2.9316655426200002,
2.88332915162,
2.8214590306200003,
2.9082383166200003,
3.12158181862,
2.8522402386200003
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.55696733538,
"stddev": 0.15493119849720524,
"median": 4.49559903618,
"user": 1.75396668,
"system": 1.44166588,
"min": 4.42926294318,
"max": 4.82038773218,
"times": [
4.51336822618,
4.66354663518,
4.82038773218,
4.4515862771800006,
4.4307448241800005,
4.4294697341800005,
4.42926294318,
4.8160733681800005,
4.53740376718,
4.477829846180001
]
},
{
"command": "pacquet@main",
"mean": 4.46351273828,
"stddev": 0.05336584756199517,
"median": 4.4432953811800004,
"user": 1.7702944799999998,
"system": 1.41251338,
"min": 4.4124946961800005,
"max": 4.55893142518,
"times": [
4.5324181791800005,
4.41368379618,
4.46561219418,
4.45032590918,
4.55893142518,
4.43218647618,
4.43626485318,
4.51544941518,
4.41776043818,
4.4124946961800005
]
},
{
"command": "pnpr@HEAD",
"mean": 3.5712228566799995,
"stddev": 0.15630350823226696,
"median": 3.4922204246799997,
"user": 1.2825852799999997,
"system": 1.2285425799999998,
"min": 3.44059609818,
"max": 3.84137919018,
"times": [
3.65333912918,
3.45519446518,
3.5064198351799996,
3.4468643151799996,
3.84137919018,
3.47802101418,
3.44059609818,
3.8381867331799997,
3.58058042118,
3.47164736518
]
},
{
"command": "pnpr@main",
"mean": 3.544725131479999,
"stddev": 0.12351776559192754,
"median": 3.5085955376799998,
"user": 1.25765618,
"system": 1.28933988,
"min": 3.4495575271799996,
"max": 3.84900477018,
"times": [
3.5333084061799997,
3.6590903021799996,
3.48403561718,
3.4544939221799997,
3.51670857918,
3.84900477018,
3.54466917118,
3.4495575271799996,
3.5004824961799996,
3.45590052318
]
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/13599 |
| Testbed | pnpr |
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the--ci-only-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | milliseconds (ms) |
|---|---|---|
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 1,458.51 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 288.82 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 289.99 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 85.15 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,344.02 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,440.60 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 265.83 ms |
Pinning 11.20.0 made every machine with a different global pnpm fail before startup with "Cannot verify the identity of the @pnpm/exe.darwin-x64 native binary: it is missing from pnpm-lock.yaml". The lockfile was never at fault: 11.20.0 restructured the per-platform binary packages (pnpm/pnpm#13599) and its engine identity check throws even with no lockfile at all (pnpm/pnpm#13622). Fixed in 11.21.0 (pnpm/pnpm#13619, pnpm/pnpm#13147), so pin 11.22.0 instead. CI and corepack install the exact pinned version, so they never hit the switch. If your global pnpm is exactly 11.20.0, upgrade it first (brew upgrade pnpm / pnpm self-update): its own switch code is the bug. Co-Authored-By: Claude Fable 5 <[email protected]>
…om (#14132) A pnpm below 11.20.0 pins `@pnpm/exe` beside `pnpm` for a v12 version, because that is the set its own major is installed from — #13599 is where pnpm learned that v12 publishes the executable as the unscoped package alone. A project pinning pnpm 12 whose lockfile such a pnpm last wrote therefore carries an entry every newer pnpm rejects, and `--frozen-lockfile` fails on it from either side of the disagreement while a plain install rewrites the block and hides it again. The two versions take turns. That entry pins the wanted version through the same integrity and cannot change which pnpm runs, so the frozen refusal now accepts a block that records every package this pnpm installs from, whatever else it records. An entry pinning another version is a lockfile that disagrees with the manifest and is still refused. The predicate that drives the write keeps the exact-set rule, so a writable install still rewrites the block to the packages this pnpm installs from — the trade is that `--frozen-lockfile` no longer guarantees that block is byte-stable against a later plain install. Related to #14124.
Summary
From pnpm v12 the unscoped
pnpmpackage is itself the native executable — the CLI no longer ships a separate@pnpm/exewrapper. The env lockfile, however, always pinned bothpnpmand@pnpm/exeunderpackageManagerDependencies, so a v12 pin would try to resolve a package that is not published for that version.Both stacks now pick the package set from the wanted version:
pnpmalone from v12 (and before 6.17.1, where@pnpm/exedid not exist yet), both packages in between.One consequence needed fixing along with it: the native-binary leg of the engine identity check looked up the host's platform package under
@pnpm/exeby name. With@pnpm/exeabsent from a v12 lockfile that leg silently verified nothing, leaving the bytes that actually execute unchecked. It now follows whichever package carries the platform binary as an optional dependency —@pnpm/exefor the majors that publish it, the unscopedpnpmfrom v12.On the TypeScript side
resolvePackageManagerIntegritiesis also called with a range or dist-tag (pnpm with latest), where the package set is not known up front. It now resolvespnpmfirst and only runs the second resolution for versions that do ship@pnpm/exe. The Rust entry point already receives an exact version, so it needs no such step.Noticed while working here, left alone as out of scope: when the platform binary is missing from the lockfile, pacquet fails closed but the TypeScript CLI skips it silently.
Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting.pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
Written by an agent (Claude Code, claude-opus-5).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit