Repository navigation
Conversation
PR Summary by QodoFix
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe installer now forwards workspace catalogs to the pnpr server. The client and server protocols accept catalog data, the resolver applies it when processing dependencies and overrides, and tests cover catalog-based resolution. PNPR importer IDs also use lockfile-compatible path normalization. ChangesPNPR catalog resolution
Estimated code review effort: 3 (Moderate) | ~25 minutes Assessment against linked issues
Out-of-scope changes
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. 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 |
Confidence Score: 5/5The PR appears safe to merge. No blocking failures remain. Reviews (3): Last reviewed commit: "docs: note the Windows nested-member fix..." | Re-trigger Greptile |
Code Review by Qodo
Context used✅ Compliance rules (platform):
26 rules 1. Frozen path skips catalogs
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
A `catalog:` specifier in a workspace's dependencies or overrides failed to resolve when the install was routed through a pnpr server, erroring with "No catalog entry '<name>' was found for catalog 'default'." even though the catalog entry existed. The pnpr server reconstructs the requested workspace in a temp dir from the resolve request. That reconstruction wrote a `pnpm-workspace.yaml` with only a `packages:` section and no catalog definitions, and passed `catalogs_override: None` to the install — so the server had no catalogs and could not resolve any `catalog:` specifier, in dependencies or overrides. Forward the client's workspace catalogs in the resolve request and use them as the install's `catalogs_override`, which feeds both dependency and override catalog resolution. The client now sends its raw overrides (the server resolves their `catalog:` references) instead of pre-resolving them locally. Closes #13232 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Keeps the tsconfig `references` in sync with the new `@pnpm/catalogs.types` dependency so the meta-updater check passes. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Heads up: I reworked this PR after a review question ("isn't the right fix just to send the catalogs to pnpr?"). That's the better fix, so the approach changed substantially:
The reason the change grew: the earlier client-side fix left It's now a parity change across the TS client/installer and the Rust pnpr server ( Written by an agent (Claude Code, claude-opus-4-8). |
Micro-Benchmark ResultsLinux |
|
Code review by qodo was updated up to the latest commit 6adeb50 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13233 +/- ##
=======================================
Coverage 86.92% 86.92%
=======================================
Files 528 528
Lines 90457 90467 +10
=======================================
+ Hits 78630 78642 +12
+ Misses 11827 11825 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Found 1 test failure on Blacksmith runners: Failure
|
The pnpr install path built each project's headless-install importer id with a raw `path.relative(lockfileDir, rootDir)`. On Windows a nested workspace member (`packages/foo`) yields `packages\foo`, which does not match the POSIX importer keys (`packages/foo`) the pnpr server emits in the lockfile — so the headless install crashed with "Cannot read properties of undefined (reading 'dependencies')". Root-level members never showed it because they have no path separator. Use `getLockfileImporterId`, which normalizes separators the same way the resolve request's project dirs already are. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Code review by qodo was updated up to the latest commit ff69926 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
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.5482645084400004,
"stddev": 0.16231377344328193,
"median": 2.46580055944,
"user": 1.81858362,
"system": 1.4432871999999999,
"min": 2.3850000979400003,
"max": 2.8123449709400004,
"times": [
2.8123449709400004,
2.73451483494,
2.66537290694,
2.4208841439400004,
2.50655437194,
2.42504674694,
2.7024017809400003,
2.41907799794,
2.3850000979400003,
2.4114472319400004
]
},
{
"command": "pacquet@main",
"mean": 2.4858831608400003,
"stddev": 0.15515264774471668,
"median": 2.41872927694,
"user": 1.70295812,
"system": 1.3337124999999999,
"min": 2.34816122394,
"max": 2.8079169269400004,
"times": [
2.3887520569400005,
2.71785003594,
2.4709972709400003,
2.42913817394,
2.5166050219400002,
2.37559171894,
2.34816122394,
2.8079169269400004,
2.40832037994,
2.3954987989400003
]
},
{
"command": "pnpr@HEAD",
"mean": 1.5275012675400002,
"stddev": 0.17843116421112012,
"median": 1.4268604259400002,
"user": 1.1300485200000001,
"system": 1.1636865999999997,
"min": 1.35607289694,
"max": 1.78522669694,
"times": [
1.38954042894,
1.35607289694,
1.78522669694,
1.37491234794,
1.6938464479400002,
1.68861913294,
1.4538806289400001,
1.75364369094,
1.39984022294,
1.37943018094
]
},
{
"command": "pnpr@main",
"mean": 1.51148561804,
"stddev": 0.15385745071764056,
"median": 1.43218475744,
"user": 1.15698852,
"system": 1.2510362,
"min": 1.36915515994,
"max": 1.73692240194,
"times": [
1.3843587609399999,
1.38155274194,
1.5846201069399999,
1.73692240194,
1.4690188849399999,
1.36915515994,
1.72625550494,
1.39535062994,
1.67727384994,
1.39034813894
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2630544972,
"stddev": 0.011625040134223615,
"median": 0.2642847849,
"user": 0.21660917999999998,
"system": 0.5237677799999999,
"min": 0.2460321234,
"max": 0.2802864934,
"times": [
0.2646919354,
0.2623290314,
0.2791590634,
0.2652209414,
0.2471045704,
0.2460321234,
0.2679264724,
0.2539167064,
0.2638776344,
0.2802864934
]
},
{
"command": "pacquet@main",
"mean": 0.2604502239,
"stddev": 0.0067215342833385275,
"median": 0.2603624619,
"user": 0.21225298,
"system": 0.5498394799999999,
"min": 0.2522857974,
"max": 0.2746680134,
"times": [
0.2620645634,
0.2746680134,
0.2593048224,
0.2583311404,
0.2614201014,
0.2540004334,
0.2663695834,
0.26250629540000003,
0.2535514884,
0.2522857974
]
},
{
"command": "pnpr@HEAD",
"mean": 0.2872251646,
"stddev": 0.01686933173523829,
"median": 0.27961148339999997,
"user": 0.24856968000000004,
"system": 0.53165938,
"min": 0.2730833734,
"max": 0.3252841134,
"times": [
0.3252841134,
0.3066665604,
0.2892185064,
0.2803256374,
0.2779572414,
0.2912981794,
0.2788973294,
0.2742261224,
0.2730833734,
0.2752945824
]
},
{
"command": "pnpr@main",
"mean": 0.28029284790000003,
"stddev": 0.009652793376484637,
"median": 0.2797223724,
"user": 0.22599418,
"system": 0.5252009799999999,
"min": 0.2661614304,
"max": 0.2982644524,
"times": [
0.2763071164,
0.2821996624,
0.2797836574,
0.2676361744,
0.2661614304,
0.29029637340000003,
0.2982644524,
0.2772224694,
0.2853960554,
0.2796610874
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.80030193136,
"stddev": 0.03200112486098057,
"median": 2.80066243826,
"user": 1.8501271799999994,
"system": 1.35696796,
"min": 2.74425027626,
"max": 2.86991717226,
"times": [
2.74425027626,
2.80149516526,
2.78907953826,
2.81040174126,
2.86991717226,
2.80179515926,
2.81867430226,
2.79982971126,
2.77624499326,
2.79133125426
]
},
{
"command": "pacquet@main",
"mean": 2.7922678797600007,
"stddev": 0.026184092994733177,
"median": 2.79388963226,
"user": 1.8295917800000001,
"system": 1.3130062599999999,
"min": 2.72975992926,
"max": 2.8261569582600004,
"times": [
2.79242393926,
2.80065025526,
2.82119019626,
2.77897347626,
2.79646977026,
2.79535532526,
2.72975992926,
2.8261569582600004,
2.79089913226,
2.79079981526
]
},
{
"command": "pnpr@HEAD",
"mean": 1.6811163756600003,
"stddev": 0.14139510324928256,
"median": 1.67876504726,
"user": 1.16616388,
"system": 1.29536766,
"min": 1.4656216072600001,
"max": 1.85848072426,
"times": [
1.62520736326,
1.4656216072600001,
1.76578923626,
1.50915933426,
1.85848072426,
1.59754914226,
1.81813730526,
1.8436527762600001,
1.59524353626,
1.73232273126
]
},
{
"command": "pnpr@main",
"mean": 1.7676459678600005,
"stddev": 0.15362180143730295,
"median": 1.83903636876,
"user": 1.21646718,
"system": 1.2994517599999997,
"min": 1.5187721542600001,
"max": 1.9095130282600001,
"times": [
1.87867998726,
1.84753019926,
1.8722032852600001,
1.83054253826,
1.8774576282600002,
1.9095130282600001,
1.5187721542600001,
1.54304703226,
1.8109457902600001,
1.58776803526
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6191565195400001,
"stddev": 0.01506543139959873,
"median": 0.6231182642400002,
"user": 0.75132072,
"system": 0.70383544,
"min": 0.5962595462400001,
"max": 0.6443582732400001,
"times": [
0.6066479452400001,
0.6288139572400001,
0.6270319252400001,
0.6443582732400001,
0.6217835932400001,
0.6045191822400001,
0.6315406142400001,
0.5962595462400001,
0.6061572232400001,
0.6244529352400001
]
},
{
"command": "pacquet@main",
"mean": 0.6204023236400001,
"stddev": 0.05043910156145752,
"median": 0.6132202977400001,
"user": 0.76457272,
"system": 0.69304804,
"min": 0.5538648182400001,
"max": 0.70172312824,
"times": [
0.59387708524,
0.5541461982400001,
0.5980208892400001,
0.63185505624,
0.6906587472400001,
0.70172312824,
0.65343671824,
0.6137940662400001,
0.6126465292400001,
0.5538648182400001
]
},
{
"command": "pnpr@HEAD",
"mean": 0.31568550064,
"stddev": 0.013321914164567161,
"median": 0.31496672224,
"user": 0.21826901999999998,
"system": 0.53761144,
"min": 0.30002336224,
"max": 0.34624743224,
"times": [
0.31154718624,
0.30301649124,
0.32547619424,
0.30466346924,
0.30002336224,
0.31778846524,
0.34624743224,
0.31735212324,
0.31815896124,
0.31258132124
]
},
{
"command": "pnpr@main",
"mean": 0.3121671228399999,
"stddev": 0.009725621995574075,
"median": 0.31067179924,
"user": 0.19851151999999997,
"system": 0.54662864,
"min": 0.29860978224,
"max": 0.32830395324,
"times": [
0.30979471024,
0.31339150524,
0.29860978224,
0.30639777024,
0.30339846024,
0.32247157324,
0.31154888824,
0.32329470024,
0.32830395324,
0.30445988524
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.94663691998,
"stddev": 0.04865289611321852,
"median": 1.9302339344800001,
"user": 1.0049413,
"system": 0.80183108,
"min": 1.89801659998,
"max": 2.0723467269799998,
"times": [
1.97404410898,
1.9225037499800002,
2.0723467269799998,
1.95334311798,
1.92693502998,
1.9335328389800002,
1.89801659998,
1.94021132098,
1.9252768909800002,
1.9201588149800002
]
},
{
"command": "pacquet@main",
"mean": 1.9544069928799996,
"stddev": 0.03759722593764571,
"median": 1.94282005198,
"user": 1.0675113999999999,
"system": 0.7660998799999998,
"min": 1.91066473898,
"max": 2.01434205598,
"times": [
2.0076118689799998,
1.94464566998,
1.9230524079800002,
1.91066473898,
1.94099443398,
1.9525373029800002,
1.9326412129800001,
1.92265392798,
1.99492630898,
2.01434205598
]
},
{
"command": "pnpr@HEAD",
"mean": 0.3195182416800001,
"stddev": 0.010095746716079502,
"median": 0.31800157198,
"user": 0.22004649999999998,
"system": 0.53454728,
"min": 0.30353011398,
"max": 0.33073151398,
"times": [
0.32982470898,
0.31608184198,
0.33073151398,
0.30462569398,
0.33048826798000003,
0.31914962198,
0.30353011398,
0.31685352198,
0.32727529498,
0.31662183698
]
},
{
"command": "pnpr@main",
"mean": 0.34957826278000004,
"stddev": 0.01976916761401596,
"median": 0.35083038698,
"user": 0.22885300000000003,
"system": 0.58122458,
"min": 0.31757565098,
"max": 0.37992780298,
"times": [
0.31757565098,
0.37251791698000003,
0.35141572798000004,
0.32910783098,
0.36735230098,
0.37992780298,
0.33358182598,
0.35129772498,
0.34264279698,
0.35036304898000004
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.41609096144,
"stddev": 0.021267355599627998,
"median": 0.41355488813999997,
"user": 0.40814504000000007,
"system": 0.0671882,
"min": 0.38687976614,
"max": 0.44586788214,
"times": [
0.38687976614,
0.43523543514,
0.43834685614,
0.44586788214,
0.40964886114,
0.40665739514,
0.43367161314,
0.39613099614,
0.39100989414000004,
0.41746091514
]
},
{
"command": "pacquet@main",
"mean": 0.38752117314,
"stddev": 0.011486291584705679,
"median": 0.38433086764,
"user": 0.38081964,
"system": 0.0624506,
"min": 0.37519323714,
"max": 0.40963363214000004,
"times": [
0.37680922614,
0.38659580214,
0.40963363214000004,
0.38064968914,
0.38359907614,
0.38506265914,
0.39698598514,
0.40167127714,
0.37901114714,
0.37519323714
]
},
{
"command": "pnpr@HEAD",
"mean": 0.09291154007939394,
"stddev": 0.004070659214302664,
"median": 0.09216956314000001,
"user": 0.023764121818181824,
"system": 0.011669284848484847,
"min": 0.08533431714,
"max": 0.10427159414,
"times": [
0.08533431714,
0.08758291614000001,
0.08675742314000001,
0.08645260114,
0.08672951114,
0.08916612414000001,
0.09510032514000001,
0.09877535714,
0.09464275414000001,
0.09014950414,
0.09474606914000001,
0.09565498914000001,
0.09827223114000001,
0.09197172114,
0.09172457514000001,
0.09099790914000001,
0.09108682614000001,
0.09631879614000001,
0.09518748814000001,
0.09601484414000001,
0.09593742914,
0.09562386014,
0.09493054614,
0.09200294914000001,
0.09462056214,
0.09700693014,
0.09289193114000001,
0.08994196314000001,
0.09191742814000001,
0.09094443814000001,
0.09216956314000001,
0.09115534514000001,
0.10427159414
]
},
{
"command": "pnpr@main",
"mean": 0.09589119389,
"stddev": 0.003782366077782399,
"median": 0.09556365164,
"user": 0.02501919,
"system": 0.01229965,
"min": 0.08918524014000001,
"max": 0.10397246214000001,
"times": [
0.09871226814,
0.10252217414,
0.09980822014000001,
0.09575040814,
0.09432557814,
0.09142540314000001,
0.09673411814,
0.08918524014000001,
0.09253484014,
0.09212962714,
0.09460254914,
0.09268702614,
0.09508770114000001,
0.09356657114000001,
0.09570667514,
0.09689769514,
0.09290689914000001,
0.09007464214000001,
0.09542062814,
0.09979785914000001,
0.09714804714000001,
0.09585560514000001,
0.09332818114000001,
0.10331116714000001,
0.10397246214000001,
0.09991744514,
0.09445086314000001,
0.09709353414
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.649978240380001,
"stddev": 0.17459236333778863,
"median": 4.6029142829800005,
"user": 2.1855143599999995,
"system": 1.6219838799999997,
"min": 4.462027640480001,
"max": 4.967906617480001,
"times": [
4.934559661480001,
4.602523184480001,
4.51424717348,
4.53100702548,
4.5267139514800006,
4.63940555048,
4.718086217480001,
4.967906617480001,
4.60330538148,
4.462027640480001
]
},
{
"command": "pacquet@main",
"mean": 4.5498953037800005,
"stddev": 0.08833830751848544,
"median": 4.5163551574800005,
"user": 2.01355106,
"system": 1.6015505800000003,
"min": 4.47709475048,
"max": 4.750230897480001,
"times": [
4.520503665480001,
4.47709475048,
4.4780731004800005,
4.554837362480001,
4.61618594848,
4.61824255748,
4.49060896848,
4.750230897480001,
4.480969137480001,
4.51220664948
]
},
{
"command": "pnpr@HEAD",
"mean": 3.5888584264800003,
"stddev": 0.0707672864753933,
"median": 3.59164888198,
"user": 1.4205217599999997,
"system": 1.35033748,
"min": 3.50528759648,
"max": 3.74582715848,
"times": [
3.58904487448,
3.50776281648,
3.59425288948,
3.59728161648,
3.52066949048,
3.62052379248,
3.5857562394799998,
3.74582715848,
3.62217779048,
3.50528759648
]
},
{
"command": "pnpr@main",
"mean": 3.6143624368799996,
"stddev": 0.11808715181254958,
"median": 3.5954070269800003,
"user": 1.5556767599999997,
"system": 1.58599018,
"min": 3.49667207148,
"max": 3.9068395104799998,
"times": [
3.9068395104799998,
3.62524202548,
3.58216438548,
3.66333708348,
3.55875250248,
3.60864966848,
3.49667207148,
3.50386871748,
3.65714726248,
3.54095114148
]
}
]
} |
|
| Branch | pr/13233 |
| 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,465.62 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 303.53 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 300.02 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 85.33 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,356.07 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,505.29 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 273.08 ms |
… pnpm Three gaps in what the two clients tell the pnpr server, all of the same shape: a field the request omits is not defaulted server-side but cleared, so the server resolves under inputs the user never chose. pacquet never sent `catalogs`. The workspace the server reconstructs from the request has no catalog sections of its own, so every `catalog:` specifier failed with "No catalog entry ... was found for catalog 'default'." — the bug #13233 fixed for the TypeScript client and the server, leaving the Rust client behind. The catalogs are picked the same way the local install picks them: an updateConfig hook's set when it produced one, otherwise the workspace-manifest read. Reading only `config.catalogs` is not enough — it is None unless a hook ran, which the new end-to-end test catches. The TypeScript client never sent `frozenLockfile` / `preferFrozenLockfile`, so the server always reuse-and-updated and `--frozen-lockfile` silently resolved and rewrote the lockfile it promises to leave alone. Since frozenLockfile defaults to true on CI, this changes CI behavior: an out-of-date lockfile now fails instead of being updated in place. Tests assert what actually goes over the wire, since a silently missing field is the failure mode: a mockito body matcher for the Rust client and an end-to-end catalog install against a real pnpr for the CLI.
… catalogs, resolution mode) (#13279) pnpr resolves and enforces policy server-side, and neither client runs its own verifyLockfileResolutions when a pnpr server is configured. The server assigns each field from the request unconditionally, so a field a client omits is cleared rather than defaulted, and the server resolves under inputs the user never chose. The TypeScript client sent only minimumReleaseAge of the verification policy, so minimumReleaseAgeExclude entries stopped applying and the input-lockfile verifier could reject a lockfile whose entries the user had explicitly excluded. It also never sent the resolution mode, so --frozen-lockfile silently resolved and rewrote the lockfile it promises to leave alone. pacquet never sent catalogs, so every catalog: specifier failed to resolve — the bug #13233 fixed for the TypeScript client and the server, leaving the Rust client behind. Drop the TRUST_POLICY_INCOMPATIBLE_WITH_PNPR guard, written before the server gained trust-policy enforcement and refusing an install pacquet runs happily.
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light.png)
Summary
Fixes a regression where a
catalog:specifier fails to resolve when the install is routed through a pnpr server, erroring with:even though the catalog entry exists in
pnpm-workspace.yaml.Root cause
The pnpr server reconstructs the requested workspace in a temp dir from the resolve request (
pnpr/crates/pnpr/src/resolver/resolve.rs). That reconstruction wrote apnpm-workspace.yamlwith only apackages:section — no catalog definitions — and passedcatalogs_override: Noneinto the install. So the server had no catalogs and could not resolve anycatalog:specifier.This affected both:
catalog:in overrides (the error in the issue, which fires first), andcatalog:in regular dependencies (verified separately — it fails the same way once the overrides error is out of the way).Fix
Forward the client's workspace catalogs in the resolve request and use them as the install's
catalogs_override, which feeds both dependency and override catalog resolution in one place. The client now sends its raw overrides (the server resolves theircatalog:references) rather than pre-resolving them locally.This mirrors the approach suggested in review — resolving
catalog:server-side rather than patching each reference on the client — and keeps dependency and override catalog handling consistent.Scope (parity change — TypeScript + Rust pnpr server)
@pnpm/pnpr.client): newcatalogsfield on the resolve request, added to the wire body.@pnpm/installing.deps-installer): forwardopts.catalogs; send raw overrides.@pnpm/pnpr): newcatalogsfield onResolveRequest; passed ascatalogs_override.No
pnpm-workspace.yamlreconstruction change is needed —catalogs_overridebypasses the manifest read.Tests
resolve/tests.rs):forwarded_catalogs_resolve_catalog_specifiers— an offline resolve where acatalog:dependency resolves only because the catalogs are forwarded. Verified it fails with the exact issue error (No catalog entry 'lib' ...) when the fix is reverted.pnpmRegistry.ts): faithful reproduction of the issue (root +packages/a,catalog:dependency +catalog:override) against a real pnpr server.pnprWorkspaceMetadata.ts): asserts catalogs and raw overrides are forwarded.Follow-up noted (not fixed here)
While reproducing, I found a separate, pre-existing bug: a workspace with exactly one non-root importer (e.g. only
packages/awith no root project) fails the pnpr path withCannot read properties of undefined (reading 'dependencies'), becauseinstallViaPnprServeronly builds theprojectslist whenallInstallProjects.length > 1, so a single member is sent as a root (.) importer and the headless install then can't find its importer id. It reproduces without catalogs and is orthogonal to this fix. The issue's real-world repro has a root importer too (root + member = 2 importers), so it is unaffected. Happy to file/fix separately.Closes #13232
Squash Commit Body
Checklist
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 (Claude Code, claude-opus-4-8).
Summary by CodeRabbit
Bug Fixes
catalog:references insideoverrides(including cases where the catalog entry exists).catalog:specifiers resolve consistently in dependency and override handling.Tests
catalogs/overridesare sent to the pnpr resolver and that installs resolvecatalog:references in bothdependenciesandoverrides.Chores