Repository navigation
Conversation
|
Warning Review limit reachedNext included review available in 9 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: pnpm/pnpm/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (9)
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 |
Micro-Benchmark ResultsLinux |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #15249 +/- ##
=======================================
Coverage 91.47% 91.47%
=======================================
Files 1376 1376
Lines 184757 184763 +6
=======================================
+ Hits 168998 169004 +6
Misses 15759 15759 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Same-run regression checkHEAD and main are measured on the same runner. The tolerance is 5% of the main median or 2 ms, whichever is larger. A regression requires both the median slowdown and the gap between the fastest retained HEAD sample and slowest retained main sample to exceed this tolerance, after trimming up to 10% from each tail. Suspected regressions are rerun once with target order reversed and only fail if reproduced. This conservative noise guard is not a statistical confidence interval. Inconclusive rows do not fail the check. They remain visible for performance review. Bencher retains absolute minimum timings for historical tracking; historical alerts do not gate this PR. Sequential measurements can still be affected by runner drift.
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; the linked-workspace scenario compares current Rust against main Rust. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ. Bencher tracks absolute minimum latency; PR regression checks compare HEAD and main samples from the same runner. Historical timing alerts do not gate PRs. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.4269850883,
"stddev": 0.12560761571424414,
"median": 2.3664701108,
"user": 1.53640316,
"system": 1.9339123400000002,
"min": 2.3090593493,
"max": 2.6512115243
},
{
"command": "pacquet@main",
"mean": 2.4795954331,
"stddev": 0.1558523345142985,
"median": 2.4310751628,
"user": 1.5602906600000002,
"system": 1.9566449399999999,
"min": 2.3072950373,
"max": 2.7038743123
},
{
"command": "pnpr@HEAD",
"mean": 1.4903899009,
"stddev": 0.11233300022335029,
"median": 1.4538216608,
"user": 1.4521648599999997,
"system": 1.7062006399999998,
"min": 1.3605939583,
"max": 1.7056383103
},
{
"command": "pnpr@main",
"mean": 1.4734560921999997,
"stddev": 0.10571729773179489,
"median": 1.4725905553,
"user": 1.49260476,
"system": 1.88710734,
"min": 1.3308964692999998,
"max": 1.6816349442999998
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.27472738934000007,
"stddev": 0.048278185034913566,
"median": 0.25071392264000003,
"user": 0.30297421999999996,
"system": 0.60236682,
"min": 0.23632162464,
"max": 0.37016024064
},
{
"command": "pacquet@main",
"mean": 0.25777286854000003,
"stddev": 0.013260077587201234,
"median": 0.25427878964000006,
"user": 0.31040071999999996,
"system": 0.6086896199999999,
"min": 0.24063715964000001,
"max": 0.28385937064000005
},
{
"command": "pnpr@HEAD",
"mean": 0.2732127966400001,
"stddev": 0.018854964036639773,
"median": 0.26865143664,
"user": 0.29145432,
"system": 0.5890473199999999,
"min": 0.24373382064000002,
"max": 0.31239664164000003
},
{
"command": "pnpr@main",
"mean": 0.29841601534000006,
"stddev": 0.013388107981548393,
"median": 0.29812520614000004,
"user": 0.31934902,
"system": 0.6293552200000001,
"min": 0.27963288264,
"max": 0.32675726064000005
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.006717903189923274,
"stddev": 0.0005245483070565361,
"median": 0.00659979986,
"user": 0.003937708184143225,
"system": 0.0031839497698209723,
"min": 0.00584650886,
"max": 0.009321929860000001
},
{
"command": "pacquet@main",
"mean": 0.007407540688282838,
"stddev": 0.0008942343360825809,
"median": 0.00727399336,
"user": 0.0045298595959596,
"system": 0.0033187257575757584,
"min": 0.00589625986,
"max": 0.011602841860000001
},
{
"command": "pnpr@HEAD",
"mean": 0.0072245994558549215,
"stddev": 0.0006533672108038941,
"median": 0.007174091360000001,
"user": 0.0045763792746114,
"system": 0.0030784601036269424,
"min": 0.00593688586,
"max": 0.009949325860000002
},
{
"command": "pnpr@main",
"mean": 0.009617985149398281,
"stddev": 0.002668838285542204,
"median": 0.00923577086,
"user": 0.005816894269340979,
"system": 0.004318106647564468,
"min": 0.0062572348600000004,
"max": 0.021435486860000002
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.014884275119560437,
"stddev": 0.002396838333445459,
"median": 0.01454897718,
"user": 0.007872480549450552,
"system": 0.008123571428571428,
"min": 0.01035887018,
"max": 0.02649523518
},
{
"command": "pacquet@main",
"mean": 0.01331076097640718,
"stddev": 0.0017631821051772138,
"median": 0.01334107518,
"user": 0.007811761796407186,
"system": 0.006473704910179644,
"min": 0.009322703180000001,
"max": 0.01871537518
},
{
"command": "pnpr@HEAD",
"mean": 0.01292851557240507,
"stddev": 0.001367315377644807,
"median": 0.01306424068,
"user": 0.007197704303797471,
"system": 0.006648574430379747,
"min": 0.00922104218,
"max": 0.01624022918
},
{
"command": "pnpr@main",
"mean": 0.013759080150238088,
"stddev": 0.0011337458239608117,
"median": 0.01393884368,
"user": 0.007709564761904759,
"system": 0.007093401428571429,
"min": 0.01075609018,
"max": 0.01603174918
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.74569545678,
"stddev": 0.08803509919216913,
"median": 2.7680236868800003,
"user": 2.58982582,
"system": 2.14181988,
"min": 2.56320084788,
"max": 2.84017395188
},
{
"command": "pacquet@main",
"mean": 3.1091219263800007,
"stddev": 0.33371477766773655,
"median": 2.96260050938,
"user": 3.24117702,
"system": 2.69410638,
"min": 2.6984812698800003,
"max": 3.65038678688
},
{
"command": "pnpr@HEAD",
"mean": 1.7900802865799998,
"stddev": 0.1860506954510675,
"median": 1.74537451838,
"user": 1.9609900199999994,
"system": 2.19049648,
"min": 1.5619779198800001,
"max": 2.25444247788
},
{
"command": "pnpr@main",
"mean": 1.74355289348,
"stddev": 0.15885382795169334,
"median": 1.69820340138,
"user": 1.6595996199999998,
"system": 1.8447484800000002,
"min": 1.56222856588,
"max": 2.08845199388
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.64268974204,
"stddev": 0.056224261225694246,
"median": 0.63497620894,
"user": 1.04136738,
"system": 1.2269748399999996,
"min": 0.56610391944,
"max": 0.73689437944
},
{
"command": "pacquet@main",
"mean": 0.5899551166399999,
"stddev": 0.06880804187964958,
"median": 0.6029259624400001,
"user": 0.94801328,
"system": 1.1077205399999999,
"min": 0.49068312544000003,
"max": 0.70452311044
},
{
"command": "pnpr@HEAD",
"mean": 0.40204960854000005,
"stddev": 0.033342793597501474,
"median": 0.40598291594,
"user": 0.35095538,
"system": 0.70137004,
"min": 0.33431187844000004,
"max": 0.4487354384400001
},
{
"command": "pnpr@main",
"mean": 0.4329912438400001,
"stddev": 0.04639128556951271,
"median": 0.42444754594,
"user": 0.39662428,
"system": 0.7579097399999999,
"min": 0.37107734944000004,
"max": 0.52411259044
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.7286389609199997,
"stddev": 0.029585805144207528,
"median": 1.72369910562,
"user": 1.2670604,
"system": 1.4069958599999999,
"min": 1.68337832312,
"max": 1.77139028612
},
{
"command": "pacquet@main",
"mean": 1.7405407326200002,
"stddev": 0.03832896627782884,
"median": 1.72057168662,
"user": 1.2278158,
"system": 1.4455310599999998,
"min": 1.70538636212,
"max": 1.82069500812
},
{
"command": "pnpr@HEAD",
"mean": 0.38070191922,
"stddev": 0.01788625612818138,
"median": 0.37758614462000006,
"user": 0.34405209999999997,
"system": 0.80242936,
"min": 0.35898223312000005,
"max": 0.41726359812
},
{
"command": "pnpr@main",
"mean": 0.38613189632,
"stddev": 0.026983290811362838,
"median": 0.38363395662,
"user": 0.34876389999999996,
"system": 0.78429366,
"min": 0.35568017612,
"max": 0.44865473412
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2204188313033334,
"stddev": 0.013235290164254709,
"median": 0.21898173072000002,
"user": 0.23374848666666667,
"system": 0.07209709999999998,
"min": 0.20166923322000002,
"max": 0.24017148322
},
{
"command": "pacquet@main",
"mean": 0.22627233260461535,
"stddev": 0.04177780616345495,
"median": 0.21055578922,
"user": 0.2353197430769231,
"system": 0.08398883076923078,
"min": 0.19028387822,
"max": 0.34078789922
},
{
"command": "pnpr@HEAD",
"mean": 0.09558387605870969,
"stddev": 0.00632194605219178,
"median": 0.09461023222,
"user": 0.03579646516129032,
"system": 0.01575196774193548,
"min": 0.08702562222,
"max": 0.11183466322
},
{
"command": "pnpr@main",
"mean": 0.09853786272000001,
"stddev": 0.006673427569420166,
"median": 0.09627465722,
"user": 0.03810682,
"system": 0.017730499999999996,
"min": 0.09022924622,
"max": 0.11327757122000001
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.2317588461311113,
"stddev": 0.1969298331866804,
"median": 1.27841283902,
"user": 1.2597570422222222,
"system": 0.2910247355555555,
"min": 0.98971319702,
"max": 1.53714914902
},
{
"command": "pacquet@main",
"mean": 1.2258734129088888,
"stddev": 0.16013591749353537,
"median": 1.24058341202,
"user": 1.2639053755555556,
"system": 0.28593318,
"min": 0.9797675180200001,
"max": 1.4758057740200001
},
{
"command": "pnpm@HEAD",
"mean": 5.153780831131112,
"stddev": 1.0338949614536066,
"median": 4.860663515020001,
"user": 8.140201931111111,
"system": 0.4110620688888889,
"min": 4.04187112802,
"max": 7.12037571002
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.20109034771333334,
"stddev": 0.03259278513078895,
"median": 0.19294940238000002,
"user": 0.15106237333333333,
"system": 0.10320513333333332,
"min": 0.18210614138000003,
"max": 0.31225212838000005
},
{
"command": "pacquet@main",
"mean": 0.20170519931333336,
"stddev": 0.007576931636908996,
"median": 0.20259697438000002,
"user": 0.16388050666666668,
"system": 0.09888186666666667,
"min": 0.18876740338000003,
"max": 0.21333769538000003
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.548988339199999,
"stddev": 0.1822002675539826,
"median": 4.501196670400001,
"user": 1.64794024,
"system": 1.7836952400000001,
"min": 4.3589517309,
"max": 4.8803595809
},
{
"command": "pacquet@main",
"mean": 4.4385956428,
"stddev": 0.09565990469322604,
"median": 4.4011653194,
"user": 1.7053308400000002,
"system": 1.7039936399999995,
"min": 4.3675085609,
"max": 4.652363368900001
},
{
"command": "pnpr@HEAD",
"mean": 3.4704854273000003,
"stddev": 0.09302969256590843,
"median": 3.4581645979,
"user": 1.5505351399999998,
"system": 1.5909107399999998,
"min": 3.3941585449000002,
"max": 3.7059474629
},
{
"command": "pnpr@main",
"mean": 3.5276834925000005,
"stddev": 0.10731211545582534,
"median": 3.4956754994000003,
"user": 1.60768274,
"system": 1.7469309399999997,
"min": 3.3999037939,
"max": 3.7443285149000003
}
]
}Scenario: GVS linker: fresh restore, hot cache + hot storeSame install as the isolated fresh-restore hot/hot scenario, into the shared virtual store, the layout pnpm 12 installs into by default. Scenarios run on separate machines, so compare main and branch within each table.
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.12691321261,
"stddev": 0.011689143412654741,
"median": 0.12420059286000001,
"user": 0.15345077000000001,
"system": 0.14465835,
"min": 0.11378163636000001,
"max": 0.17129308536
},
{
"command": "pacquet@main",
"mean": 0.12246902599636365,
"stddev": 0.010026369695762,
"median": 0.12311414286000001,
"user": 0.15585267454545457,
"system": 0.12480469090909091,
"min": 0.10747624036000002,
"max": 0.15574607535999999
},
{
"command": "pnpr@HEAD",
"mean": 0.13341114762315795,
"stddev": 0.006762728885331747,
"median": 0.13394597536,
"user": 0.16086629894736842,
"system": 0.13361209999999996,
"min": 0.12066303836000002,
"max": 0.14563940336
},
{
"command": "pnpr@main",
"mean": 0.13385422378105263,
"stddev": 0.005912761986814248,
"median": 0.13312866436,
"user": 0.1655784042105263,
"system": 0.1263406789473684,
"min": 0.12494533336000001,
"max": 0.14805152436
}
]
} |
PR Summary by QodoExclude stale workspace importers from frozen installs
AI Description
Diagram
High-Level Assessment
Files changed (9)
|
|
Code Review by Qodo
1. Release note mixes old and new behavior
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Regarding Qodo’s release-note wording finding: the entry follows the documented changeset example in AGENTS.md, which uses “Fixed Written by an agent (Codex, GPT-6). |
Use discovered importer IDs as the default roots of frozen materialization, while preserving explicit selections and the full-lockfile scope used by hoisted installs and manifest-independent fetches. Reuse the current-lockfile merge helper without a previous lockfile for full installs. This records the installed closure without retaining stale importers and preserves the existing handling of skipped dependencies. Verification still covers the complete wanted lockfile. Add CLI regressions for a removed workspace project with a present or missing local tarball and for fetch without project manifests. Closes pnpm#15248.
On 12.5.1 a frozen install rooted materialization at every lockfile importer, so a lockfile copied from the capsule that declared `..` failed with ERR_PNPM_PACKAGE_MANAGER_UNSAFE_IMPORTER_PATH in capsules that did not declare it. #15249 rooted it at the declared projects. Asserting success makes the test fail on the old roots. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…the lockfile dir (#16401) Bit installs each component capsule with the capsule as the lockfile dir and, for one capsule per run, also declares the capsules dir above it, so that capsule's lockfile records a `..` importer. Lockfiles are copied between capsules, and on 12.5.1 a frozen install in a capsule that did not declare `..` failed with ERR_PNPM_PACKAGE_MANAGER_UNSAFE_IMPORTER_PATH: materialization started from every lockfile importer while only declared projects were trusted. #15249 starts it from the declared projects. These tests drive the engine the way the NAPI binding does and pin: - a declared `..` project installs on the fresh, repeat, frozen, and rebuild paths, and from a lockfile copied in before the first install; - an undeclared `..` importer in a copied lockfile is skipped, and the install succeeds (this fails on the pre-15249 roots); - lockfile-only keys `../other`, `../../etc`, an absolute path, and `C:/x` write nothing outside the lockfile dir, even when `..` is declared.
## Proposed Changes
Updates `@pnpm/napi` from 12.5.1 to 12.8.1. This fixes the intermittent
`ERR_PNPM_PACKAGE_MANAGER_UNSAFE_IMPORTER_PATH` error that capsule
installs throw for the `..` importer, right after "Already up to date".
What caused it:
- In each run, only the first capsule installed gets the capsules dir as
a project, so only that capsule's lockfile records a `..` importer.
Which capsule goes first changes from run to run.
- The capsule lockfiles are cached and copied back into the capsules on
the next build.
- When a capsule whose cached lockfile has `..` is not first, `..` is
not passed in. The lockfile otherwise matches, so pnpm takes the frozen
path ("Already up to date").
- In 12.5.1 the frozen path installed every importer in the lockfile.
`..` is outside the capsule and was not passed in, so pnpm refused it.
pnpm 12.8.0 (pnpm/pnpm#15249) makes a frozen install use only the
projects the caller passes in. A stale `..` importer is skipped, and the
install succeeds without writing outside the capsule. pnpm/pnpm#16401
adds a test for this scenario. With the 12.5.1 behavior it fails with
the same error.
The lockfile is regenerated. Besides the `@pnpm/napi` bump, the peer
suffixes of many entries change, for example the `[email protected]`
suffix is dropped.
---
Written by an agent (Claude Code, claude-opus-5-5).
Summary
Frozen installs now start from the discovered workspace projects, so a project removed from
pnpm-workspace.yamlno longer has its dependencies fetched or linked. Its missing local tarballs no longer fail the install. The wanted lockfile remains unchanged, and the current lockfile records only the installed dependency closure.This fixes a pnpm 12 regression. pnpm 11 already selects the workspace projects correctly. Hoisted installs and manifest-independent
pnpm fetchretain their existing scope.Closes #15248.
Validation: 862 scoped package-manager and CLI tests, 23 CLI smoke tests, workspace
check:rustandlint:rust, formatting, and spelling checks passed. The new regression test fails against pnpm 12.5.1 and passes with this fix.Squash Commit Body
Checklist
already linked to it solves it.
are implemented in every affected version.
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 (Codex, GPT-6).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.