Repository navigation
fix(pacquet): honor workspace install filters - #13030
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughPacquet adds filtered workspace operations, dependency-closure materialization, importer-aware lockfile paths and resolution, normalized workspace links, and PNPR multi-project identity forwarding across CLI, package-manager, resolver, and integration-test layers. ChangesWorkspace install and PNPR integration
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches🧪 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 |
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.4319811011200003,
"stddev": 0.1301004822255659,
"median": 2.39278903872,
"user": 1.4793047199999996,
"system": 1.29467402,
"min": 2.32876251872,
"max": 2.73455404272,
"times": [
2.35463213172,
2.43423813672,
2.33803386772,
2.32876251872,
2.43727532172,
2.57286102172,
2.33933557772,
2.43094594572,
2.34917244672,
2.73455404272
]
},
{
"command": "pacquet@main",
"mean": 2.48966967502,
"stddev": 0.1452108388058452,
"median": 2.4362125397199996,
"user": 1.47064612,
"system": 1.26524982,
"min": 2.33619098172,
"max": 2.71330777272,
"times": [
2.67209220972,
2.37132628072,
2.35922399272,
2.38223763772,
2.33619098172,
2.49018744172,
2.37384186472,
2.5605476997200003,
2.71330777272,
2.63774086872
]
},
{
"command": "pnpr@HEAD",
"mean": 1.5881589445200002,
"stddev": 0.12340784482866306,
"median": 1.61306159022,
"user": 1.0240498199999999,
"system": 1.14504152,
"min": 1.33909026572,
"max": 1.73278846872,
"times": [
1.46493930172,
1.62516007572,
1.51090487572,
1.70313203572,
1.73278846872,
1.5467721867200002,
1.60096310472,
1.68220603372,
1.67563309672,
1.33909026572
]
},
{
"command": "pnpr@main",
"mean": 1.5268561411200001,
"stddev": 0.14212610344486123,
"median": 1.5148188442200001,
"user": 1.02440602,
"system": 1.1550183200000002,
"min": 1.35351133772,
"max": 1.75235528772,
"times": [
1.49261375072,
1.38587941472,
1.5842319117199999,
1.7411387017200002,
1.49468170372,
1.75235528772,
1.5689779697200001,
1.53495598472,
1.35351133772,
1.36021534872
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.24078984392000002,
"stddev": 0.0071266455991570235,
"median": 0.24119406552,
"user": 0.18739270000000002,
"system": 0.5045355999999999,
"min": 0.22995114452,
"max": 0.25331504052,
"times": [
0.23308519652,
0.22995114452,
0.23961567352000002,
0.24405856752,
0.24783611652,
0.25331504052,
0.23501250752,
0.24277245752,
0.23765205352000002,
0.24459968152
]
},
{
"command": "pacquet@main",
"mean": 0.25216900452,
"stddev": 0.005786501176277361,
"median": 0.24959130452,
"user": 0.1956389,
"system": 0.5347818,
"min": 0.24509453852000002,
"max": 0.26199286952,
"times": [
0.24826631052,
0.24919636452000002,
0.24509453852000002,
0.25592101352,
0.24769124452,
0.25358296252,
0.26106372852,
0.24889476852,
0.26199286952,
0.24998624452
]
},
{
"command": "pnpr@HEAD",
"mean": 0.25680221792,
"stddev": 0.006580534414856833,
"median": 0.25752509402,
"user": 0.20820719999999998,
"system": 0.5106784,
"min": 0.24548614252,
"max": 0.26854084952,
"times": [
0.26225137552,
0.25091836052,
0.25574571552,
0.25308995852,
0.24548614252,
0.25266416152,
0.25941902852,
0.25930447252,
0.26060211452,
0.26854084952
]
},
{
"command": "pnpr@main",
"mean": 0.26331730391999997,
"stddev": 0.00548789049900175,
"median": 0.26153159102,
"user": 0.20303849999999998,
"system": 0.5414608,
"min": 0.25768262452,
"max": 0.27391954752000003,
"times": [
0.25777111952,
0.26975509452,
0.26215350152,
0.26090968052,
0.27391954752000003,
0.26296289752,
0.26817688752,
0.26052327652,
0.25931840952,
0.25768262452
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.6795393653200006,
"stddev": 0.0232849799923347,
"median": 2.6837832287200003,
"user": 1.5604494399999997,
"system": 1.2658025199999998,
"min": 2.62671418772,
"max": 2.70995610072,
"times": [
2.66464742072,
2.69395415272,
2.6807452407200003,
2.69755212572,
2.6868212167200003,
2.67980561872,
2.69078852172,
2.62671418772,
2.70995610072,
2.6644090677200003
]
},
{
"command": "pacquet@main",
"mean": 2.69946567762,
"stddev": 0.011185743383169137,
"median": 2.69607736672,
"user": 1.58573144,
"system": 1.2653804199999998,
"min": 2.68786532372,
"max": 2.71930645372,
"times": [
2.71213188772,
2.68786532372,
2.68901636972,
2.69468626472,
2.71930645372,
2.69138677272,
2.7040670547200003,
2.70973106972,
2.69746846872,
2.68899711072
]
},
{
"command": "pnpr@HEAD",
"mean": 1.5719290524200003,
"stddev": 0.14851597108666087,
"median": 1.5673965012200002,
"user": 0.95463184,
"system": 1.1182305199999998,
"min": 1.3803638337200002,
"max": 1.79378901772,
"times": [
1.3803638337200002,
1.40094331872,
1.4988978397200001,
1.62690874372,
1.54835837472,
1.74735899972,
1.79378901772,
1.42075656772,
1.58643462772,
1.71547920072
]
},
{
"command": "pnpr@main",
"mean": 1.50806093322,
"stddev": 0.12871046783668902,
"median": 1.4619470102199998,
"user": 0.9444600399999998,
"system": 1.07826582,
"min": 1.36343233572,
"max": 1.75636031872,
"times": [
1.43885337972,
1.36343233572,
1.47068135272,
1.6425980337200001,
1.4069984557200002,
1.59447733872,
1.37795052072,
1.57604492872,
1.45321266772,
1.75636031872
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.5367072911799999,
"stddev": 0.009418263149161278,
"median": 0.5367603439799999,
"user": 0.6565381599999999,
"system": 0.65357898,
"min": 0.52294422348,
"max": 0.54853697248,
"times": [
0.53638300648,
0.52294422348,
0.5444457754800001,
0.54319921848,
0.54853697248,
0.53713768148,
0.54778975148,
0.52325007648,
0.52919827248,
0.53418793348
]
},
{
"command": "pacquet@main",
"mean": 0.5267659690800001,
"stddev": 0.010586082996906446,
"median": 0.52419138248,
"user": 0.6459739599999998,
"system": 0.6387527800000001,
"min": 0.51460565448,
"max": 0.54521051048,
"times": [
0.51460565448,
0.52349789348,
0.53273220348,
0.51759500548,
0.51685262348,
0.52488487148,
0.54521051048,
0.53789460548,
0.5181348864800001,
0.53625143648
]
},
{
"command": "pnpr@HEAD",
"mean": 0.28040137338000004,
"stddev": 0.00825990663487563,
"median": 0.27973051798,
"user": 0.17867035999999997,
"system": 0.47980017999999997,
"min": 0.27060522648,
"max": 0.29652843248,
"times": [
0.27985514648,
0.29652843248,
0.27960588948,
0.27060522648,
0.27154414548,
0.29093629548,
0.27643150248,
0.28149085048,
0.28317214048,
0.27384410448
]
},
{
"command": "pnpr@main",
"mean": 0.28625255918,
"stddev": 0.006681253935243346,
"median": 0.28725110348,
"user": 0.17095156,
"system": 0.51611688,
"min": 0.27517303548,
"max": 0.29721496848,
"times": [
0.28076427948,
0.29024808548,
0.27517303548,
0.29309065248,
0.28225808648,
0.28704681348,
0.28745539348,
0.28001520548,
0.29721496848,
0.28925907147999996
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.8300382943000002,
"stddev": 0.010183927975354485,
"median": 1.8316401129000002,
"user": 0.8455948,
"system": 0.7368966399999999,
"min": 1.8093264759,
"max": 1.8432722199000002,
"times": [
1.8432722199000002,
1.8308493069000003,
1.8315948529000001,
1.8291605839000002,
1.8316853729,
1.8093264759,
1.8161127479,
1.8389123219,
1.8330092829,
1.8364597779
]
},
{
"command": "pacquet@main",
"mean": 1.8241747400000001,
"stddev": 0.008741125237290417,
"median": 1.8263433869,
"user": 0.8565058999999998,
"system": 0.70147414,
"min": 1.8114135349000002,
"max": 1.8363641579,
"times": [
1.8196710149,
1.8115755789,
1.8363641579,
1.8300930199,
1.8299201059,
1.8255877759,
1.8326676129000001,
1.8114135349000002,
1.8270989979,
1.8173556009
]
},
{
"command": "pnpr@HEAD",
"mean": 0.28899862239999996,
"stddev": 0.005621560058750054,
"median": 0.2872967784,
"user": 0.18716139999999998,
"system": 0.5145288399999999,
"min": 0.2837061039,
"max": 0.2995081069,
"times": [
0.2895480719,
0.2837061039,
0.2995081069,
0.2952777889,
0.2897094549,
0.2840541269,
0.2848133189,
0.2842589809,
0.2940647859,
0.2850454849
]
},
{
"command": "pnpr@main",
"mean": 0.27722453770000005,
"stddev": 0.005642554427699113,
"median": 0.2778123899,
"user": 0.15923190000000004,
"system": 0.5177737399999999,
"min": 0.2656671409,
"max": 0.2850210689,
"times": [
0.2656671409,
0.2734396959,
0.2808830949,
0.2850210689,
0.2836934109,
0.2740313059,
0.27744908890000003,
0.2793214179,
0.2745634619,
0.2781756909
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.31988964042,
"stddev": 0.006330412382393754,
"median": 0.32093843182000004,
"user": 0.31290832,
"system": 0.05550102,
"min": 0.30599210932000004,
"max": 0.32794387432000005,
"times": [
0.32445598832000005,
0.31551085532,
0.32029457032,
0.32794387432000005,
0.30599210932000004,
0.32412873532,
0.31930033732,
0.32158229332000005,
0.31530073232000005,
0.32438690832000006
]
},
{
"command": "pacquet@main",
"mean": 0.31763142362,
"stddev": 0.003496678094541607,
"median": 0.31724865732000007,
"user": 0.30894401999999993,
"system": 0.053508219999999995,
"min": 0.31189945832000004,
"max": 0.32255502632000005,
"times": [
0.31511716732000006,
0.32072691032000006,
0.31600336832000003,
0.31789594532000004,
0.31189945832000004,
0.32211988132,
0.31660136932000005,
0.31431344232,
0.31908166732000004,
0.32255502632000005
]
},
{
"command": "pnpr@HEAD",
"mean": 0.08269227092606059,
"stddev": 0.0011095122932158622,
"median": 0.08253157132,
"user": 0.020528883636363637,
"system": 0.007220259999999999,
"min": 0.08108183532,
"max": 0.08571686032,
"times": [
0.08569632332,
0.08179589332000001,
0.08348816432,
0.08571686032,
0.08309844332,
0.08226134532,
0.08253157132,
0.08214703132000001,
0.08147569232,
0.08303104732,
0.08252473932,
0.08189351532,
0.08336491332,
0.08108183532,
0.08280905132000001,
0.08153925332,
0.08261525832,
0.08225578432,
0.08273938132,
0.08167704032,
0.08257131632,
0.08234423032,
0.08200549532,
0.08252063132,
0.08212731432,
0.08406269032000001,
0.08495310832,
0.08269387532,
0.08190397532,
0.08288814032,
0.08114137732,
0.08315923732,
0.08273040432
]
},
{
"command": "pnpr@main",
"mean": 0.07779996374857144,
"stddev": 0.001676938670651555,
"median": 0.07732025632,
"user": 0.015264548571428569,
"system": 0.007380990285714285,
"min": 0.07518252032,
"max": 0.08372375532,
"times": [
0.08177349132,
0.07518252032,
0.07940952132,
0.07518490432,
0.07829584432,
0.07676955432,
0.07764462332000001,
0.07791084232,
0.07716892232,
0.07683979532,
0.07754592932,
0.07674212332000001,
0.07763028732,
0.07672516032,
0.07839841632,
0.07783703532,
0.08372375532,
0.08000430532,
0.07883664832000001,
0.08076285732,
0.07674709132,
0.07675211132,
0.07820580532,
0.07671511232,
0.07705435732,
0.07840771432,
0.07656180432,
0.07719665432,
0.07746011832000001,
0.07728735332,
0.07732025632,
0.07725415232,
0.07705503832,
0.07737118032,
0.07722344432
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.52879389172,
"stddev": 0.14673860227399294,
"median": 4.45415987492,
"user": 1.6487722599999999,
"system": 1.36272412,
"min": 4.42154779192,
"max": 4.8025724609200005,
"times": [
4.43485872592,
4.42540628292,
4.43128917692,
4.46780263992,
4.75219078992,
4.8025724609200005,
4.46611259392,
4.44220715592,
4.64395129892,
4.42154779192
]
},
{
"command": "pacquet@main",
"mean": 4.50487562082,
"stddev": 0.13450255198307323,
"median": 4.4627161184199995,
"user": 1.62066296,
"system": 1.40636992,
"min": 4.41512864292,
"max": 4.86402331592,
"times": [
4.48136480492,
4.52632036792,
4.44406743192,
4.42083784192,
4.41512864292,
4.86402331592,
4.54921100292,
4.49125324492,
4.43594445992,
4.42060509492
]
},
{
"command": "pnpr@HEAD",
"mean": 3.56889778432,
"stddev": 0.13902608123774535,
"median": 3.5011881009200003,
"user": 1.1477689599999998,
"system": 1.2305019200000002,
"min": 3.4506069269200004,
"max": 3.83015626292,
"times": [
3.83015626292,
3.45478074892,
3.5788968419200002,
3.4807398429200003,
3.6436964459200003,
3.78160641992,
3.4506069269200004,
3.49027064892,
3.4661181519200004,
3.5121055529200005
]
},
{
"command": "pnpr@main",
"mean": 3.5364666997200005,
"stddev": 0.09681047043414098,
"median": 3.5020392684200004,
"user": 1.1489490599999999,
"system": 1.2459442200000002,
"min": 3.4363706619200003,
"max": 3.6978997269200002,
"times": [
3.6230287499200005,
3.5373452269200003,
3.46353332892,
3.58001730492,
3.65578334492,
3.44236324992,
3.4363706619200003,
3.6978997269200002,
3.4667333099200004,
3.46159209292
]
}
]
} |
|
| Branch | pr/13030 |
| 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,609.82 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 301.08 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 306.27 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 86.32 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,563.16 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,534.35 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 332.94 ms |
7212a3c to
eebbf7d
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13030 +/- ##
==========================================
+ Coverage 85.33% 85.66% +0.32%
==========================================
Files 505 505
Lines 81225 83555 +2330
==========================================
+ Hits 69315 71574 +2259
- Misses 11910 11981 +71 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
f1e91b7 to
d334093
Compare
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
Confidence Score: 5/5The core merge logic is well-reasoned and the change is safe to merge pending the stacked prerequisite PR. No logic bugs or behavioral regressions were found after tracing the merge paths, lockfile reachability walk, freshness-check inputs, and pnpr containment check. No files require special attention. Reviews (8): Last reviewed commit: "test(pacquet): cover dependency-free imp..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 15
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pnpm/crates/cli/src/cli_args/fetch.rs (1)
18-35: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy liftThread workspace selection through
fetch.
dispatch_install::fetchstill callsFetchArgs::run()directly, so recursive--filterselection never reaches fetch. A filtered fetch can therefore prefetch the whole shared lockfile instead of the selected closure; route selection through dispatch and use the selected path when present.🤖 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/src/cli_args/fetch.rs` around lines 18 - 35, Update dispatch_install::fetch to resolve workspace selection through the dispatch path before invoking FetchArgs::run, rather than calling it directly. Thread the selected path into FetchArgs::run and use it when present so recursive --filter fetches operate only on the selected dependency closure while preserving the existing behavior when no selection is provided.Sources: Coding guidelines, Path instructions
🧹 Nitpick comments (2)
pnpm/crates/cli/src/cli_args/sbom.rs (1)
391-396: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAvoid unnecessary path cloning or
Cowboilerplate when reading manifests.All three locations manually manage a temporary path allocation (via
Cowor.clone()) just to pass a reference tosafe_read_package_json_from_dir. Because the function accepts&Pathand does not retain the reference, you can inline the path construction directly and avoid intermediate variables. As per the CODE_STYLE_GUIDE.md, prefer owned/borrowed parameter choices to avoid extra copying.
pnpm/crates/cli/src/cli_args/sbom.rs#L391-L396: Inline thelockfile_dir.join(...)call and remove theCowwrapping.pnpm/crates/cli/src/cli_args/sbom.rs#L468-L477: Inline thelockfile_dir.join(...)call to avoid the explicitlockfile_dir.clone().pnpm/crates/cli/src/cli_args/sbom.rs#L518-L523: Inline thelockfile_dir.join(...)call to avoid the explicitlockfile_dir.clone().♻️ Proposed refactors
For
pnpm/crates/cli/src/cli_args/sbom.rs#L391-L396:- let importer_dir: Cow<'_, Path> = if single_id == "." { - Cow::Borrowed(&lockfile_dir) - } else { - Cow::Owned(lockfile_dir.join(single_id)) - }; - safe_read_package_json_from_dir(&importer_dir).ok().flatten().unwrap_or_else(|| { + let manifest = if single_id == "." { + safe_read_package_json_from_dir(&lockfile_dir) + } else { + safe_read_package_json_from_dir(&lockfile_dir.join(single_id)) + }; + manifest.ok().flatten().unwrap_or_else(|| {For
pnpm/crates/cli/src/cli_args/sbom.rs#L468-L477:- let importer_dir = if importer_id == "." { - lockfile_dir.clone() - } else { - lockfile_dir.join(&importer_id) - }; - safe_read_package_json_from_dir(&importer_dir) - .ok() - .flatten() - .map(|m| peer_names_from_manifest(&m)) - .unwrap_or_default() + let manifest = if importer_id == "." { + safe_read_package_json_from_dir(&lockfile_dir) + } else { + safe_read_package_json_from_dir(&lockfile_dir.join(&importer_id)) + }; + manifest.ok().flatten().map(|m| peer_names_from_manifest(&m)).unwrap_or_default()For
pnpm/crates/cli/src/cli_args/sbom.rs#L518-L523:- let ws_dir = if target_id == "." { - lockfile_dir.clone() - } else { - lockfile_dir.join(&target_id) - }; - if let Ok(Some(ws_manifest)) = safe_read_package_json_from_dir(&ws_dir) { + let manifest = if target_id == "." { + safe_read_package_json_from_dir(&lockfile_dir) + } else { + safe_read_package_json_from_dir(&lockfile_dir.join(&target_id)) + }; + if let Ok(Some(ws_manifest)) = manifest {🤖 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/src/cli_args/sbom.rs` around lines 391 - 396, In pnpm/crates/cli/src/cli_args/sbom.rs at lines 391-396, update the manifest-reading flow around safe_read_package_json_from_dir to inline the borrowed lockfile_dir or joined path and remove the temporary Cow. Apply the same inline path construction at lines 468-477 and 518-523, eliminating the explicit lockfile_dir.clone() while preserving the existing path-selection behavior.Source: Path instructions
pnpm/crates/pnpr-client/tests/integration.rs (1)
132-161: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAvoid full-buffer UTF-8 conversion when scanning for header boundaries.
Searching for the
\r\n\r\nboundary by first converting the entire buffer to a lossy string exposes the code to potential byte-index desyncs. If a network stream contained invalid UTF-8 bytes in the payload,from_utf8_lossywould insert multi-byte replacement characters (U+FFFD), shifting the string indices. This would cause the matchedheaders_endindex to misalign with the underlying rawbufferlength check.Since this is a test utility and HTTP headers are ASCII, you can safely and efficiently search directly on the raw bytes instead.
♻️ Proposed refactor
- let text = String::from_utf8_lossy(&buffer); - if let Some(headers_end) = text.find("\r\n\r\n") { - let content_length = text[..headers_end] + if let Some(headers_end) = buffer.windows(4).position(|window| window == b"\r\n\r\n") { + let headers = String::from_utf8_lossy(&buffer[..headers_end]); + let content_length = headers .lines() .find_map(|line| { let (name, value) = line.split_once(':')?;🤖 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/pnpr-client/tests/integration.rs` around lines 132 - 161, Update capture_one_request_with_response to locate the \r\n\r\n header boundary directly in the raw buffer bytes instead of converting the full buffer with String::from_utf8_lossy. Keep Content-Length parsing limited to the ASCII header portion and preserve the existing body-completion condition using byte offsets aligned with buffer.
🤖 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/src/cli_args/add.rs`:
- Around line 192-242: Update run_selected to handle self.config before
constructing or invoking the selected-project Add flow, matching run’s existing
add_config_dependency behavior. Ensure filtered and recursive add --config
commands update the workspace configuration dependency instead of performing a
normal project add, while preserving the current path for non-config requests.
In `@pnpm/crates/cli/src/cli_args/install.rs`:
- Around line 1023-1053: Update resolve_projects_for_pnpr and its CLI dispatch
callers so a filtered InstallFamilySelection resolves only the selected projects
or their required workspace closure, rather than every selection.projects entry.
Preserve full workspace identity metadata separately for the later lockfile
merge, and propagate the selection through dispatch without dropping it;
unfiltered requests should retain the existing workspace resolution behavior.
In `@pnpm/crates/cli/src/cli_args/pipelines.rs`:
- Around line 43-47: Replace the ad-hoc miette! diagnostic in the recursive
install validation with the corresponding user-facing diagnostic type from
pacquet-diagnostics. Define the diagnostic there using code
ERR_PNPM_RECURSIVE_SHARED_LOCKFILE_UNSUPPORTED and the existing canonical
message, then return that type from the relevant CLI argument validation path
while preserving the current unsupported-condition check.
In `@pnpm/crates/cli/src/cli_args/update_interactive.rs`:
- Around line 61-65: Normalize each project’s root path before checking
membership in selection.selected_dirs within the interactive update project
filtering flow. Reuse the same path-normalization approach as the sibling
install path so equivalent relative, absolute, or Windows-form paths are matched
while preserving the existing filter and mapping behavior.
In `@pnpm/crates/package-manager/src/current_lockfile.rs`:
- Around line 153-160: Update the freshly_resolved package and snapshot
assignment around overlay_package_maps so previous lockfile entries are overlaid
only when can_reuse_unselected_importers is true. When global inputs changed and
reuse is false, use fresh_packages and fresh_snapshots directly, preventing
stale graph data from being restored alongside new resolutions.
In `@pnpm/crates/package-manager/src/install_frozen_lockfile.rs`:
- Around line 1654-1659: Update link_selected_hoisted_direct_dependencies and
its call sites to honor the relocated modules directory represented by
symlink_workspace_root/config.modules_dir instead of deriving
project_dir/node_modules. Ensure selected dependency and binary links use that
resolved modules path for both referenced locations.
In `@pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs`:
- Around line 1651-1657: The hoisted filtered-install flow must retain only the
selected importer dependency closure instead of promoting every lockfile
importer to a root. In
pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs:1651-1657, derive
initial_materialization_ids from selected_importer_ids for hoisted installs
while preserving unselected on-disk entries separately; in
pnpm/crates/cli/src/cli_args/install.rs:743-755, make pnpr prefetch use that
same selected closure rather than all lockfile importers.
In `@pnpm/crates/package-manager/src/install.rs`:
- Around line 1236-1238: Update the previous_modules_metadata initialization in
the filtered_install and !resolve_only branch to propagate errors from
pacquet_modules_yaml::read_modules_manifest::<Host> instead of converting them
to None with ok().flatten(). Preserve the absent-manifest case as None while
returning the deserialization error so filtered installs cannot overwrite
unselected metadata.
- Around line 2619-2629: The merge logic around previous.injected_deps must
preserve injected dependency targets per importer rather than deciding retention
solely by source membership. Update the loop to compare and retain only
unaffected target paths for each source, merging them into next.injected_deps
alongside selected targets; do not drop an entire source when selected and
unselected importers share it.
In `@pnpm/crates/package-manager/src/optimistic_repeat_install.rs`:
- Line 291: Update check_optimistic_repeat_install so it does not take the fast
path when the loaded state has state.filtered_install set; preserve the prior
filtered-install marker instead of reclassifying it as a full install at the
false assignment near this branch. If retaining the fast path, fully verify
every importer before writing false.
In `@pnpm/crates/package-manager/src/prune_direct_deps.rs`:
- Around line 70-73: Update the documentation for the pruning contract around
new_included to explicitly state that links present in the current lockfile are
removed when their dependency groups are no longer included. Preserve the
constraint that, when trusted_importer_ids is set, only links belonging to those
importers are eligible for removal.
In `@pnpm/crates/package-manager/src/remove.rs`:
- Around line 238-264: Update prepare_selected_manifests and prepare_manifest to
detect whether any requested package was actually removed, and retain only
matching project indices. Emit manifest events and invoke
persist_selected_manifests only for those indices, leaving untouched projects
unreported and unchanged. Extend the existing “ignores projects” test through
persistence to verify no-op manifests are not persisted or reported.
In `@pnpm/crates/pnpr-client/src/lib.rs`:
- Around line 403-409: Update resolve_projects_streaming to capture the
permitted importer set before constructing the request, combining the requested
workspace projects with importers already present in the input lockfile. When
handling the terminal done frame, validate that every requested importer exists
and no importer outside this permitted set is present; reject the response with
the existing client error path when validation fails.
In `@pnpm/crates/resolving-deps-resolver/src/resolve_peers.rs`:
- Around line 83-106: Normalize project_dir with pacquet_fs::lexical_normalize
before passing it as the base to pathdiff::diff_paths in
importer_relative_link_dep_path. Preserve the existing target normalization and
link formatting, and add a regression test covering a lexically non-normalized
importer root that verifies the resulting link target.
In `@pnpr/crates/pnpr/src/resolver/resolve.rs`:
- Around line 285-303: Update sanitized_importer_dir and the importer-directory
handling in resolve.rs to deduplicate directories using a host-aware canonical
or collision key, so aliases such as packages/Foo and packages/foo cannot
produce separate writes on case-insensitive filesystems. Preserve rejection of
unsafe components and add regression coverage for Windows-equivalent path
aliases, verifying only one project dependency map is written.
---
Outside diff comments:
In `@pnpm/crates/cli/src/cli_args/fetch.rs`:
- Around line 18-35: Update dispatch_install::fetch to resolve workspace
selection through the dispatch path before invoking FetchArgs::run, rather than
calling it directly. Thread the selected path into FetchArgs::run and use it
when present so recursive --filter fetches operate only on the selected
dependency closure while preserving the existing behavior when no selection is
provided.
---
Nitpick comments:
In `@pnpm/crates/cli/src/cli_args/sbom.rs`:
- Around line 391-396: In pnpm/crates/cli/src/cli_args/sbom.rs at lines 391-396,
update the manifest-reading flow around safe_read_package_json_from_dir to
inline the borrowed lockfile_dir or joined path and remove the temporary Cow.
Apply the same inline path construction at lines 468-477 and 518-523,
eliminating the explicit lockfile_dir.clone() while preserving the existing
path-selection behavior.
In `@pnpm/crates/pnpr-client/tests/integration.rs`:
- Around line 132-161: Update capture_one_request_with_response to locate the
\r\n\r\n header boundary directly in the raw buffer bytes instead of converting
the full buffer with String::from_utf8_lossy. Keep Content-Length parsing
limited to the ASCII header portion and preserve the existing body-completion
condition using byte offsets aligned with buffer.
🪄 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: 6c1475ee-17b2-4f9e-8d9d-9f2b2b660e57
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml,!pnpm-lock.yaml
📒 Files selected for processing (71)
.changeset/pacquet-install-filters.md.changeset/pnpr-workspace-identity.mdpnpm/crates/cli/src/cli_args/add.rspnpm/crates/cli/src/cli_args/audit.rspnpm/crates/cli/src/cli_args/deploy.rspnpm/crates/cli/src/cli_args/dispatch_install.rspnpm/crates/cli/src/cli_args/dispatch_query.rspnpm/crates/cli/src/cli_args/fetch.rspnpm/crates/cli/src/cli_args/import.rspnpm/crates/cli/src/cli_args/install.rspnpm/crates/cli/src/cli_args/link.rspnpm/crates/cli/src/cli_args/outdated.rspnpm/crates/cli/src/cli_args/outdated/tests.rspnpm/crates/cli/src/cli_args/pipelines.rspnpm/crates/cli/src/cli_args/prune.rspnpm/crates/cli/src/cli_args/rebuild.rspnpm/crates/cli/src/cli_args/remove.rspnpm/crates/cli/src/cli_args/sbom.rspnpm/crates/cli/src/cli_args/unlink.rspnpm/crates/cli/src/cli_args/update.rspnpm/crates/cli/src/cli_args/update_interactive.rspnpm/crates/cli/src/cli_args/update_interactive/tests.rspnpm/crates/cli/src/cli_args/why.rspnpm/crates/cli/src/state.rspnpm/crates/cli/src/state/tests.rspnpm/crates/cli/tests/deploy.rspnpm/crates/cli/tests/global.rspnpm/crates/cli/tests/install_filters.rspnpm/crates/cli/tests/outdated.rspnpm/crates/cli/tests/pnpr_install.rspnpm/crates/cli/tests/prune.rspnpm/crates/cli/tests/sbom.rspnpm/crates/cli/tests/why.rspnpm/crates/lockfile-preferred-versions/src/lib.rspnpm/crates/lockfile-preferred-versions/src/tests.rspnpm/crates/package-manager/src/add.rspnpm/crates/package-manager/src/add/tests.rspnpm/crates/package-manager/src/current_lockfile.rspnpm/crates/package-manager/src/current_lockfile/tests.rspnpm/crates/package-manager/src/dependencies_graph_to_lockfile/tests.rspnpm/crates/package-manager/src/install.rspnpm/crates/package-manager/src/install/tests.rspnpm/crates/package-manager/src/install_frozen_lockfile.rspnpm/crates/package-manager/src/install_with_fresh_lockfile.rspnpm/crates/package-manager/src/install_with_fresh_lockfile/tests.rspnpm/crates/package-manager/src/optimistic_repeat_install.rspnpm/crates/package-manager/src/prune_direct_deps.rspnpm/crates/package-manager/src/prune_direct_deps/tests.rspnpm/crates/package-manager/src/remove.rspnpm/crates/package-manager/src/remove/tests.rspnpm/crates/package-manager/src/update.rspnpm/crates/package-manager/src/update/tests.rspnpm/crates/pnpr-client/src/lib.rspnpm/crates/pnpr-client/tests/integration.rspnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree.rspnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/tests.rspnpm/crates/resolving-deps-resolver/src/resolve_importer.rspnpm/crates/resolving-deps-resolver/src/resolve_peers.rspnpm/crates/resolving-deps-resolver/src/resolve_peers/tests.rspnpm/crates/resolving-deps-resolver/src/resolve_workspace.rspnpm/crates/resolving-deps-resolver/src/resolve_workspace/tests.rspnpm11/installing/deps-installer/src/install/index.tspnpm11/installing/deps-installer/test/install/pnprWorkspaceMetadata.tspnpr/client/package.jsonpnpr/client/src/resolveViaPnprServer.tspnpr/client/test/resolveViaPnprServer.test.tspnpr/crates/pnpr/src/resolver.rspnpr/crates/pnpr/src/resolver/protocol.rspnpr/crates/pnpr/src/resolver/resolve.rspnpr/crates/pnpr/src/resolver/resolve/tests.rspnpr/crates/pnpr/src/resolver/tests.rs
d334093 to
2066913
Compare
Code Review by Qodo
Context used✅ Compliance rules (platform):
18 rules 1.
|
PR Code Suggestions ✨Latest suggestions up to e0e361c Warning
Previous suggestionsSuggestions up to commit 6439feb
Suggestions up to commit 88fe3aa
Suggestions up to commit 36c53f9
Suggestions up to commit a82a548
Suggestions up to commit 5ca0015
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2066913 to
5ca0015
Compare
|
Code review by qodo was updated up to the latest commit 5ca0015 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/src/cli_args/sbom.rs`:
- Around line 391-392: Validate each importer ID before passing it to
importer_root_dir in the SBOM manifest paths around the visible
safe_read_package_json_from_dir call and its corresponding occurrences. Reject
absolute paths and traversal segments such as “..”, and skip or safely handle
invalid IDs before reading package.json, while preserving existing behavior for
valid importer IDs.
In `@pnpm/crates/cli/src/cli_args/update.rs`:
- Around line 181-190: Centralize the --workspace validation and canonical
unsupported-error message used by run_selected, run, and run_global. Update
run_selected to call the shared validation helper instead of constructing its
own miette error, preserving identical user-visible text across all update
paths.
🪄 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: bfe06573-855d-4c75-a214-fb07c7c1e90e
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml,!pnpm-lock.yaml
📒 Files selected for processing (75)
.changeset/pacquet-install-filters.md.changeset/pnpr-workspace-identity.mdpnpm/crates/cli/src/cli_args/add.rspnpm/crates/cli/src/cli_args/audit.rspnpm/crates/cli/src/cli_args/deploy.rspnpm/crates/cli/src/cli_args/dispatch_install.rspnpm/crates/cli/src/cli_args/dispatch_query.rspnpm/crates/cli/src/cli_args/fetch.rspnpm/crates/cli/src/cli_args/import.rspnpm/crates/cli/src/cli_args/install.rspnpm/crates/cli/src/cli_args/link.rspnpm/crates/cli/src/cli_args/outdated.rspnpm/crates/cli/src/cli_args/outdated/tests.rspnpm/crates/cli/src/cli_args/pipelines.rspnpm/crates/cli/src/cli_args/prune.rspnpm/crates/cli/src/cli_args/rebuild.rspnpm/crates/cli/src/cli_args/recursive.rspnpm/crates/cli/src/cli_args/remove.rspnpm/crates/cli/src/cli_args/sbom.rspnpm/crates/cli/src/cli_args/unlink.rspnpm/crates/cli/src/cli_args/update.rspnpm/crates/cli/src/cli_args/update_interactive.rspnpm/crates/cli/src/cli_args/update_interactive/tests.rspnpm/crates/cli/src/cli_args/why.rspnpm/crates/cli/src/state.rspnpm/crates/cli/src/state/tests.rspnpm/crates/cli/tests/deploy.rspnpm/crates/cli/tests/global.rspnpm/crates/cli/tests/install_filters.rspnpm/crates/cli/tests/outdated.rspnpm/crates/cli/tests/pnpr_install.rspnpm/crates/cli/tests/prune.rspnpm/crates/cli/tests/sbom.rspnpm/crates/cli/tests/why.rspnpm/crates/lockfile-preferred-versions/src/lib.rspnpm/crates/lockfile-preferred-versions/src/tests.rspnpm/crates/package-manager/src/add.rspnpm/crates/package-manager/src/add/tests.rspnpm/crates/package-manager/src/current_lockfile.rspnpm/crates/package-manager/src/current_lockfile/tests.rspnpm/crates/package-manager/src/dependencies_graph_to_lockfile/tests.rspnpm/crates/package-manager/src/install.rspnpm/crates/package-manager/src/install/tests.rspnpm/crates/package-manager/src/install_frozen_lockfile.rspnpm/crates/package-manager/src/install_with_fresh_lockfile.rspnpm/crates/package-manager/src/install_with_fresh_lockfile/tests.rspnpm/crates/package-manager/src/optimistic_repeat_install.rspnpm/crates/package-manager/src/prune_direct_deps.rspnpm/crates/package-manager/src/prune_direct_deps/tests.rspnpm/crates/package-manager/src/remove.rspnpm/crates/package-manager/src/remove/tests.rspnpm/crates/package-manager/src/symlink_direct_dependencies.rspnpm/crates/package-manager/src/update.rspnpm/crates/package-manager/src/update/tests.rspnpm/crates/pnpr-client/src/lib.rspnpm/crates/pnpr-client/tests/integration.rspnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree.rspnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/tests.rspnpm/crates/resolving-deps-resolver/src/resolve_importer.rspnpm/crates/resolving-deps-resolver/src/resolve_peers.rspnpm/crates/resolving-deps-resolver/src/resolve_peers/tests.rspnpm/crates/resolving-deps-resolver/src/resolve_workspace.rspnpm/crates/resolving-deps-resolver/src/resolve_workspace/tests.rspnpm11/installing/deps-installer/src/install/index.tspnpm11/installing/deps-installer/test/install/pnprWorkspaceMetadata.tspnpr/client/package.jsonpnpr/client/src/index.tspnpr/client/src/resolveViaPnprServer.tspnpr/client/test/resolveViaPnprServer.test.tspnpr/client/test/tsconfig.jsonpnpr/crates/pnpr/src/resolver.rspnpr/crates/pnpr/src/resolver/protocol.rspnpr/crates/pnpr/src/resolver/resolve.rspnpr/crates/pnpr/src/resolver/resolve/tests.rspnpr/crates/pnpr/src/resolver/tests.rs
🚧 Files skipped from review as they are similar to previous changes (63)
- .changeset/pacquet-install-filters.md
- .changeset/pnpr-workspace-identity.md
- pnpr/client/test/tsconfig.json
- pnpr/client/src/index.ts
- pnpm/crates/cli/src/cli_args/unlink.rs
- pnpm/crates/cli/src/cli_args/recursive.rs
- pnpm/crates/cli/src/state/tests.rs
- pnpm/crates/cli/src/cli_args/rebuild.rs
- pnpm/crates/cli/src/state.rs
- pnpm/crates/cli/src/cli_args/import.rs
- pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/tests.rs
- pnpm/crates/package-manager/src/prune_direct_deps.rs
- pnpm11/installing/deps-installer/src/install/index.ts
- pnpr/crates/pnpr/src/resolver/tests.rs
- pnpm/crates/package-manager/src/install_with_fresh_lockfile/tests.rs
- pnpm/crates/cli/tests/outdated.rs
- pnpm/crates/package-manager/src/symlink_direct_dependencies.rs
- pnpm/crates/cli/tests/prune.rs
- pnpm/crates/cli/src/cli_args/outdated/tests.rs
- pnpm/crates/cli/src/cli_args/update_interactive/tests.rs
- pnpm/crates/cli/src/cli_args/link.rs
- pnpm/crates/cli/src/cli_args/dispatch_query.rs
- pnpm/crates/cli/tests/deploy.rs
- pnpm/crates/cli/src/cli_args/deploy.rs
- pnpm/crates/package-manager/src/remove/tests.rs
- pnpm/crates/cli/src/cli_args/update_interactive.rs
- pnpr/client/src/resolveViaPnprServer.ts
- pnpm/crates/pnpr-client/tests/integration.rs
- pnpr/crates/pnpr/src/resolver.rs
- pnpm/crates/cli/src/cli_args/why.rs
- pnpm/crates/resolving-deps-resolver/src/resolve_importer.rs
- pnpm/crates/package-manager/src/add.rs
- pnpm/crates/package-manager/src/prune_direct_deps/tests.rs
- pnpm/crates/package-manager/src/update/tests.rs
- pnpr/crates/pnpr/src/resolver/protocol.rs
- pnpm/crates/resolving-deps-resolver/src/resolve_peers.rs
- pnpm/crates/package-manager/src/optimistic_repeat_install.rs
- pnpm/crates/package-manager/src/add/tests.rs
- pnpm/crates/cli/src/cli_args/dispatch_install.rs
- pnpm/crates/cli/src/cli_args/fetch.rs
- pnpm/crates/cli/src/cli_args/outdated.rs
- pnpm/crates/package-manager/src/remove.rs
- pnpm/crates/cli/tests/sbom.rs
- pnpm/crates/package-manager/src/install_frozen_lockfile.rs
- pnpm/crates/resolving-deps-resolver/src/resolve_peers/tests.rs
- pnpm/crates/lockfile-preferred-versions/src/lib.rs
- pnpm/crates/cli/tests/pnpr_install.rs
- pnpr/crates/pnpr/src/resolver/resolve.rs
- pnpm/crates/cli/src/cli_args/add.rs
- pnpm11/installing/deps-installer/test/install/pnprWorkspaceMetadata.ts
- pnpm/crates/cli/src/cli_args/audit.rs
- pnpm/crates/pnpr-client/src/lib.rs
- pnpm/crates/cli/tests/why.rs
- pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs
- pnpm/crates/cli/tests/install_filters.rs
- pnpm/crates/package-manager/src/current_lockfile.rs
- pnpm/crates/package-manager/src/install/tests.rs
- pnpr/crates/pnpr/src/resolver/resolve/tests.rs
- pnpm/crates/package-manager/src/update.rs
- pnpm/crates/cli/src/cli_args/install.rs
- pnpm/crates/package-manager/src/current_lockfile/tests.rs
- pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs
- pnpm/crates/package-manager/src/install.rs
|
Code review by qodo was updated up to the latest commit a82a548 |
…le merge
A dependency-free workspace project is present-but-empty in a resolved
lockfile, not absent: pnpm's `pruneLockfile` records it as
`{ specifiers: {} }` and the pnpr resolver returns every requested importer.
So a full-workspace `merge_filtered_wanted_lockfile` finds its empty
snapshot and merges it without a `MissingImporter` error — that error is
reserved for an importer genuinely absent from the fresh lockfile (a partial
resolution). Add a regression test for the dep-free case and correct the
pnpr-client comment that wrongly claimed dep-free importers are omitted.
6439feb to
e0e361c
Compare
|
Code review by qodo was updated up to the latest commit e0e361c |
|
| Branch | pr/13030 |
| Testbed | pacquet |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result milliseconds (ms) (Result Δ%) | Upper Boundary milliseconds (ms) (Limit %) |
|---|---|---|---|
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot 🚷 view threshold | 2,626.71 ms(-9.85%)Baseline: 2,913.65 ms | 3,496.38 ms (75.13%) |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot 🚷 view threshold | 1,809.33 ms(-13.05%)Baseline: 2,080.87 ms | 2,497.04 ms (72.46%) |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot 🚷 view threshold | 522.94 ms(-26.44%)Baseline: 710.87 ms | 853.05 ms (61.30%) |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot 🚷 view threshold | 305.99 ms(-28.32%)Baseline: 426.87 ms | 512.25 ms (59.74%) |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot 🚷 view threshold | 2,328.76 ms(-12.12%)Baseline: 2,650.05 ms | 3,180.06 ms (73.23%) |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot 🚷 view threshold | 4,421.55 ms(-6.97%)Baseline: 4,752.75 ms | 5,703.29 ms (77.53%) |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot 🚷 view threshold | 229.95 ms(-21.91%)Baseline: 294.49 ms | 353.38 ms (65.07%) |
|
| Branch | pr/13030 |
| 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,380.36 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 283.71 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 270.61 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 81.08 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,339.09 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,450.61 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 245.49 ms |
…13125) The Rust render_ledger wrote an empty intent list as a bare 'intents:' key, which parses as YAML null - a shape neither stack's ledger reader accepted. The 11.14.0 / 12.0.0-alpha.14 release run (#13113) re-rendered the committed ledger through that path, turning the [email protected] entry's 'intents: []' into the bare form, and every 'pnpm version -r' after it failed with ERR_PNPM_INVALID_VERSIONING_LEDGER. - Render empty intent lists as '[]' in both ledger entry shapes, matching the TypeScript side's yaml.stringify byte for byte. - Accept null where a list belongs when reading, in both stacks: a bare entry key or bare 'intents:' key now reads as an empty list, so ledgers written before this fix stay readable. - Repair the committed .changeset/ledger.yaml entry. - Drop the stale meta_only field from a package-manager PeerDep test fixture (#13030 added it while #13120 removed the field, breaking main's --all-targets build).
…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.
…uites (#13152) Stage 2 of pnpm/plans/TEST_PORTING.md (#13146): port the workspace subset install (--filter) and multi-importer suites. Add crates/cli/tests/multiple_importers.rs covering the open "Support Workspaces" items (subset preservation, stale current-lockfile importers, filtered current-lockfile contents, headless-vs-resolve decisions, subdependency-from-workspace, workspace bin links, custom virtualStoreDir), promote the three --filter known_failures stubs in hoist.rs and optional_dependencies.rs to real tests now that filtered installs exist (#13030), and port the hoisted-linker workspace-subset and workspace lifecycle-script cases. Fix a reporter parity gap the ports exposed: the TypeScript CLI announces "Lockfile is up to date, resolution step is skipped" whenever the headless installer is entered (cold materialization and subset installs included) and "Importing packages to virtual store" under ignorePackageManifest; pacquet only announced the no-op short-circuit. The frozen materialization branch now emits the same logs. Record two behavioral divergences the ports surfaced as known_failures stubs pending a cross-stack decision: pacquet's subset closure deep-installs importer-level link targets where upstream keeps them shallow, and pacquet's hoisted workspace layout duplicates the root-winning version under consumer projects. Not-yet-implemented boundaries (publishConfig.directory linking, buildIndex-ordered project scripts, sharedWorkspaceLockfile: false) are stubbed too. The FilteredWorkspace fixture moves from install_filters.rs into the shared tests/_utils/mod.rs as WorkspaceFixture so the new suite reuses it.
Summary
Important
This branch must incorporate #13066 before this PR can merge. The intended sequence is to merge #13066 into
main, then rebase or update this branch onto the latestmainso the zizmor security check runs with the shared fix.node_modulesstate.autoInstallPeers, excluded explicit links, and workspace self-link serialization.This Draft PR is stacked on #13016, which supplies the workspace project identity metadata used by pnpr. It must be rebased after that PR lands; the five commits after the dependency commit contain this PR's implementation.
Verification included the repository pre-push hook, workspace
cargo check, strict Clippy and rustdoc, targeted library and integration suites, self-hosted regular and recursive lockfile-only installs with nopnpm-lock.yamlchanges, and the Windows-equivalent workspace path regression.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 (Codex, GPT-5).
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit
New Features
Bug Fixes
Tests