Repository navigation
fix(loaded): preserve frozen-store installs and prune unused GVS entries - #16600
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (4)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughFrozen stores now skip loaded-project registration. Project scanning also excludes local stores during pruning, with tests covering frozen installs and loaded-project pruning. ChangesFrozen store handling
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested labels: Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk remains from the supplied review. The change is mergeable after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Writable loaded installs still require registration, and frozen stores now have an explicit external retention owner. Pruning is confined to the configured store, but sharing a frozen store with a separately pruned writable store requires care. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
✨ 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16600 +/- ##
=======================================
Coverage 92.31% 92.31%
=======================================
Files 1576 1576
Lines 208719 208738 +19
=======================================
+ Hits 192678 192700 +22
+ Misses 16041 16038 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Micro-Benchmark ResultsLinux |
Same-run regression checkHEAD and main are measured on the same runner. The tolerance is 5% of the main median or 2 ms, whichever is larger. A regression requires both the median slowdown and the gap between the fastest retained HEAD sample and slowest retained main sample to exceed this tolerance, after trimming up to 10% from each tail. Suspected regressions are rerun once with target order reversed and only fail if reproduced. This conservative noise guard is not a statistical confidence interval. Inconclusive rows do not fail the check. They remain visible for performance review. Bencher retains absolute minimum timings for historical tracking; historical alerts do not gate this PR. Sequential measurements can still be affected by runner drift.
Integrated-Benchmark Report (Linux)Commit: Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm; the linked-workspace scenario compares current Rust against main Rust. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ. Bencher tracks absolute minimum latency; PR regression checks compare HEAD and main samples from the same runner. Historical timing alerts do not gate PRs. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.45272261064,
"stddev": 0.138634186243501,
"median": 2.4126770778399997,
"user": 1.57218978,
"system": 1.5280414400000002,
"min": 2.32372848034,
"max": 2.69809443334
},
{
"command": "pacquet@main",
"mean": 2.39348966254,
"stddev": 0.13280880482566593,
"median": 2.37731095884,
"user": 1.3048507799999998,
"system": 1.30805884,
"min": 2.24829654934,
"max": 2.62300369734
},
{
"command": "pnpr@HEAD",
"mean": 1.47532807644,
"stddev": 0.14543654574679235,
"median": 1.45700025834,
"user": 1.2653321799999997,
"system": 1.27930484,
"min": 1.32072660134,
"max": 1.75315790834
},
{
"command": "pnpr@main",
"mean": 1.4516889346400002,
"stddev": 0.12171486052980529,
"median": 1.4114040233399998,
"user": 1.3662585799999998,
"system": 1.36677624,
"min": 1.3001311683399999,
"max": 1.66920284634
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.24188701586,
"stddev": 0.018178284405743216,
"median": 0.23764125296,
"user": 0.26354278,
"system": 0.5655866199999999,
"min": 0.21656366696,
"max": 0.28486869096000006
},
{
"command": "pacquet@main",
"mean": 0.24644427925999998,
"stddev": 0.01231893529884063,
"median": 0.24640158246,
"user": 0.27417218,
"system": 0.5833622199999999,
"min": 0.22571884596,
"max": 0.26235796796000005
},
{
"command": "pnpr@HEAD",
"mean": 0.25800740236,
"stddev": 0.03162248521748838,
"median": 0.24753847596,
"user": 0.26875027999999995,
"system": 0.5831466199999998,
"min": 0.23793643196,
"max": 0.34542078696000006
},
{
"command": "pnpr@main",
"mean": 0.24459638245999998,
"stddev": 0.00439599885240273,
"median": 0.24452230346,
"user": 0.27778058,
"system": 0.5492185199999999,
"min": 0.23688301996,
"max": 0.25060551296000005
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.009800758969473682,
"stddev": 0.0010692577952668963,
"median": 0.009498478380000001,
"user": 0.005848833684210526,
"system": 0.004810104526315788,
"min": 0.00829326088,
"max": 0.014627708880000001
},
{
"command": "pacquet@main",
"mean": 0.010039528364429066,
"stddev": 0.001063948972536503,
"median": 0.009890860880000001,
"user": 0.006054057577854675,
"system": 0.0049603463667820084,
"min": 0.008084919880000001,
"max": 0.014292259880000002
},
{
"command": "pnpr@HEAD",
"mean": 0.009582070101757323,
"stddev": 0.0008853450003068864,
"median": 0.009424584880000001,
"user": 0.006032395983263601,
"system": 0.004442424267782426,
"min": 0.00821087788,
"max": 0.01359261588
},
{
"command": "pnpr@main",
"mean": 0.009400642339649127,
"stddev": 0.0007788678120843026,
"median": 0.009237262880000001,
"user": 0.005520430175438595,
"system": 0.004751707578947365,
"min": 0.00800299688,
"max": 0.012574294880000001
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.008785363113333331,
"stddev": 0.0009586122359635919,
"median": 0.00860931962,
"user": 0.0052202072888888895,
"system": 0.004378274044444448,
"min": 0.0068320156200000004,
"max": 0.014629757620000001
},
{
"command": "pacquet@main",
"mean": 0.008928874882135915,
"stddev": 0.0012445759048052047,
"median": 0.008610902620000001,
"user": 0.005269106407766989,
"system": 0.004495650938511326,
"min": 0.00694624062,
"max": 0.01375372362
},
{
"command": "pnpr@HEAD",
"mean": 0.009777696306192475,
"stddev": 0.0012307554343087088,
"median": 0.009643136620000001,
"user": 0.00596479933054393,
"system": 0.004676172552301254,
"min": 0.007249769620000001,
"max": 0.015749679620000002
},
{
"command": "pnpr@main",
"mean": 0.00916112986381626,
"stddev": 0.0013064874121272174,
"median": 0.008915770620000001,
"user": 0.0051606956890459365,
"system": 0.004799514204946999,
"min": 0.0070733136200000005,
"max": 0.013268962620000001
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.53654290354,
"stddev": 0.026298567791146102,
"median": 2.5349935289400003,
"user": 1.8834666799999997,
"system": 1.5742272400000001,
"min": 2.5099226934400005,
"max": 2.5958432304400003
},
{
"command": "pacquet@main",
"mean": 2.56673384504,
"stddev": 0.05473448582097064,
"median": 2.55440613994,
"user": 1.99765568,
"system": 1.6309481399999999,
"min": 2.5199375924400003,
"max": 2.71083357044
},
{
"command": "pnpr@HEAD",
"mean": 1.63391681604,
"stddev": 0.1326030521884578,
"median": 1.57159644844,
"user": 1.48384588,
"system": 1.5902462400000001,
"min": 1.51258892844,
"max": 1.81277144444
},
{
"command": "pnpr@main",
"mean": 1.5757287387399999,
"stddev": 0.12216252797116174,
"median": 1.52933367944,
"user": 1.47983898,
"system": 1.47989814,
"min": 1.46269139944,
"max": 1.79429891644
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.5846805586000001,
"stddev": 0.09558309185134924,
"median": 0.6170658573000001,
"user": 0.78538126,
"system": 0.9438129,
"min": 0.45360166830000004,
"max": 0.7041828623
},
{
"command": "pacquet@main",
"mean": 0.4886269756,
"stddev": 0.02453451887197345,
"median": 0.4845280913,
"user": 0.65980586,
"system": 0.7747233999999998,
"min": 0.4605321073,
"max": 0.5342637593
},
{
"command": "pnpr@HEAD",
"mean": 0.30613014790000004,
"stddev": 0.012793387678664872,
"median": 0.3083020553,
"user": 0.26535855999999997,
"system": 0.5832306,
"min": 0.2889643673,
"max": 0.3284536263
},
{
"command": "pnpr@main",
"mean": 0.3462078289,
"stddev": 0.03226676093848259,
"median": 0.3497150443,
"user": 0.30612816,
"system": 0.6448790999999999,
"min": 0.3010959783,
"max": 0.4018485053
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.6213600210999999,
"stddev": 0.02065196293955151,
"median": 1.6213215007,
"user": 0.86112728,
"system": 0.84802938,
"min": 1.5866761892,
"max": 1.6610661012
},
{
"command": "pacquet@main",
"mean": 1.6228296492000003,
"stddev": 0.023083611666628166,
"median": 1.6131034342000001,
"user": 0.8699263800000001,
"system": 0.7977918800000001,
"min": 1.6010469042000002,
"max": 1.6680547802
},
{
"command": "pnpr@HEAD",
"mean": 0.34662929140000004,
"stddev": 0.043462162918130216,
"median": 0.3399514912,
"user": 0.31023537999999995,
"system": 0.64328488,
"min": 0.3104224762,
"max": 0.46048447220000005
},
{
"command": "pnpr@main",
"mean": 0.3433450478,
"stddev": 0.04672218178356054,
"median": 0.3303983412,
"user": 0.30844737999999994,
"system": 0.67567718,
"min": 0.2921502852,
"max": 0.4280490242
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.24319053397666668,
"stddev": 0.013188501124466775,
"median": 0.23648735056000003,
"user": 0.21612887333333333,
"system": 0.09245880999999999,
"min": 0.22890212356000003,
"max": 0.26867900356
},
{
"command": "pacquet@main",
"mean": 0.22991282255999998,
"stddev": 0.010060472034616292,
"median": 0.22847385106,
"user": 0.21805529,
"system": 0.08328664333333333,
"min": 0.21085906656000003,
"max": 0.25022306256000004
},
{
"command": "pnpr@HEAD",
"mean": 0.09291748446000003,
"stddev": 0.0024492054450495375,
"median": 0.09230909206,
"user": 0.03321000666666666,
"system": 0.014764958,
"min": 0.08836662356,
"max": 0.10013242656
},
{
"command": "pnpr@main",
"mean": 0.11109156210838708,
"stddev": 0.014427271519713536,
"median": 0.11253341556,
"user": 0.04358745935483871,
"system": 0.02440418903225806,
"min": 0.08921719556,
"max": 0.13925479556
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.22699054260444443,
"stddev": 0.011958852614754094,
"median": 0.22594400216000002,
"user": 0.23114009111111106,
"system": 0.052837706666666664,
"min": 0.21096524816,
"max": 0.25070042516
},
{
"command": "pacquet@main",
"mean": 0.21095569449333335,
"stddev": 0.010963492970830206,
"median": 0.20957587016,
"user": 0.21256575777777778,
"system": 0.04410192888888889,
"min": 0.19917741616,
"max": 0.23670286216000003
},
{
"command": "pnpm@HEAD",
"mean": 3.8556413810488888,
"stddev": 0.12958620506631519,
"median": 3.8957755621600003,
"user": 5.954325757777777,
"system": 0.41561704,
"min": 3.6254189021600003,
"max": 4.00188230716
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.18756188542000005,
"stddev": 0.0012874791911299404,
"median": 0.18780826462,
"user": 0.1490828266666667,
"system": 0.06776356,
"min": 0.18567006262,
"max": 0.19027528362
},
{
"command": "pacquet@main",
"mean": 0.19003159515333337,
"stddev": 0.002712357229005265,
"median": 0.18909376662,
"user": 0.15417029333333332,
"system": 0.06659816,
"min": 0.18729822762,
"max": 0.19735901562
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.436089762420001,
"stddev": 0.06702454985353151,
"median": 4.414872752020001,
"user": 1.6791323599999994,
"system": 1.6244135199999998,
"min": 4.38335900352,
"max": 4.61253218852
},
{
"command": "pacquet@main",
"mean": 4.473216880819999,
"stddev": 0.09563649390416282,
"median": 4.443643592520001,
"user": 1.7102647599999998,
"system": 1.61296222,
"min": 4.38973272652,
"max": 4.65238913752
},
{
"command": "pnpr@HEAD",
"mean": 3.61610481772,
"stddev": 0.12671419766823458,
"median": 3.58506138202,
"user": 1.61205446,
"system": 1.60207342,
"min": 3.49566189252,
"max": 3.8780479185199996
},
{
"command": "pnpr@main",
"mean": 3.5828225222200003,
"stddev": 0.11878537093375202,
"median": 3.55070329052,
"user": 1.5882830599999997,
"system": 1.48639292,
"min": 3.43775052052,
"max": 3.79331898952
}
]
}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.12252861340000003,
"stddev": 0.005180671798111519,
"median": 0.12243885880000001,
"user": 0.14592087999999998,
"system": 0.12892361,
"min": 0.11567676880000001,
"max": 0.1302467898
},
{
"command": "pacquet@main",
"mean": 0.12109686245217396,
"stddev": 0.008078527177110521,
"median": 0.11975411080000001,
"user": 0.14966332782608696,
"system": 0.13193623826086956,
"min": 0.11276297180000001,
"max": 0.14153518280000002
},
{
"command": "pnpr@HEAD",
"mean": 0.1330825118526316,
"stddev": 0.004589659103500809,
"median": 0.13436770280000002,
"user": 0.15849055894736844,
"system": 0.1287692336842105,
"min": 0.1264634108,
"max": 0.14141046880000002
},
{
"command": "pnpr@main",
"mean": 0.13057507980000002,
"stddev": 0.005899678701713678,
"median": 0.1301316438,
"user": 0.15148140105263158,
"system": 0.12975675999999997,
"min": 0.1227517758,
"max": 0.1498611668
}
]
} |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
PR Summary by QodoPrevent local stores from keeping unused GVS slots alive
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Code Review by Qodo
1. Windows store paths lack regression coverage
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Reviewed Qodo's Windows-coverage suggestion against the actual CI run on Both new/extended regressions ran and passed in the Windows test job: I am keeping that cross-platform regression instead of adding a second test that changes only the spelling of the same path. The changed store-exclusion behavior is already exercised on Windows, including retaining the live root and deleting the unused transitive GVS slots. Written by an agent (Codex, GPT-6). |
Summary
Fixes two edge cases in the newly merged loaded linker (#16482).
When
storeDiris a non-hidden directory inside the project,pnpm store prunecould crawl the store itself and keep unused GVS slots alive. The project scan and dependency walker now exclude the canonical store root, while preserving roots referenced by the loaded manifest. The regression covers bothstoreandnode_modules/storeinside the project.Loaded installs with
frozenStore: truenow skip project registration writes. Writable loaded stores still require successful registration to protect their files from pruning. The loader documentation explains retention for externally managed frozen stores.Validation: 24 scoped Rust tests passed, covering store pruning and the loaded CLI. The new regressions verify that a non-hidden local store loses unused GVS trees, retains live roots, and permits frozen installation when the store registry cannot be written. The original feature's full 14,570-test Rust run passed before merge. CI passed on
1e6c9482ff816eece2d1cdc597a87e328b09589b: Rust tests on Linux, macOS, and Windows, all lints, WebContainers, and benchmark checks. All 52 completed checks passed (7 skipped). Required push hooks also passed. CodeRabbit approved this head with no actionable comments. Qodo found no bugs; its Windows-coverage suggestion is answered with passing Windows job evidence in #16600 (comment). Copilot and Greptile were unable to review because of service quota/trial limits.No changeset is needed because these fixes affect the unreleased loaded-linker feature. The separate prefetch reuse work is tracked with explicit completion criteria in pnpm/tasks#77.
Squash Commit Body
Checklist
Written by an agent (Codex, GPT-6).