Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pnpm/pnpm/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughForced installs now retain previous lockfile entries, compute obsolete child aliases, and remove those aliases from virtual-store packages. Cleanup safely ignores invalid dependency names. Tests cover forced installs with frozen and non-frozen lockfiles. ChangesForced child-link cleanup
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant User
participant Install
participant linkAllModules
participant VirtualStore
User->>Install: run install --force
Install->>linkAllModules: pass current lockfile and package link jobs
linkAllModules->>VirtualStore: remove obsolete child aliases
VirtualStore-->>User: retain valid package and child links
Assessment against linked issues
Suggested labels: ✨ 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 |
Micro-Benchmark ResultsLinux |
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 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.3466906319799996,
"stddev": 0.13251949803384896,
"median": 2.28953722418,
"user": 1.3389074399999998,
"system": 1.36864282,
"min": 2.22655627818,
"max": 2.60615435418
},
{
"command": "pacquet@main",
"mean": 2.39306698078,
"stddev": 0.13429212756127112,
"median": 2.39855013968,
"user": 1.2961275399999999,
"system": 1.33223782,
"min": 2.21074800218,
"max": 2.56471567418
},
{
"command": "pnpr@HEAD",
"mean": 1.40871615568,
"stddev": 0.13352559847686868,
"median": 1.35205382018,
"user": 1.2185623399999999,
"system": 1.22504942,
"min": 1.2870229831800002,
"max": 1.6142260801800001
},
{
"command": "pnpr@main",
"mean": 1.45110565748,
"stddev": 0.12291851757232117,
"median": 1.43635048618,
"user": 1.3420851399999998,
"system": 1.34218642,
"min": 1.29444448518,
"max": 1.6421526021800001
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2203080473,
"stddev": 0.018212467141495735,
"median": 0.2156364616,
"user": 0.24493834000000003,
"system": 0.53635342,
"min": 0.1973931381,
"max": 0.2457485611
},
{
"command": "pacquet@main",
"mean": 0.21392329400000004,
"stddev": 0.008999077237282035,
"median": 0.2111347866,
"user": 0.24403194,
"system": 0.52515842,
"min": 0.20338119710000002,
"max": 0.23226449810000002
},
{
"command": "pnpr@HEAD",
"mean": 0.22827846420000003,
"stddev": 0.005974139105973,
"median": 0.22787827910000003,
"user": 0.24177594,
"system": 0.5395177199999999,
"min": 0.2190525241,
"max": 0.23887661910000002
},
{
"command": "pnpr@main",
"mean": 0.22436315590000003,
"stddev": 0.0049388385379544215,
"median": 0.22547109410000002,
"user": 0.23634413999999998,
"system": 0.51739942,
"min": 0.21741835810000001,
"max": 0.23097184610000002
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.0068332743425737336,
"stddev": 0.0005888385337134623,
"median": 0.006693589860000001,
"user": 0.004036357479892762,
"system": 0.003184445576407508,
"min": 0.0059133638600000005,
"max": 0.00956061386
},
{
"command": "pacquet@main",
"mean": 0.006433210530129874,
"stddev": 0.0004963493917897081,
"median": 0.00632631986,
"user": 0.0036968215584415585,
"system": 0.0031164701298701286,
"min": 0.005685473860000001,
"max": 0.00863584486
},
{
"command": "pnpr@HEAD",
"mean": 0.007060237266528191,
"stddev": 0.00041190956023370043,
"median": 0.007007150860000001,
"user": 0.004261556261127594,
"system": 0.003219503857566767,
"min": 0.006255607860000001,
"max": 0.008566262860000002
},
{
"command": "pnpr@main",
"mean": 0.006970025220613812,
"stddev": 0.0004419841462983166,
"median": 0.006918673860000001,
"user": 0.004554776930946291,
"system": 0.002812784654731456,
"min": 0.00606521786,
"max": 0.010386197860000002
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.006824136761576763,
"stddev": 0.0008527115364751416,
"median": 0.00664096894,
"user": 0.00404315825726141,
"system": 0.003160865809128632,
"min": 0.00590877794,
"max": 0.01319088894
},
{
"command": "pacquet@main",
"mean": 0.007455602471772576,
"stddev": 0.0009086771044759777,
"median": 0.007258783940000001,
"user": 0.004439630301003351,
"system": 0.00344270735785953,
"min": 0.0058769389400000005,
"max": 0.01187474594
},
{
"command": "pnpr@HEAD",
"mean": 0.007797026082857138,
"stddev": 0.0010864073426247141,
"median": 0.007563770940000001,
"user": 0.004764901488095233,
"system": 0.0034625485714285717,
"min": 0.005950635940000001,
"max": 0.01123649094
},
{
"command": "pnpr@main",
"mean": 0.008069291583258427,
"stddev": 0.001208971038734188,
"median": 0.00787180794,
"user": 0.004740475393258425,
"system": 0.0037670253370786526,
"min": 0.00588417194,
"max": 0.01169206394
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.58711297526,
"stddev": 0.011381665223400977,
"median": 2.5840547227600004,
"user": 2.1652380799999995,
"system": 1.8898901999999995,
"min": 2.5749881232600003,
"max": 2.6137563842600002
},
{
"command": "pacquet@main",
"mean": 2.52097766826,
"stddev": 0.09277074515623521,
"median": 2.50757861276,
"user": 2.0017145800000002,
"system": 1.7142153999999998,
"min": 2.42368125726,
"max": 2.72789111226
},
{
"command": "pnpr@HEAD",
"mean": 1.52367810846,
"stddev": 0.13594527675781373,
"median": 1.52837120376,
"user": 1.0878498799999998,
"system": 1.2134265999999998,
"min": 1.35196390826,
"max": 1.6928720812599998
},
{
"command": "pnpr@main",
"mean": 1.4976132226599999,
"stddev": 0.10326996491062922,
"median": 1.45009718176,
"user": 1.04799518,
"system": 1.2964243999999998,
"min": 1.38320903526,
"max": 1.64631212626
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.4550414890200001,
"stddev": 0.014664330947980473,
"median": 0.45052249962,
"user": 0.70351356,
"system": 1.11354216,
"min": 0.43420158462,
"max": 0.48180967962000004
},
{
"command": "pacquet@main",
"mean": 0.59641469222,
"stddev": 0.1482065975591359,
"median": 0.59450047762,
"user": 0.94890936,
"system": 1.40516386,
"min": 0.43608291762,
"max": 0.7988139216200001
},
{
"command": "pnpr@HEAD",
"mean": 0.33708680561999993,
"stddev": 0.008490931796824844,
"median": 0.33600163762,
"user": 0.31051755999999997,
"system": 0.71462566,
"min": 0.32750615462,
"max": 0.35160569462
},
{
"command": "pnpr@main",
"mean": 0.33155903452,
"stddev": 0.005750316308745224,
"median": 0.33021121162,
"user": 0.27796916,
"system": 0.7126678599999999,
"min": 0.32406507962000003,
"max": 0.34037817662000003
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.5488814886799998,
"stddev": 0.020523168145792508,
"median": 1.54489283358,
"user": 0.8305030600000001,
"system": 0.8856899999999998,
"min": 1.52549104808,
"max": 1.5937194960799999
},
{
"command": "pacquet@main",
"mean": 1.5804939458799998,
"stddev": 0.06521098109482139,
"median": 1.55238993008,
"user": 0.8846985599999998,
"system": 0.941016,
"min": 1.51126189508,
"max": 1.67295868508
},
{
"command": "pnpr@HEAD",
"mean": 0.27116138407999996,
"stddev": 0.005704621526635891,
"median": 0.26830969908,
"user": 0.21294625999999997,
"system": 0.5250239,
"min": 0.26576535208,
"max": 0.28063869708
},
{
"command": "pnpr@main",
"mean": 0.27682234048,
"stddev": 0.007022342029350326,
"median": 0.27825294258,
"user": 0.21443105999999998,
"system": 0.5367120000000001,
"min": 0.26432470708,
"max": 0.28532293108
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.19000370209428571,
"stddev": 0.010890634861578895,
"median": 0.18837825838,
"user": 0.19717813142857146,
"system": 0.06135556285714285,
"min": 0.16980374788000002,
"max": 0.20648527288000001
},
{
"command": "pacquet@main",
"mean": 0.19474354541333336,
"stddev": 0.01975380613671577,
"median": 0.19612237388,
"user": 0.18615009333333335,
"system": 0.06313135333333335,
"min": 0.16112372088000002,
"max": 0.22849441288000003
},
{
"command": "pnpr@HEAD",
"mean": 0.08877645615272726,
"stddev": 0.0020392146719663035,
"median": 0.08833963588,
"user": 0.032714347878787874,
"system": 0.011761697575757577,
"min": 0.08450380588,
"max": 0.09373500588
},
{
"command": "pnpr@main",
"mean": 0.0894132305251613,
"stddev": 0.002459379191375967,
"median": 0.08954179688000001,
"user": 0.03214362451612903,
"system": 0.014673710322580644,
"min": 0.08492101688,
"max": 0.09404813188000001
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.69787280812,
"stddev": 0.05503450208477461,
"median": 0.70026221712,
"user": 0.7278369911111111,
"system": 0.15401053999999997,
"min": 0.62061716712,
"max": 0.78841795212
},
{
"command": "pacquet@main",
"mean": 0.6954390392311111,
"stddev": 0.031029711219893317,
"median": 0.70910861212,
"user": 0.7137755466666668,
"system": 0.14001754,
"min": 0.63535955912,
"max": 0.73098818412
},
{
"command": "pnpm@HEAD",
"mean": 3.0873670953422225,
"stddev": 0.09261285600305892,
"median": 3.0755296261200002,
"user": 4.840494435555555,
"system": 0.22747998444444445,
"min": 2.96896441912,
"max": 3.20639638412
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.15939743135555556,
"stddev": 0.0029023979332126943,
"median": 0.1588295903,
"user": 0.11928911111111108,
"system": 0.07318306,
"min": 0.1556972788,
"max": 0.16598644680000002
},
{
"command": "pacquet@main",
"mean": 0.1566721858,
"stddev": 0.0028380419658330515,
"median": 0.15730364530000002,
"user": 0.11245438888888887,
"system": 0.07502533777777777,
"min": 0.1530041728,
"max": 0.1610943118
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.377112528940001,
"stddev": 0.10875391326211159,
"median": 4.33959232354,
"user": 1.39008408,
"system": 1.4599651200000001,
"min": 4.27298631904,
"max": 4.59503474304
},
{
"command": "pacquet@main",
"mean": 4.35297414984,
"stddev": 0.11910269405297386,
"median": 4.29019633454,
"user": 1.29584738,
"system": 1.4120299199999997,
"min": 4.24954786804,
"max": 4.59979874104
},
{
"command": "pnpr@HEAD",
"mean": 3.46354604804,
"stddev": 0.14001878459003123,
"median": 3.39929661854,
"user": 1.32486038,
"system": 1.46527362,
"min": 3.3531978810400003,
"max": 3.72127850204
},
{
"command": "pnpr@main",
"mean": 3.53830889264,
"stddev": 0.0852446947696712,
"median": 3.5068333475399998,
"user": 1.58123568,
"system": 1.67415122,
"min": 3.42541405404,
"max": 3.70460372204
}
]
}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.10362235544608694,
"stddev": 0.002490060856882666,
"median": 0.10354762862,
"user": 0.12732187478260867,
"system": 0.1303770417391304,
"min": 0.09970330662,
"max": 0.11137407162
},
{
"command": "pacquet@main",
"mean": 0.10465794318000002,
"stddev": 0.003947787785562885,
"median": 0.10415000562,
"user": 0.12904276,
"system": 0.12570804000000002,
"min": 0.09769027862,
"max": 0.11068070462
},
{
"command": "pnpr@HEAD",
"mean": 0.11311967207833334,
"stddev": 0.003357380800547783,
"median": 0.11371027612000001,
"user": 0.1303493983333333,
"system": 0.12839343666666667,
"min": 0.10568725162,
"max": 0.11918018662
},
{
"command": "pnpr@main",
"mean": 0.11293739927217394,
"stddev": 0.0034302373715570473,
"median": 0.11373704862,
"user": 0.13026239652173913,
"system": 0.1318700852173913,
"min": 0.10605592562,
"max": 0.11836790862
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/15096 |
| 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) |
|---|---|---|
| gvs-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 105.69 ms |
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 1,351.96 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 265.77 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 327.51 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 84.50 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,287.02 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,353.20 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 219.05 ms |
| isolated-linker.repeat-install.cold-cache.hot-store | 📈 view plot | 5.95 ms |
| isolated-linker.repeat-install.hot-cache.hot-store | 📈 view plot | 6.26 ms |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #15096 +/- ##
=======================================
Coverage 91.24% 91.24%
=======================================
Files 1343 1343
Lines 180091 180085 -6
=======================================
- Hits 164325 164320 -5
+ Misses 15766 15765 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
PR Summary by QodoPrune obsolete child links during forced installs
AI Description
Diagram
High-Level Assessment
Files changed (15)
|
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Preserve previous dependency records for child-link cleanup while keeping force-based re-import decisions explicit. Fix both v11 install paths and v12, with fresh and frozen regression coverage. Closes #15039.
Reuse dependency-name validation before cleanup to reject paths that can follow a symlink outside the slot. Move forced-install regressions into a cross-platform CLI module.
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
Addressed the review findings in 420af24:
Local validation passed: 508 restorer tests, 23 smoke tests, the cross-platform CLI regression, workspace type checking, lint, and all push hooks. CI and review are running again on the new head. Written by an agent (Codex, GPT-6). |
|
Code review by qodo was updated up to the latest commit 420af24 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Reviewed Qodo's remaining comments against head 420af24:
The security and Windows-coverage findings are fixed in 420af24, as the updated review confirms. Written by an agent (Codex, GPT-6). |
) Keep the previous install's lockfile entries available under --force in pnpm v12. Snapshot reuse and slot replacement already gate on the force flag, while child-link cleanup needs the previous dependency records. In v11, pass the current lockfile to headless child-link cleanup regardless of incremental relinking, and compute obsolete aliases for packages selected for re-import by the resolving installer. Reuse the existing dependency-diff and removal helpers, preserving full relinking during forced installs. Add matching regressions for fresh and frozen installs in both versions, including ordinary and scoped optional child links. Assert the links are absent even when their targets have been pruned, and that the package and its remaining dependency are still installed. Closes pnpm#15039.
Summary
pnpm install --forcenow removes child symlinks that a package no longer declares. This covers pnpm v11 and v12, both after fresh resolution and when installing a lockfile updated with--lockfile-only.Validation: reproduced the stale links before the fix in both versions. Passed the v11 relinking suite and forced headless-install test, 29 Rust repeat-install tests, and 1,618 tests across
pnpm-lockfile,pnpm-deps-restorer, andpnpm-package-manager. The expanded regression, 23 Rust smoke tests, workspace type checks, lint, formatting, and spelling checks also passed.Closes #15039.
Cleanup validates prior dependency aliases with the existing package-name validator before joining paths. A regression confirms malformed aliases cannot follow a dependency symlink and unlink an entry outside its slot. The Rust force-install regression runs on all platforms.
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).
Summary by CodeRabbit
pnpm install --forcenow removes obsolete dependency links when package dependencies change.