Repository navigation
Conversation
An install that misses the repeat-install fast path, such as one under `recursiveInstall: false` or with a `file:` dependency, re-imported the side-effects overlay into every project-local slot of a patched or built package and reran builds whose cache had nothing to restore. Only the global virtual store checked whether a slot already carried the overlay. The isolated linker now scopes the build phase the way the hoisted linker does: the snapshots this install materialized, plus those the previous install recorded as unbuilt in `.modules.yaml`. A rebuild or an `allowBuilds` change still considers every candidate. pnpm v11 already builds only new nodes on this path, so it is not affected. Closes #16705 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe isolated linker now supplies an optional build scope to build processing. Build candidates and deferred-build reporting use that scope. A CLI test checks repeat installs with build-script dependencies and a patched dependency. ChangesRepeat-install build scope
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Assessment against linked issues
Suggested labels: Merge Risk: ⚪ Minimal · up to No actionable issue is identified in this change; it is ready for normal merge checks. ✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #16709 +/- ##
=======================================
Coverage 92.42% 92.43%
=======================================
Files 1594 1595 +1
Lines 210285 210337 +52
=======================================
+ Hits 194362 194415 +53
+ Misses 15923 15922 -1 ☔ 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.5015406384000003,
"stddev": 0.16855421304210907,
"median": 2.4850320663,
"user": 1.69959676,
"system": 1.61118198,
"min": 2.3301689673,
"max": 2.7597029833
},
{
"command": "pacquet@main",
"mean": 2.5011336278000003,
"stddev": 0.131461260837487,
"median": 2.4778671463,
"user": 1.7020340600000001,
"system": 1.6740167799999999,
"min": 2.3183936923,
"max": 2.7083346773
},
{
"command": "pnpr@HEAD",
"mean": 1.5716976370999998,
"stddev": 0.1294031621773458,
"median": 1.5595625757999998,
"user": 2.0384983599999993,
"system": 1.95898758,
"min": 1.4275929103,
"max": 1.8053649482999998
},
{
"command": "pnpr@main",
"mean": 1.6429542753,
"stddev": 0.11031825268040543,
"median": 1.6590876548,
"user": 2.2807248600000003,
"system": 2.16404288,
"min": 1.4405170223,
"max": 1.7809449822999999
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.3598550351400001,
"stddev": 0.05786678648222961,
"median": 0.35092510474000005,
"user": 0.3991453399999999,
"system": 0.73458502,
"min": 0.29035786674,
"max": 0.46654597974000006
},
{
"command": "pacquet@main",
"mean": 0.42685427114,
"stddev": 0.09492794192956437,
"median": 0.41642310674000005,
"user": 0.46719974,
"system": 0.84114322,
"min": 0.29208699774,
"max": 0.57789942174
},
{
"command": "pnpr@HEAD",
"mean": 0.42769130494000007,
"stddev": 0.08625398550090647,
"median": 0.39754866274000006,
"user": 0.48004923999999993,
"system": 0.81221622,
"min": 0.32009978174000003,
"max": 0.57616202574
},
{
"command": "pnpr@main",
"mean": 0.5628466984399999,
"stddev": 0.13696605380944848,
"median": 0.5809338912399999,
"user": 0.52960904,
"system": 0.9145534200000001,
"min": 0.36123012474000005,
"max": 0.74783555274
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.011764232190526316,
"stddev": 0.0010527803837565232,
"median": 0.01163914318,
"user": 0.006959695087719296,
"system": 0.005901051228070176,
"min": 0.00938066718,
"max": 0.016740479180000004
},
{
"command": "pacquet@main",
"mean": 0.013494676707659565,
"stddev": 0.0024002980633834035,
"median": 0.012881534180000001,
"user": 0.007440591914893609,
"system": 0.007271428085106387,
"min": 0.01030758218,
"max": 0.02338905418
},
{
"command": "pnpr@HEAD",
"mean": 0.012183905453170728,
"stddev": 0.001753898903986169,
"median": 0.01170218118,
"user": 0.006856138048780488,
"system": 0.006416613170731707,
"min": 0.009519962180000001,
"max": 0.017205940180000004
},
{
"command": "pnpr@main",
"mean": 0.014357636607807485,
"stddev": 0.0022299283474404466,
"median": 0.01394752118,
"user": 0.008070278181818182,
"system": 0.00763523315508021,
"min": 0.01098299018,
"max": 0.02098427318
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.02300953150811594,
"stddev": 0.002962200993933214,
"median": 0.02235661574,
"user": 0.012614991884057968,
"system": 0.012209837681159423,
"min": 0.01843583674,
"max": 0.03439500874
},
{
"command": "pacquet@main",
"mean": 0.024520599447964614,
"stddev": 0.005016770302494737,
"median": 0.02337457374,
"user": 0.013072547610619465,
"system": 0.012872841592920355,
"min": 0.01707594574,
"max": 0.045627835740000004
},
{
"command": "pnpr@HEAD",
"mean": 0.023966001911717175,
"stddev": 0.003976517330986794,
"median": 0.02356485674,
"user": 0.013619709494949492,
"system": 0.012093967676767669,
"min": 0.01776472174,
"max": 0.04813826074000001
},
{
"command": "pnpr@main",
"mean": 0.020370076640000002,
"stddev": 0.0029460082899888653,
"median": 0.020446053239999998,
"user": 0.01166910545454546,
"system": 0.010831599090909087,
"min": 0.014178863740000002,
"max": 0.02883581974
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 3.19717203776,
"stddev": 0.1933428673431412,
"median": 3.15574440636,
"user": 3.59845158,
"system": 2.65723276,
"min": 2.93389182736,
"max": 3.52186108736
},
{
"command": "pacquet@main",
"mean": 3.1986446894600005,
"stddev": 0.19382774051672105,
"median": 3.1458662343599997,
"user": 3.5828093799999996,
"system": 2.5867079599999996,
"min": 2.99500295336,
"max": 3.51412824236
},
{
"command": "pnpr@HEAD",
"mean": 1.8533580009600001,
"stddev": 0.09903387839025421,
"median": 1.83279780886,
"user": 2.10498488,
"system": 2.2278289599999996,
"min": 1.66979105636,
"max": 1.9999553243600001
},
{
"command": "pnpr@main",
"mean": 1.82174302656,
"stddev": 0.11380008508823018,
"median": 1.82834377386,
"user": 1.9535344799999996,
"system": 2.01555606,
"min": 1.63952648036,
"max": 2.03173906936
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
Confirmation (reversed target order)
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.5938566875400001,
"stddev": 0.0405484355275822,
"median": 0.58846058274,
"user": 0.8591932999999999,
"system": 0.9108661599999998,
"min": 0.52692817774,
"max": 0.6598951777400001
},
{
"command": "pacquet@main",
"mean": 0.4760200427400001,
"stddev": 0.025781971596722308,
"median": 0.47173334774000003,
"user": 0.6624629000000001,
"system": 0.73973526,
"min": 0.44137612674000004,
"max": 0.5188013517400001
},
{
"command": "pnpr@HEAD",
"mean": 0.33881243634,
"stddev": 0.06514001410169612,
"median": 0.31820425224000004,
"user": 0.3049231,
"system": 0.64125546,
"min": 0.29130151074,
"max": 0.51014813674
},
{
"command": "pnpr@main",
"mean": 0.35160190983999995,
"stddev": 0.05438953742796617,
"median": 0.33731071124,
"user": 0.33072359999999995,
"system": 0.6594797599999997,
"min": 0.30963052974,
"max": 0.49807955574
}
],
"confirmation": {
"results": [
{
"command": "pnpr@main",
"mean": 0.3177089073,
"stddev": 0.013171026593599323,
"median": 0.315867106,
"user": 0.28836642,
"system": 0.6081794999999999,
"min": 0.30049893050000004,
"max": 0.3400576765
},
{
"command": "pnpr@HEAD",
"mean": 0.3796768797000001,
"stddev": 0.05985875847444762,
"median": 0.355911482,
"user": 0.34971142000000005,
"system": 0.6700622999999999,
"min": 0.32028831250000006,
"max": 0.48305580950000004
},
{
"command": "pacquet@main",
"mean": 0.5934241369000001,
"stddev": 0.06546398896053818,
"median": 0.616703615,
"user": 0.83511212,
"system": 0.8893226999999999,
"min": 0.48697610850000006,
"max": 0.6695223055
},
{
"command": "pacquet@HEAD",
"mean": 0.5135046382999999,
"stddev": 0.05008256284954319,
"median": 0.5093928315,
"user": 0.7081289199999998,
"system": 0.8099470999999999,
"min": 0.44820823150000005,
"max": 0.6153583925
}
]
}
}Scenario: Isolated linker: fresh install, cold cache + hot store
Confirmation (reversed target order)
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.8483678728600001,
"stddev": 0.07778297989997301,
"median": 1.84627403056,
"user": 1.3722730799999998,
"system": 1.11192856,
"min": 1.71895061806,
"max": 1.93844396206
},
{
"command": "pacquet@main",
"mean": 2.0032327832600005,
"stddev": 0.10461758438333639,
"median": 1.98526478656,
"user": 1.6506538800000001,
"system": 1.21587386,
"min": 1.84903155506,
"max": 2.2214128890600002
},
{
"command": "pnpr@HEAD",
"mean": 0.5179686048600001,
"stddev": 0.08693266604217227,
"median": 0.48526899006,
"user": 0.48618958,
"system": 0.83197156,
"min": 0.42913014006000005,
"max": 0.66212410406
},
{
"command": "pnpr@main",
"mean": 0.37493122256000005,
"stddev": 0.025449047731528184,
"median": 0.37572409306000004,
"user": 0.36432907999999997,
"system": 0.6908903599999999,
"min": 0.33013906206,
"max": 0.42673156206000007
}
],
"confirmation": {
"results": [
{
"command": "pnpr@main",
"mean": 0.37135890044000003,
"stddev": 0.04185351148745463,
"median": 0.36781173864000005,
"user": 0.32571958,
"system": 0.7284728600000001,
"min": 0.31356896864,
"max": 0.43388380864000003
},
{
"command": "pnpr@HEAD",
"mean": 0.39590455724,
"stddev": 0.02703701788332459,
"median": 0.39963409514000003,
"user": 0.38641418000000005,
"system": 0.7182184599999999,
"min": 0.35504695864,
"max": 0.43997443864
},
{
"command": "pacquet@main",
"mean": 2.1285086570400003,
"stddev": 0.10190826081704453,
"median": 2.1654125556399997,
"user": 1.8609867799999997,
"system": 1.3727773599999995,
"min": 1.9264539786400001,
"max": 2.24556359964
},
{
"command": "pacquet@HEAD",
"mean": 1.9035733439399998,
"stddev": 0.07896780746245785,
"median": 1.88283685664,
"user": 1.42856358,
"system": 1.1394820599999997,
"min": 1.79735569564,
"max": 2.04254632664
}
]
}
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.5159807141400001,
"stddev": 0.04045837806149392,
"median": 0.52174769594,
"user": 0.5209883800000001,
"system": 0.22475501999999997,
"min": 0.4458388689400001,
"max": 0.58087658494
},
{
"command": "pacquet@main",
"mean": 0.49103429764000006,
"stddev": 0.04184811483534439,
"median": 0.49062767494000004,
"user": 0.5182493800000001,
"system": 0.19692332,
"min": 0.43507304894000004,
"max": 0.54076183194
},
{
"command": "pnpr@HEAD",
"mean": 0.16568745949555555,
"stddev": 0.014028756417514558,
"median": 0.16618900894000002,
"user": 0.09514431333333334,
"system": 0.02905469777777778,
"min": 0.13456747794,
"max": 0.19965026794000001
},
{
"command": "pnpr@main",
"mean": 0.17188707444,
"stddev": 0.013225471006412389,
"median": 0.17579136394,
"user": 0.09325469428571428,
"system": 0.03558477714285715,
"min": 0.14179569594000002,
"max": 0.19473212494
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.3564383463644445,
"stddev": 0.03074336142055889,
"median": 0.36026098592000005,
"user": 0.3813700688888889,
"system": 0.0896194288888889,
"min": 0.30837012192,
"max": 0.39303693492
},
{
"command": "pacquet@main",
"mean": 0.4053301591422223,
"stddev": 0.029935381674123716,
"median": 0.39418023092000004,
"user": 0.4356222911111111,
"system": 0.09456842888888889,
"min": 0.37056713892000004,
"max": 0.45129527492000004
},
{
"command": "pnpm@HEAD",
"mean": 5.493634581475555,
"stddev": 0.4202778177516442,
"median": 5.4038406629199995,
"user": 8.666262402222221,
"system": 0.5423422066666667,
"min": 4.87890347092,
"max": 6.222893216919999
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2486217448666667,
"stddev": 0.034738573084414213,
"median": 0.23581362970000003,
"user": 0.20079894333333334,
"system": 0.09477960333333331,
"min": 0.21861997970000002,
"max": 0.3188588687
},
{
"command": "pacquet@main",
"mean": 0.22459828903333343,
"stddev": 0.011985477821720398,
"median": 0.22608392520000004,
"user": 0.18052786,
"system": 0.08682151999999999,
"min": 0.2048712457,
"max": 0.23751058270000003
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.75195346296,
"stddev": 0.1242164490574405,
"median": 4.73041476036,
"user": 2.37722354,
"system": 2.0839902199999996,
"min": 4.54338070186,
"max": 4.9725919998600006
},
{
"command": "pacquet@main",
"mean": 5.11891835496,
"stddev": 0.45643663573557125,
"median": 5.02535026436,
"user": 2.4444955399999997,
"system": 2.29309492,
"min": 4.582538389860001,
"max": 5.949511490860001
},
{
"command": "pnpr@HEAD",
"mean": 4.17232369716,
"stddev": 0.2441212663485734,
"median": 4.1182434503600005,
"user": 2.60338134,
"system": 2.31574962,
"min": 3.90660470886,
"max": 4.77836546386
},
{
"command": "pnpr@main",
"mean": 4.4038043367599995,
"stddev": 0.2641676804988937,
"median": 4.409661444360001,
"user": 2.7925546399999996,
"system": 2.5896971199999994,
"min": 3.97079433186,
"max": 4.81980889386
}
]
}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.22703984438,
"stddev": 0.04028327909979148,
"median": 0.21642979338,
"user": 0.27494481714285707,
"system": 0.19355002,
"min": 0.17739145038,
"max": 0.32757555738
},
{
"command": "pacquet@main",
"mean": 0.2062107410723077,
"stddev": 0.015434668670017202,
"median": 0.20039157238000002,
"user": 0.25903038307692305,
"system": 0.17043867384615383,
"min": 0.18622267938000003,
"max": 0.22948381838
},
{
"command": "pnpr@HEAD",
"mean": 0.24343369338,
"stddev": 0.03757849931323958,
"median": 0.23904704788000003,
"user": 0.29312337666666666,
"system": 0.16892177,
"min": 0.20681089338000003,
"max": 0.33099722838
},
{
"command": "pnpr@main",
"mean": 0.22328793478000003,
"stddev": 0.03868540572896989,
"median": 0.21532357288000004,
"user": 0.24376875999999997,
"system": 0.19108321999999997,
"min": 0.17878354538000002,
"max": 0.31223972438
}
]
} |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
PR Summary by QodoPreserve built and patched slots on repeat installs
AI Description
Diagram
High-Level Assessment
Files changed (22)
|
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Replies to the Qodo review of c70e4c7:
Written by an agent (Claude Code, claude-opus-5-5). |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Code review by qodo was updated up to the latest commit 5884647 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Summary
Closes #16705.
A repeat
pnpm installthat misses the repeat-install fast path (for example underrecursiveInstall: false, or with a rootfile:dependency) re-imported every patched package and every package with a build script into its project-local virtual-store slot, and reran builds whose side-effects cache had nothing to restore. The snapshot plan correctly left those slots alone, butBuildModulesstill walked every build/patch candidate reachable from the importers. A side-effects cache hit then re-imported the overlay, because only the global virtual store checks whether a slot already carries it.The isolated linker now scopes the build phase like the hoisted linker already does. It considers only the snapshots this install materialized, plus those the previous install's
.modules.yamlrecorded as unbuilt (pendingBuilds/ignoredBuilds), so a previous--ignore-scriptsinstall still gets built. A rebuild or anallowBuildschange still considers every candidate. The global virtual store and the hoisted linker keep their existing handling.pnpm v11 is not affected: it builds only new nodes on this path (
depsToBuild: newDepPaths), so this is a v12-only fix.Squash Commit Body
Checklist
already linked to it solves it.
are implemented in every affected version.
pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
The new e2e test
repeat_install_keeps_the_built_and_patched_slots_it_leaves_in_placefails without the fix (the postinstall runs again on the repeat install). Locally:pnpm-deps-restorer,pnpm-package-manager, and the fullpnpm-clisuite pass.🤖 Generated with Claude Code
Written by an agent (Claude Code, claude-opus-5-5).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit