Repository navigation
Conversation
📝 WalkthroughWalkthroughThis PR adds shared Rust workspace test utilities, ports filtered multi-importer, hoisting, linker, and optional-dependency scenarios, updates known-failure tracking, and emits pnpm-compatible frozen-install messages with corresponding release and porting documentation. ChangesWorkspace install coverage
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 QodoPort Stage 2 workspace subset and multi-importer test suites
AI Description
Diagram
High-Level Assessment
Files changed (9)
|
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
…tered installs The TypeScript CLI logs "Lockfile is up to date, resolution step is skipped" whenever the headless installer is entered — including installs that materialize a cold node_modules from an up-to-date lockfile and --filter subset installs — and "Importing packages to virtual store" under ignorePackageManifest (pnpm fetch). Pacquet only announced the no-op short-circuit. Emit the same logs from the frozen materialization branch, staying silent for an empty lockfile (upstream returns before the announcement) and for explicit rebuilds.
Confidence Score: 5/5Safe to merge: the change is purely additive test infrastructure plus a log-emission parity fix with no behavioral impact on install outcomes. The reporter change is a single conditional emit inside an already-guarded branch, mutually exclusive with the no-op short-circuit that already emitted the same message. Tests follow established patterns and isolate unimplemented boundaries into clearly-labeled known_failures stubs. No files require special attention. Reviews (2): Last reviewed commit: "fix(pacquet): address automated review f..." | Re-trigger Greptile |
…uites Stage 2 of pnpm/plans/TEST_PORTING.md (#13146). Add crates/cli/tests/multiple_importers.rs covering the open Support Workspaces items: subset installs preserving other importers' materialization, stale current-lockfile importers, filtered current-lockfile contents, headless-vs-resolve decisions for link:, workspace:, and unlinked workspace packages, subdependency-from-workspace (linkWorkspacePackages: deep and a workspace:* override), the deps-restorer workspace cases, workspace bin links, and the shared-lockfile custom virtualStoreDir round-trip. Promote the three --filter known_failures stubs to real tests now that filtered installs exist (#13030): the selected-projects hoist pair in hoist.rs and the workspace-subset optional-dependency skip in optional_dependencies.rs. Port the hoisted-linker workspace-subset item (multipleImporters.ts:87) and the hoisted workspace lifecycle-script case (lifecycleScripts.ts:579, frozen path; fresh-path scripts stay blocked on #11870). Stub the not-yet-implemented boundaries (publishConfig.directory linking, buildIndex-ordered project scripts, sharedWorkspaceLockfile: false) and two divergences that need a cross-stack decision: pacquet's subset closure deep-installs importer-level link targets where upstream keeps them shallow, and the hoisted workspace layout duplicates the root-winning version under consumer projects. Move the FilteredWorkspace fixture from install_filters.rs into the shared tests/_utils.rs as WorkspaceFixture so the new suite reuses it.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@pnpm/crates/cli/tests/_utils.rs`:
- Around line 1-20: Move the helper-only module currently at the auto-discovered
test-root file into a nested test utility module such as tests/utils/mod.rs, and
update integration tests to import it from that module. Preserve all existing
helper APIs and behavior while ensuring Cargo does not compile the utility file
as a standalone integration-test target.
🪄 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: c79d40d0-eb10-4d34-bb5e-dcb5fc7c74b8
📒 Files selected for processing (9)
.changeset/hungry-donkeys-repeat.mdpnpm/crates/cli/tests/_utils.rspnpm/crates/cli/tests/hoist.rspnpm/crates/cli/tests/hoisted_node_linker.rspnpm/crates/cli/tests/install_filters.rspnpm/crates/cli/tests/multiple_importers.rspnpm/crates/cli/tests/optional_dependencies.rspnpm/crates/package-manager/src/install.rspnpm/plans/TEST_PORTING.md
Keep the fetch-specific 'Importing packages to virtual store' wording off regular installs: 'install --ignore-manifest-check' is a user-facing way to skip the frozen freshness gate on a full install (the TypeScript shim passes it too), so the wording now also requires the non-full install that only 'pnpm fetch' combines with the flag. Replace the raw string .replace() lockfile edits with a structured repin_snapshot_dependency helper shared through tests/_utils, and move tests/_utils.rs to tests/_utils/mod.rs so cargo stops compiling the helper file as its own empty integration-test target.
Micro-Benchmark ResultsLinux |
|
Code review by qodo was updated up to the latest commit 7366227 |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
pnpm/crates/cli/tests/_utils/mod.rs (2)
393-402: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winAvoid intermediate
Stringallocations when parsing NDJSON.Creating an intermediate
Vec<String>is unnecessary becauseserde_json::from_strcan parse directly from the&stryielded by.lines(). By collecting theValueobjects within theflat_mapclosure, you ensure the temporaryCow(fromfrom_utf8_lossy) lives just long enough for the parse step, entirely avoiding the intermediateStringcopies.⚡ Proposed fix
#[must_use] pub fn ndjson_records(output: &Output) -> Vec<Value> { [&output.stderr[..], &output.stdout[..]] .into_iter() .flat_map(|stream| { - String::from_utf8_lossy(stream).lines().map(str::to_string).collect::<Vec<_>>() - }) - .filter_map(|line| serde_json::from_str(&line).ok()) + String::from_utf8_lossy(stream) + .lines() + .filter_map(|line| serde_json::from_str(line).ok()) + .collect::<Vec<_>>() + }) .collect() }🤖 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 `@pnpm/crates/cli/tests/_utils/mod.rs` around lines 393 - 402, Update ndjson_records to parse each &str directly from the lines yielded by String::from_utf8_lossy, collecting parsed Value objects inside the flat_map closure. Remove the intermediate Vec<String> and preserve filtering of invalid JSON records across both stderr and stdout.
461-470: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winHoist string allocations outside of iterator closures.
Both of these helper functions recreate formatted strings for every key in the lockfile snapshots. Hoisting the
format!calls outside the closures and minimizingto_string()calls avoidsO(N)unnecessary allocations.
pnpm/crates/cli/tests/_utils/mod.rs#L461-L470: hoistformat!("{name}@")out of the loop and usefilter_mapto avoid callingto_string()twice per item.pnpm/crates/cli/tests/_utils/mod.rs#L472-L480: hoist bothformat!operations before the closure.⚡ Proposed refactor for `snapshot_entries`
#[must_use] pub fn snapshot_entries(lockfile: &Lockfile, name: &str) -> Vec<(String, SnapshotEntry)> { + let prefix = format!("{name}@"); lockfile .snapshots .as_ref() .into_iter() .flatten() - .filter(|(key, _)| key.to_string().starts_with(&format!("{name}@"))) - .map(|(key, snapshot)| (key.to_string(), snapshot.clone())) + .filter_map(|(key, snapshot)| { + let key_str = key.to_string(); + if key_str.starts_with(&prefix) { + Some((key_str, snapshot.clone())) + } else { + None + } + }) .collect() }⚡ Proposed refactor for `has_snapshot`
#[must_use] pub fn has_snapshot(lockfile: &Lockfile, name: &str, version: &str) -> bool { + let exact = format!("{name}@{version}"); + let prefix = format!("{exact}("); lockfile.snapshots.as_ref().is_some_and(|snapshots| { snapshots.keys().any(|key| { - let key = key.to_string(); - key == format!("{name}@{version}") || key.starts_with(&format!("{name}@{version}(")) + let key_str = key.to_string(); + key_str == exact || key_str.starts_with(&prefix) }) }) }🤖 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 `@pnpm/crates/cli/tests/_utils/mod.rs` around lines 461 - 470, In pnpm/crates/cli/tests/_utils/mod.rs lines 461-470, update snapshot_entries to precompute the formatted name prefix before iterating and use filter_map so each key is converted to a string at most once. In pnpm/crates/cli/tests/_utils/mod.rs lines 472-480, update has_snapshot to precompute both formatted strings before its iterator closure; preserve the existing matching behavior while eliminating repeated formatting and allocations.
🤖 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.
Nitpick comments:
In `@pnpm/crates/cli/tests/_utils/mod.rs`:
- Around line 393-402: Update ndjson_records to parse each &str directly from
the lines yielded by String::from_utf8_lossy, collecting parsed Value objects
inside the flat_map closure. Remove the intermediate Vec<String> and preserve
filtering of invalid JSON records across both stderr and stdout.
- Around line 461-470: In pnpm/crates/cli/tests/_utils/mod.rs lines 461-470,
update snapshot_entries to precompute the formatted name prefix before iterating
and use filter_map so each key is converted to a string at most once. In
pnpm/crates/cli/tests/_utils/mod.rs lines 472-480, update has_snapshot to
precompute both formatted strings before its iterator closure; preserve the
existing matching behavior while eliminating repeated formatting and
allocations.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 3474d84e-86da-4634-9e37-441dcc010a5f
📒 Files selected for processing (10)
.changeset/hungry-donkeys-repeat.mdpnpm/crates/cli/tests/_utils.rspnpm/crates/cli/tests/_utils/mod.rspnpm/crates/cli/tests/hoist.rspnpm/crates/cli/tests/hoisted_node_linker.rspnpm/crates/cli/tests/install_filters.rspnpm/crates/cli/tests/multiple_importers.rspnpm/crates/cli/tests/optional_dependencies.rspnpm/crates/package-manager/src/install.rspnpm/plans/TEST_PORTING.md
💤 Files with no reviewable changes (1)
- pnpm/crates/cli/tests/_utils.rs
🚧 Files skipped from review as they are similar to previous changes (8)
- .changeset/hungry-donkeys-repeat.md
- pnpm/crates/package-manager/src/install.rs
- pnpm/crates/cli/tests/optional_dependencies.rs
- pnpm/crates/cli/tests/hoisted_node_linker.rs
- pnpm/crates/cli/tests/multiple_importers.rs
- pnpm/crates/cli/tests/hoist.rs
- pnpm/plans/TEST_PORTING.md
- pnpm/crates/cli/tests/install_filters.rs
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Addressed the review feedback in 7366227 (and rebased over latest
Written by an agent (Claude Code, claude-fable-5). |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13152 +/- ##
==========================================
+ Coverage 85.85% 85.87% +0.01%
==========================================
Files 505 505
Lines 84029 84057 +28
==========================================
+ Hits 72147 72183 +36
+ Misses 11882 11874 -8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Integrated-Benchmark Report (Linux)Commit: Each scenario reports direct installs and pnpr installs. 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.53193655208,
"stddev": 0.15861752505895046,
"median": 2.50879764518,
"user": 1.48761372,
"system": 1.2685971,
"min": 2.33946649918,
"max": 2.76771439618,
"times": [
2.76771439618,
2.58045556118,
2.33946649918,
2.36951965618,
2.6401349821799998,
2.41334805318,
2.74602881418,
2.43713972918,
2.62172918118,
2.4038286481799997
]
},
{
"command": "pacquet@main",
"mean": 2.46550417118,
"stddev": 0.14317612703845542,
"median": 2.40491176118,
"user": 1.4504011199999998,
"system": 1.2912215999999999,
"min": 2.34727257718,
"max": 2.75458370418,
"times": [
2.41945432918,
2.34727257718,
2.34964534118,
2.47141263918,
2.36029474318,
2.57459422318,
2.39036919318,
2.63717245218,
2.75458370418,
2.35024250918
]
},
{
"command": "pnpr@HEAD",
"mean": 1.56461021638,
"stddev": 0.17726844016741244,
"median": 1.58065144418,
"user": 1.03103182,
"system": 1.1233722000000002,
"min": 1.3441008241799999,
"max": 1.78905001018,
"times": [
1.67579207118,
1.45947446118,
1.35567184418,
1.3441008241799999,
1.52430714118,
1.72602376918,
1.78905001018,
1.3626289141799999,
1.77205738118,
1.6369957471799998
]
},
{
"command": "pnpr@main",
"mean": 1.54790409308,
"stddev": 0.15377885598091645,
"median": 1.58631849618,
"user": 1.02239182,
"system": 1.1343847000000002,
"min": 1.3361002581799999,
"max": 1.7870190081800001,
"times": [
1.3620971391799999,
1.7870190081800001,
1.64326751118,
1.33928403018,
1.3361002581799999,
1.54782071118,
1.58040364518,
1.59223334718,
1.61695863718,
1.67385664318
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.24603184578000006,
"stddev": 0.004253457168812092,
"median": 0.24589062618000002,
"user": 0.22018010000000002,
"system": 0.4808290599999999,
"min": 0.23665874468000003,
"max": 0.25374858568,
"times": [
0.24658980068000003,
0.24487346668000004,
0.23665874468000003,
0.24811653068000003,
0.24481811268000003,
0.24485996068000002,
0.24750886068000003,
0.25374858568,
0.24519145168000003,
0.24795294368000004
]
},
{
"command": "pacquet@main",
"mean": 0.24490287058,
"stddev": 0.005746520900328208,
"median": 0.24475753918000004,
"user": 0.2084379,
"system": 0.4730263600000001,
"min": 0.23552838668000003,
"max": 0.25546037168,
"times": [
0.25546037168,
0.24663748968000002,
0.24634330868000004,
0.23978597968000004,
0.24063568168000002,
0.24373105668000003,
0.24355480668000004,
0.23552838668000003,
0.25156760268,
0.24578402168000002
]
},
{
"command": "pnpr@HEAD",
"mean": 0.26839424858,
"stddev": 0.006030550415050428,
"median": 0.26929522318,
"user": 0.2134223,
"system": 0.53701596,
"min": 0.25865586468,
"max": 0.27785189068000005,
"times": [
0.27024669968000004,
0.26879975068,
0.27785189068000005,
0.25865586468,
0.26366655668000005,
0.27127172868000005,
0.27523983968000004,
0.26774280068,
0.26979069568,
0.26067665868
]
},
{
"command": "pnpr@main",
"mean": 0.25926915448000004,
"stddev": 0.010198780847724173,
"median": 0.25705818168000005,
"user": 0.18895889999999999,
"system": 0.53924426,
"min": 0.24537457468000004,
"max": 0.28109202268000005,
"times": [
0.25480854968000005,
0.24537457468000004,
0.25167770668,
0.25930781368000005,
0.26098059568000004,
0.26808949768,
0.26505796068000004,
0.25348259668,
0.25282022668000004,
0.28109202268000005
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.6968727170999998,
"stddev": 0.019810634075981107,
"median": 2.7054503773,
"user": 1.5639317600000002,
"system": 1.2780090200000003,
"min": 2.6607802958,
"max": 2.7239816548,
"times": [
2.6721396958,
2.7075232278,
2.7034212388,
2.6607802958,
2.7239816548,
2.6880669078,
2.7115528838,
2.6842220088,
2.7095597418,
2.7074795158000002
]
},
{
"command": "pacquet@main",
"mean": 2.6955586767,
"stddev": 0.016021495068511152,
"median": 2.6907675288000004,
"user": 1.5605893599999998,
"system": 1.26715822,
"min": 2.6746099908,
"max": 2.7281660208,
"times": [
2.7281660208,
2.6746099908,
2.6926563208000003,
2.7092513228,
2.6888787368,
2.7107133498,
2.6860727228,
2.6877088368,
2.6819093768,
2.6956200888
]
},
{
"command": "pnpr@HEAD",
"mean": 1.5003075329000002,
"stddev": 0.12099759468243561,
"median": 1.4675703098000001,
"user": 0.9283010599999999,
"system": 1.13084932,
"min": 1.3683243917999999,
"max": 1.6755809258,
"times": [
1.3980319248,
1.6755809258,
1.5905761048,
1.3683243917999999,
1.4611583448,
1.6535945688,
1.3924402058,
1.3772332128,
1.6121533748,
1.4739822748
]
},
{
"command": "pnpr@main",
"mean": 1.5326031356999998,
"stddev": 0.15183640997259532,
"median": 1.5019816958,
"user": 0.9601026600000001,
"system": 1.10859442,
"min": 1.3724317238000001,
"max": 1.8066917868,
"times": [
1.4034555908,
1.3966257528,
1.7275068418,
1.3724317238000001,
1.6379331148,
1.4721629378,
1.5318004538,
1.8066917868,
1.4022483108000001,
1.5751748438000002
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.5492329883200001,
"stddev": 0.011672544403765198,
"median": 0.55031128492,
"user": 0.6507013599999999,
"system": 0.68204984,
"min": 0.5314121364200001,
"max": 0.5688305734200001,
"times": [
0.5488413024200001,
0.5530282634200001,
0.55324971842,
0.5460995194200001,
0.5517812674200001,
0.5688305734200001,
0.56280182442,
0.5430148824200001,
0.5314121364200001,
0.5332703954200001
]
},
{
"command": "pacquet@main",
"mean": 0.5477844268200001,
"stddev": 0.010800793274562362,
"median": 0.5516926774200002,
"user": 0.6713351599999998,
"system": 0.65122014,
"min": 0.52607251742,
"max": 0.5638053434200001,
"times": [
0.5515428024200001,
0.54161199542,
0.5541573274200001,
0.53731045042,
0.5431657554200001,
0.5541496424200001,
0.5638053434200001,
0.55418588142,
0.5518425524200001,
0.52607251742
]
},
{
"command": "pnpr@HEAD",
"mean": 0.29467783402000003,
"stddev": 0.008038606316085146,
"median": 0.29219997242,
"user": 0.18692876000000003,
"system": 0.50407914,
"min": 0.28314676442000003,
"max": 0.31206749142,
"times": [
0.28876684942,
0.29241210542,
0.29686713642,
0.29137049542,
0.30020685242,
0.30009586442,
0.28314676442000003,
0.28985694142,
0.31206749142,
0.29198783942
]
},
{
"command": "pnpr@main",
"mean": 0.28506802381999996,
"stddev": 0.006165578390980803,
"median": 0.28603709742000005,
"user": 0.19261066,
"system": 0.4836479399999999,
"min": 0.27497872942,
"max": 0.29334292942,
"times": [
0.27497872942,
0.28457285642,
0.28877918142000003,
0.28573302842000003,
0.27667905442,
0.28634116642,
0.28872010042,
0.29334292942,
0.29172863442,
0.27980455742
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.83749429806,
"stddev": 0.007545097310841784,
"median": 1.83587535256,
"user": 0.8613150199999999,
"system": 0.73197788,
"min": 1.82833508306,
"max": 1.85199121006,
"times": [
1.85199121006,
1.83863323706,
1.84771286906,
1.84027831706,
1.83366665706,
1.82833508306,
1.8293008910600002,
1.83584309206,
1.83327401106,
1.83590761306
]
},
{
"command": "pacquet@main",
"mean": 1.83748236066,
"stddev": 0.008122677778819792,
"median": 1.8367694055600001,
"user": 0.89185952,
"system": 0.71650418,
"min": 1.82688566906,
"max": 1.85203814906,
"times": [
1.82688566906,
1.8474782400599998,
1.85203814906,
1.83731040806,
1.83622840306,
1.83213557906,
1.8375166060600001,
1.83250584306,
1.8288704650599998,
1.8438542440599999
]
},
{
"command": "pnpr@HEAD",
"mean": 0.28367751696,
"stddev": 0.004818380218519812,
"median": 0.28395232656,
"user": 0.17386622000000002,
"system": 0.49612578,
"min": 0.27471174906,
"max": 0.29252452306000004,
"times": [
0.28627976006,
0.28178191606,
0.28389848106000004,
0.29252452306000004,
0.28400617206,
0.27933340306000004,
0.27471174906,
0.28209082506,
0.28793131306,
0.28421702706
]
},
{
"command": "pnpr@main",
"mean": 0.28227759366000005,
"stddev": 0.010507407484487157,
"median": 0.28010311956,
"user": 0.17324402,
"system": 0.48842127999999996,
"min": 0.26457899506000004,
"max": 0.29672800406,
"times": [
0.29543645606,
0.28636226506,
0.29672800406,
0.27928160606,
0.27254232506000003,
0.26457899506000004,
0.27747748806,
0.27632024906,
0.28092463306000004,
0.29312391506
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.31447959672,
"stddev": 0.008461775711370767,
"median": 0.31333134612,
"user": 0.30031105999999996,
"system": 0.05867578,
"min": 0.30701668862,
"max": 0.32949459862,
"times": [
0.30709894062,
0.31478081562,
0.30701668862,
0.30722014862,
0.30813195562,
0.31191857562,
0.32949459862,
0.31548585562,
0.32890427162,
0.31474411662
]
},
{
"command": "pacquet@main",
"mean": 0.3162196227199999,
"stddev": 0.009104851788496774,
"median": 0.31333455111999997,
"user": 0.30825945999999993,
"system": 0.05342857999999999,
"min": 0.30302764762,
"max": 0.32982306062,
"times": [
0.31833528062,
0.30302764762,
0.31137748162,
0.32813369762,
0.32631738662,
0.30986423862,
0.30864833162,
0.31269885562,
0.31397024662,
0.32982306062
]
},
{
"command": "pnpr@HEAD",
"mean": 0.08416846604424244,
"stddev": 0.002022535893228336,
"median": 0.08397407062000001,
"user": 0.01796831757575758,
"system": 0.009986375757575756,
"min": 0.08092789462,
"max": 0.08899741562,
"times": [
0.08597125862,
0.08407345662,
0.08336831462000001,
0.08535309162,
0.08508974962,
0.08899741562,
0.08595050062000001,
0.08755061662000001,
0.08561260662,
0.08188011862,
0.08290945662,
0.08349449262,
0.08666820362000001,
0.08191777862,
0.08376229362,
0.08496805062,
0.08320168362000001,
0.08527895262,
0.08689679262,
0.08692700862,
0.08491552262,
0.08103664862,
0.08433153962,
0.08237036762,
0.08214905162,
0.08092789462,
0.08397407062000001,
0.08137381062,
0.08278242862,
0.08290749262000001,
0.08585798662,
0.08293602662,
0.08212469662
]
},
{
"command": "pnpr@main",
"mean": 0.08426528750235295,
"stddev": 0.0023457796881723413,
"median": 0.08380891012,
"user": 0.021116265882352943,
"system": 0.007155658823529412,
"min": 0.08104141762,
"max": 0.08989352362,
"times": [
0.08433139862,
0.08248727662000001,
0.08289464862,
0.08236182062,
0.08324835062000001,
0.08989352362,
0.08413127462,
0.08213223062,
0.08124915662,
0.08216154562,
0.08502665062,
0.08711579262000001,
0.08538592362,
0.08184591362,
0.08369840362,
0.08952303962000001,
0.08683414462,
0.08645484462,
0.08550552562000001,
0.08391941662,
0.08565628962,
0.08321309562,
0.08199890162000001,
0.08142101962,
0.08366008162,
0.08741530262,
0.08513550462,
0.08104141762,
0.08428454062,
0.08756462262,
0.08640921962,
0.08279301862,
0.08153609462,
0.08268978462
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.49972981168,
"stddev": 0.1278844535272738,
"median": 4.4420829694799995,
"user": 1.65080656,
"system": 1.3193704199999998,
"min": 4.412726505979999,
"max": 4.7543919599799995,
"times": [
4.71004983998,
4.41406710598,
4.7543919599799995,
4.412726505979999,
4.44204931198,
4.44644115498,
4.4185473449799995,
4.53419012098,
4.44211662698,
4.42271814498
]
},
{
"command": "pacquet@main",
"mean": 4.47990922448,
"stddev": 0.09797701345445502,
"median": 4.43619100698,
"user": 1.64101236,
"system": 1.36980632,
"min": 4.40333880798,
"max": 4.680926909979999,
"times": [
4.40740305798,
4.43460387998,
4.50998864398,
4.40333880798,
4.43315366498,
4.437778133979999,
4.629437676979999,
4.41060589498,
4.680926909979999,
4.45185557398
]
},
{
"command": "pnpr@HEAD",
"mean": 3.53251206428,
"stddev": 0.07609392130360884,
"median": 3.51918076398,
"user": 1.1507826600000002,
"system": 1.21966932,
"min": 3.4510349339800004,
"max": 3.68072484898,
"times": [
3.4510349339800004,
3.48222019098,
3.55614133698,
3.46339682698,
3.56154935598,
3.58578810298,
3.68072484898,
3.46653720898,
3.6002137599800004,
3.4775140769800004
]
},
{
"command": "pnpr@main",
"mean": 3.4732836125800004,
"stddev": 0.0462985902992486,
"median": 3.4536913244800003,
"user": 1.1398448599999997,
"system": 1.2199212200000003,
"min": 3.43235818498,
"max": 3.56417406198,
"times": [
3.4549936479800003,
3.4614798659800003,
3.56417406198,
3.4491048489800002,
3.44633306798,
3.43235818498,
3.5537488559800003,
3.4523890009800002,
3.47051220298,
3.4477423879800004
]
}
]
} |
|
| Branch | pr/13152 |
| 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,368.32 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 274.71 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 283.15 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 80.93 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,344.10 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,451.03 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 258.66 ms |
Summary
Stage 2 of the TEST_PORTING plan — workspace subset installs (
--filter) and multi-importer coverage. Related to #13146.New ports (all "tested the test" by temporarily breaking the implementation path they pin):
crates/cli/tests/multiple_importers.rssuite covering the openSupport Workspacesitems: subset preservation of other importers' materialization (multipleImporters.ts:438,:865), stale current-lockfile importers (:208), filtered current-lockfile contents (:730), headless-vs-resolve decisions withlink:/workspace:/ unlinked workspace packages (:540,:598,:656), subdependency-from-workspace withlinkWorkspacePackages: deepand via aworkspace:*override (:1427,:1563), the deps-restorer workspace cases (index.ts:789,:897), workspace bin links (monorepo/index.ts:1317), and the shared-lockfile customvirtualStoreDirround-trip (monorepo/index.ts:1514).--filterknown_failuresstubs to real tests — filtered installs landed in fix(pacquet): honor workspace install filters #13030, soworkspace_hoist_packages_in_selected_projects_tree+workspace_hoist_only_in_selected_projects_with_subdeps(hoist.ts:587/:682) andskip_unsupported_optional_when_installing_a_workspace_subset(optionalDependencies.ts:470) now run for real.multipleImporters.ts:87) and the hoisted workspace lifecycle-scripts case (lifecycleScripts.ts:579, driven through the frozen path while fresh-path scripts remain blocked on pacquet: run lifecycle scripts (preinstall / install / postinstall) on the fresh-lockfile install path #11870).Parity fix (changeset included): pacquet only announced
Lockfile is up to date, resolution step is skippedon the no-op short-circuit. The TypeScript CLI emits it whenever the headless installer is entered — including cold materialization and--filtersubset installs — and emitsImporting packages to virtual storeunderignorePackageManifest(pnpm fetch). The frozen materialization branch now emits the same logs (crates/package-manager/src/install.rs); themultipleImporters.ts:540/:598/:656ports pin it.New
known_failuresstubs at not-yet-implemented boundaries: install-timepublishConfig.directorylinking (:1768),buildIndex-ordered project lifecycle scripts + inter-group bin relinking (:1902,monorepo:734), andsharedWorkspaceLockfile: false(monorepo:1281,:1467).Divergences surfaced by the port — each is pinned by a
known_failuresstub naming the divergence, and needs a cross-stack decision rather than a unilateral "fix":pnpm --filter project-1 installwhere project-1 has alink:/workspace-linked sibling: pacquet deep-installs the link target's own dependencies (deliberately pinned byinstall_filters.rssince fix(pacquet): honor workspace install filters #13030); the TypeScript CLI keeps importer-level link targets shallow — only--filter project-1...widens the selection. Snapshot-level links (subdependency-from-workspace) deep-install in both stacks.node_moduleseven when the same version won the workspace-root slot; upstream nests a copy only for versions that lost the root slot.link:deps (minor, noted in the plan): pacquet's resolver records them relative to the dependent importer; upstream's fixture lockfile records them relative to the lockfile dir. The headless materialization handles the upstream shape, which the port pins.Also extracted the
FilteredWorkspacefixture frominstall_filters.rsinto the sharedtests/_utils/mod.rs(renamedWorkspaceFixture) so the new suite reuses it instead of copy-pasting ~350 lines.Post-review updates: rebased over
main(resolving theTEST_PORTING.mdoverlap with #13149), scoped the fetch-specific log wording to non-full installs soinstall --ignore-manifest-checkkeeps the up-to-date message, replaced the raw-string lockfile edits with a structuredrepin_snapshot_dependencyhelper, and movedtests/_utils.rstotests/_utils/mod.rsso it is no longer an auto-discovered test target.Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting. (Testporting is pacquet-only by design; the reporter fix aligns pacquet to the
TypeScript CLI's existing behavior, so no TypeScript change is needed.)
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-fable-5).