Repository navigation
fix(pacquet): skip the store probe for registry-only commands - #15384
Conversation
The registry commands (`access`, `bugs`, `deprecate`, `dist-tag`, `docs`, `login`, `logout`, `owner`, `ping`, `repo`, `search`, `star`, `stars`, `team`, `undeprecate`, `unpublish`, `unstar`, `whoami`) only load their config and talk to the registry. None runs the `updateConfig` hooks, so none installs `configDependencies`, and none reads the store. Classify them as `StoreUse::Never` so their config load no longer writes the hardlink probe into the project directory. `list`, `why`, `licenses`, `outdated` and the other dependency-graph commands stay `Opens`: they read package metadata from the store. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Warning Review limit reachedNext included review available in 11 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: pnpm/pnpm/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #15384 +/- ##
==========================================
+ Coverage 91.59% 91.65% +0.05%
==========================================
Files 1402 1402
Lines 188810 188822 +12
==========================================
+ Hits 172941 173062 +121
+ Misses 15869 15760 -109 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.4900798682999996,
"stddev": 0.1669209227003631,
"median": 2.4123451612,
"user": 1.7792966199999998,
"system": 1.8613919199999998,
"min": 2.3134820762,
"max": 2.7851661412000004
},
{
"command": "pacquet@main",
"mean": 2.5242705316,
"stddev": 0.1475553410216399,
"median": 2.5342453592,
"user": 1.5810297199999996,
"system": 1.7794283199999998,
"min": 2.3449789882000003,
"max": 2.7801115362
},
{
"command": "pnpr@HEAD",
"mean": 1.525669335,
"stddev": 0.1380644141313272,
"median": 1.5228278361999998,
"user": 1.5323807200000001,
"system": 1.6254831199999997,
"min": 1.3421233341999999,
"max": 1.7614475911999998
},
{
"command": "pnpr@main",
"mean": 1.480199202,
"stddev": 0.13069989931833567,
"median": 1.4506306271999998,
"user": 1.41228902,
"system": 1.50423552,
"min": 1.3154118062,
"max": 1.6953822412000001
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
Confirmation (reversed target order)
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.41472634266,
"stddev": 0.0300945233943282,
"median": 0.40689506686,
"user": 0.44940143999999993,
"system": 0.80786012,
"min": 0.37393870836,
"max": 0.47871878236
},
{
"command": "pacquet@main",
"mean": 0.47075406206,
"stddev": 0.06082018249027096,
"median": 0.45157510686,
"user": 0.49584164,
"system": 0.82809852,
"min": 0.40254088436,
"max": 0.58746915336
},
{
"command": "pnpr@HEAD",
"mean": 0.61734966606,
"stddev": 0.054372475013596364,
"median": 0.61658352186,
"user": 0.57762894,
"system": 0.9375169199999999,
"min": 0.53072574836,
"max": 0.7129466963600001
},
{
"command": "pnpr@main",
"mean": 0.38557381246,
"stddev": 0.03481139054752105,
"median": 0.38745360386,
"user": 0.39960724,
"system": 0.73547422,
"min": 0.33114931136,
"max": 0.45039260836
}
],
"confirmation": {
"results": [
{
"command": "pnpr@main",
"mean": 0.3698654205200001,
"stddev": 0.01511056499942144,
"median": 0.36951418982000006,
"user": 0.37398161999999996,
"system": 0.6990963599999999,
"min": 0.33458107832000006,
"max": 0.38527584232000006
},
{
"command": "pnpr@HEAD",
"mean": 0.38453456642000006,
"stddev": 0.037487070438794685,
"median": 0.37967617432,
"user": 0.40080861999999995,
"system": 0.77059936,
"min": 0.34104175232000006,
"max": 0.4753856443200001
},
{
"command": "pacquet@main",
"mean": 0.39503292541999996,
"stddev": 0.03775914472921018,
"median": 0.40231144332,
"user": 0.43473251999999996,
"system": 0.84176456,
"min": 0.33528450832000006,
"max": 0.45693462032000004
},
{
"command": "pacquet@HEAD",
"mean": 0.32842011512,
"stddev": 0.010842101557936953,
"median": 0.32727984982,
"user": 0.36720551999999995,
"system": 0.7071762599999999,
"min": 0.31292020232000006,
"max": 0.34181964132000003
}
]
}
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.01362397004060151,
"stddev": 0.003331168234398882,
"median": 0.0127121118,
"user": 0.008446482406015038,
"system": 0.006053835187969924,
"min": 0.0089098968,
"max": 0.025432140800000003
},
{
"command": "pacquet@main",
"mean": 0.01129851460465116,
"stddev": 0.0017467953112599156,
"median": 0.0109571388,
"user": 0.0065816316279069705,
"system": 0.005469325209302324,
"min": 0.0080794898,
"max": 0.018335782800000002
},
{
"command": "pnpr@HEAD",
"mean": 0.010964717099539173,
"stddev": 0.0022524514454411366,
"median": 0.0105831918,
"user": 0.006373326451612903,
"system": 0.005276382672811059,
"min": 0.0074715058,
"max": 0.0200957468
},
{
"command": "pnpr@main",
"mean": 0.01017526298548387,
"stddev": 0.001854794324858835,
"median": 0.0097702678,
"user": 0.005875189354838715,
"system": 0.004976460806451614,
"min": 0.0071100538,
"max": 0.0174886488
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.01799242830666667,
"stddev": 0.0021537091088747913,
"median": 0.018011748640000002,
"user": 0.009942068817204299,
"system": 0.009254113118279568,
"min": 0.01342841264,
"max": 0.02390629664
},
{
"command": "pacquet@main",
"mean": 0.016658933481726625,
"stddev": 0.003289830487828279,
"median": 0.01656256764,
"user": 0.008851671942446045,
"system": 0.008965189496402877,
"min": 0.01090637464,
"max": 0.02414216764
},
{
"command": "pnpr@HEAD",
"mean": 0.022225780409230764,
"stddev": 0.0048564560349444565,
"median": 0.02181991264,
"user": 0.011779251923076927,
"system": 0.011398519807692305,
"min": 0.013355976640000001,
"max": 0.043816715640000004
},
{
"command": "pnpr@main",
"mean": 0.022369666686296304,
"stddev": 0.003082309133787504,
"median": 0.02193244364,
"user": 0.01313755,
"system": 0.010420614444444446,
"min": 0.01653150864,
"max": 0.03211746764
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.87073237252,
"stddev": 0.15300713747669295,
"median": 2.8414598574200003,
"user": 2.9268365199999997,
"system": 2.42675764,
"min": 2.69531356892,
"max": 3.13733520292
},
{
"command": "pacquet@main",
"mean": 2.54323759752,
"stddev": 0.056638407627190315,
"median": 2.51780206842,
"user": 2.05047602,
"system": 1.7304754399999998,
"min": 2.49444160592,
"max": 2.66147875492
},
{
"command": "pnpr@HEAD",
"mean": 1.52615013392,
"stddev": 0.14191508753374357,
"median": 1.4917581044200001,
"user": 1.12956062,
"system": 1.3403248399999999,
"min": 1.36772349692,
"max": 1.74575637492
},
{
"command": "pnpr@main",
"mean": 1.4576163254200003,
"stddev": 0.057379188779343386,
"median": 1.4561698489200001,
"user": 1.09321622,
"system": 1.2733620399999999,
"min": 1.3959887959200001,
"max": 1.5803019489200003
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.79590214416,
"stddev": 0.0897678574234761,
"median": 0.79887844086,
"user": 1.2056335999999999,
"system": 1.2346782199999997,
"min": 0.69444756886,
"max": 0.9354298368600001
},
{
"command": "pacquet@main",
"mean": 0.82636548526,
"stddev": 0.05249088282882914,
"median": 0.8274747558600001,
"user": 1.2007402999999999,
"system": 1.30688582,
"min": 0.73064264186,
"max": 0.8915938928600001
},
{
"command": "pnpr@HEAD",
"mean": 0.46667186806000005,
"stddev": 0.028942313564819612,
"median": 0.46753229786,
"user": 0.4284061,
"system": 0.75442462,
"min": 0.42627020786,
"max": 0.5073021318600001
},
{
"command": "pnpr@main",
"mean": 0.51973328636,
"stddev": 0.028169010390269866,
"median": 0.5211423073600001,
"user": 0.4620969,
"system": 0.81566312,
"min": 0.47835638486000004,
"max": 0.5739870528600001
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.1943942192,
"stddev": 0.13037065307118426,
"median": 2.1947041251,
"user": 1.7996623799999998,
"system": 1.51400892,
"min": 2.0063317301,
"max": 2.5098761170999997
},
{
"command": "pacquet@main",
"mean": 2.4283734420000003,
"stddev": 0.17579185624176435,
"median": 2.3730087425999997,
"user": 2.02897618,
"system": 1.7006656199999999,
"min": 2.2486766381,
"max": 2.7663488391
},
{
"command": "pnpr@HEAD",
"mean": 0.5709545033,
"stddev": 0.043929992591219415,
"median": 0.5620598231,
"user": 0.49706828,
"system": 0.8392793199999999,
"min": 0.4910024731,
"max": 0.6365185021
},
{
"command": "pnpr@main",
"mean": 0.5731102980000001,
"stddev": 0.05722095907705254,
"median": 0.5625915311,
"user": 0.4884540799999999,
"system": 0.84328502,
"min": 0.5058831111000001,
"max": 0.6589277061000001
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.21445066717714287,
"stddev": 0.011131124411502435,
"median": 0.21137065482,
"user": 0.21939039999999996,
"system": 0.08076213714285711,
"min": 0.20025532132,
"max": 0.24186551332000003
},
{
"command": "pacquet@main",
"mean": 0.24321864532000004,
"stddev": 0.022112378076063637,
"median": 0.24230116582000003,
"user": 0.2577735428571429,
"system": 0.0823659942857143,
"min": 0.20747106232000004,
"max": 0.29808710332000005
},
{
"command": "pnpr@HEAD",
"mean": 0.09796124117714286,
"stddev": 0.007200005459993532,
"median": 0.09696588482,
"user": 0.03577982857142857,
"system": 0.019504351428571425,
"min": 0.08886050032000001,
"max": 0.12396743732000001
},
{
"command": "pnpr@main",
"mean": 0.09938457835846151,
"stddev": 0.005093677828002022,
"median": 0.09892999832000002,
"user": 0.04116755384615385,
"system": 0.015517269230769227,
"min": 0.09092866532,
"max": 0.11146042732
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.770621902171111,
"stddev": 0.09550020909513549,
"median": 0.81229927406,
"user": 0.783020011111111,
"system": 0.20857915111111114,
"min": 0.61243260006,
"max": 0.8609216780600001
},
{
"command": "pacquet@main",
"mean": 0.7351126619488889,
"stddev": 0.06378512852110262,
"median": 0.7269848010600001,
"user": 0.7659905666666667,
"system": 0.16617715111111112,
"min": 0.63587192506,
"max": 0.8557969040600001
},
{
"command": "pnpm@HEAD",
"mean": 4.166155089615555,
"stddev": 0.7342800840617117,
"median": 4.04490602206,
"user": 6.552490011111111,
"system": 0.32720559555555556,
"min": 3.36472199606,
"max": 5.35182600506
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.22501346834857142,
"stddev": 0.028596479426202793,
"median": 0.22761404692000003,
"user": 0.17354041428571426,
"system": 0.10628826,
"min": 0.18734755242,
"max": 0.27349466742
},
{
"command": "pacquet@main",
"mean": 0.2173597777276923,
"stddev": 0.010540648162179986,
"median": 0.21485466442000004,
"user": 0.1536899307692308,
"system": 0.10372345230769228,
"min": 0.20075053442000002,
"max": 0.23605725242000003
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.66095441002,
"stddev": 0.15985194874933323,
"median": 4.67329385332,
"user": 2.1194091,
"system": 2.02727332,
"min": 4.44128734932,
"max": 4.93345612432
},
{
"command": "pacquet@main",
"mean": 4.712461749219999,
"stddev": 0.1841926946618504,
"median": 4.75143404582,
"user": 1.9166916999999999,
"system": 1.8735415199999998,
"min": 4.461274288319999,
"max": 4.94080408532
},
{
"command": "pnpr@HEAD",
"mean": 3.591405199620001,
"stddev": 0.1222261788837597,
"median": 3.6103942188200002,
"user": 1.6337773999999996,
"system": 1.63227342,
"min": 3.4147380913200003,
"max": 3.7649353703200004
},
{
"command": "pnpr@main",
"mean": 3.4846150830200004,
"stddev": 0.11483505702422127,
"median": 3.4353768133200004,
"user": 1.5951805999999997,
"system": 1.6119489200000001,
"min": 3.3971237533200003,
"max": 3.7634912643200003
}
]
}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.1881628728533333,
"stddev": 0.015275617885093074,
"median": 0.18293497732,
"user": 0.22580918666666666,
"system": 0.20901250666666668,
"min": 0.16540408232,
"max": 0.22060224032
},
{
"command": "pacquet@main",
"mean": 0.17940460311999998,
"stddev": 0.012942406450566274,
"median": 0.17896671232,
"user": 0.21273478666666665,
"system": 0.20867750666666668,
"min": 0.15842893732000002,
"max": 0.20955287432
},
{
"command": "pnpr@HEAD",
"mean": 0.21396068139142854,
"stddev": 0.022249175428657137,
"median": 0.20848125132,
"user": 0.2494985342857143,
"system": 0.21414552571428574,
"min": 0.18627415632000002,
"max": 0.24908961032000002
},
{
"command": "pnpr@main",
"mean": 0.20649963785846154,
"stddev": 0.013938937155696147,
"median": 0.20386266732000002,
"user": 0.23100885846153843,
"system": 0.2176323169230769,
"min": 0.18215153332,
"max": 0.23229877932
}
]
} |
PR Summary by QodoSkip store probing for registry-only pacquet commands
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
|
Code Review by Qodo
1. Windows probe regressions lack coverage
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Each of the 18 commands is its own match alternative, so each needs a case that fails when it probes again. All 12 added commands fail fast against the 404 registry, before any interactive prompt or browser. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Replying to the Qodo finding "New registry cases bypass shared setup". I'm not acting on it, for the same reason as on #15373 (#15373 (comment)). These cases only need each command to load its config and then fail. A mockito server that answers 404 does that in about 100 ms per command, and Written by an agent (Claude Code, claude-opus-5-5). |
|
@coderabbitai review |
|
|
Code review by qodo was updated up to the latest commit 86406d5 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Replying to the Qodo finding "Windows probe regressions lack coverage". I'm not acting on it, for the same reason as on #15373 (#15373 (comment)). The test's pnpm-home check isn't Unix-specific. The test sets Written by an agent (Claude Code, claude-opus-5-5). |
…5384) The registry commands (`access`, `bugs`, `deprecate`, `dist-tag`, `docs`, `login`, `logout`, `owner`, `ping`, `repo`, `search`, `star`, `stars`, `team`, `undeprecate`, `unpublish`, `unstar`, `whoami`) only load their config and talk to the registry. None runs the `updateConfig` hooks, so none installs `configDependencies`, and none reads the store. Classify them as `StoreUse::Never` so their config load no longer writes the hardlink probe into the project directory. `list`, `why`, `licenses`, `outdated` and the other dependency-graph commands stay `Opens`: they read package metadata from the store.
Summary
Follow-up to #15373. That PR stopped
view,config,root,prefix,bin,exec,run, and the script shortcuts from writing the hardlink probe (_tmp_<pid>_<hex>) into the project directory when they load their config. Every other command kept the defaultStoreUse::Opens.This PR adds the registry-only commands to
StoreUse::Never:access,bugs,deprecate,dist-tag,docs,login,logout,owner,ping,repo,search,star,stars,team,undeprecate,unpublish,unstar,whoami. I checked each handler. It only loads its config and passes it to the registry client. None runs theupdateConfighooks, so none installsconfigDependencies. No code on their paths readsstore_dirorglobal_virtual_store_dir, including theauth-commands,registry, andnetwork-web-authcrates.list,why,licenses,outdated, and the other dependency-graph commands stayOpens, because they read package metadata from the store.The pending changeset from #15373 is widened to cover these commands instead of adding a second entry.
Squash Commit Body
Checklist
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.
Tests:
store_placement::commands_without_store_access_do_not_modify_the_project_directorynow runs all 18 registry commands against a registry that answers 404. With the new match arm disabled, each of them creates the pnpm home (checked one by one), and the test fails at the first one,ping.Written by an agent (Claude Code, claude-opus-5-5).
🤖 Generated with Claude Code