Repository navigation
Conversation
|
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 (4)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughProxy settings now flow from global configuration, environment, YAML, CLI flags, and overrides into project and bootstrap network configs. The PR also adds proxy/network regression coverage, registry authentication tests, shared test fixtures, and porting updates. ChangesProxy configuration and networking
Authentication test coverage
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant CLI
participant Config
participant NetworkClient
participant Registry
CLI->>Config: load proxy and authentication settings
CLI->>NetworkClient: start install requests
NetworkClient->>Registry: fetch metadata and tarballs through configured proxy
Registry-->>NetworkClient: return responses and authorization results
NetworkClient-->>CLI: complete or report install outcome
Possibly related issues
Suggested labels: Suggested reviewers: ✨ 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 |
PR Summary by QodoFix pacquet auth/proxy parity and add hermetic coverage for Stage 6
AI Description
Diagram
High-Level Assessment
Files changed (20)
|
Micro-Benchmark ResultsLinux |
Code Review by Qodo
1.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13158 +/- ##
==========================================
+ Coverage 85.85% 86.31% +0.45%
==========================================
Files 505 507 +2
Lines 84029 84704 +675
==========================================
+ Hits 72147 73111 +964
+ Misses 11882 11593 -289 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Confidence Score: 5/5Safe to merge — the change is additive (new flags, new tests, moved helpers) and the proxy precedence logic is thoroughly exercised by the new unit tests. The proxy cascade is well-covered end-to-end: global YAML, env overlay, npmrc, workspace YAML, and both forms of CLI override each have dedicated tests. The http_proxy_is_explicit sentinel correctly prevents inadvertent HTTPS-to-HTTP fallback propagation in every scenario tested. The security boundary (workspace YAML proxy intentionally excluded from package_manager_bootstrap) is preserved and guarded by workspace_yaml_proxy_is_not_trusted_for_package_manager_bootstrap. No change affects lockfile format, store layout, or other shared contract fields. No files require special attention. Reviews (3): Last reviewed commit: "fix(pacquet): preserve layered HTTP prox..." | Re-trigger Greptile |
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.5100779701200002,
"stddev": 0.15468039920910903,
"median": 2.47838852552,
"user": 1.4838288,
"system": 1.2718275799999998,
"min": 2.3393132155200003,
"max": 2.78180956952,
"times": [
2.65287346752,
2.63357786152,
2.4475005005200003,
2.3800273025200003,
2.3393132155200003,
2.3649058745200002,
2.78180956952,
2.36464203052,
2.50927655052,
2.62685332852
]
},
{
"command": "pacquet@main",
"mean": 2.5125117201200005,
"stddev": 0.14204467918847383,
"median": 2.47861364252,
"user": 1.4148368,
"system": 1.27755918,
"min": 2.35148899752,
"max": 2.7455181255200003,
"times": [
2.58667930452,
2.7455181255200003,
2.61787592752,
2.5254388585200003,
2.69502195052,
2.3929342035200003,
2.38385988952,
2.35148899752,
2.3945115175200002,
2.4317884265200003
]
},
{
"command": "pnpr@HEAD",
"mean": 1.53269101952,
"stddev": 0.1367602803773092,
"median": 1.48428093302,
"user": 1.0008016,
"system": 1.13990208,
"min": 1.3887541325200001,
"max": 1.78131448852,
"times": [
1.42333825852,
1.69456590352,
1.4510990675200002,
1.39255315752,
1.6482243785200001,
1.50885881552,
1.4597030505200002,
1.3887541325200001,
1.57849894252,
1.78131448852
]
},
{
"command": "pnpr@main",
"mean": 1.50789382512,
"stddev": 0.16958918349791682,
"median": 1.46585340802,
"user": 1.0027802000000001,
"system": 1.1431646799999997,
"min": 1.3408067305200002,
"max": 1.78295182552,
"times": [
1.7706346885200002,
1.78295182552,
1.35483667452,
1.3408067305200002,
1.60782836852,
1.41915739952,
1.3738194535200001,
1.5125494165200002,
1.56307664052,
1.35327705352
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.24981679388000005,
"stddev": 0.0039009680292448113,
"median": 0.25001136688000003,
"user": 0.20536093999999996,
"system": 0.51760904,
"min": 0.24316837088,
"max": 0.25693423088000006,
"times": [
0.25693423088000006,
0.25181203888000003,
0.24751943888000003,
0.24316837088,
0.24703567288,
0.25130809588,
0.25326699388000007,
0.25132695988000003,
0.24708149888,
0.24871463788
]
},
{
"command": "pacquet@main",
"mean": 0.24802947008,
"stddev": 0.010028468124085397,
"median": 0.25032475888000005,
"user": 0.18543433999999998,
"system": 0.5280047400000001,
"min": 0.23263271088,
"max": 0.26244450988000007,
"times": [
0.25006032888,
0.26244450988000007,
0.25141270088000006,
0.25288017888000003,
0.25058918888000004,
0.24482163788000003,
0.26104146288,
0.23780942588,
0.23263271088,
0.23660255588
]
},
{
"command": "pnpr@HEAD",
"mean": 0.26628465448000005,
"stddev": 0.00862442683929929,
"median": 0.2647518508800001,
"user": 0.21175803999999995,
"system": 0.5328843400000001,
"min": 0.25054592688000005,
"max": 0.27816003088,
"times": [
0.27816003088,
0.26465493988000005,
0.26484876188000006,
0.27205893488000005,
0.27531553388,
0.27443836088000007,
0.26064740488000004,
0.25054592688000005,
0.25898921888000004,
0.26318743188000004
]
},
{
"command": "pnpr@main",
"mean": 0.2636509995800001,
"stddev": 0.007464291100829519,
"median": 0.26119744438000003,
"user": 0.19120544,
"system": 0.5514039399999999,
"min": 0.25417834988000004,
"max": 0.27985963388000007,
"times": [
0.25888412288000007,
0.26019431588,
0.26220057288000004,
0.27115864988000005,
0.26702292388000004,
0.25970765488,
0.25841639688000007,
0.26488737488,
0.25417834988000004,
0.27985963388000007
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.6794846446399996,
"stddev": 0.017153153727136553,
"median": 2.67373957244,
"user": 1.5260591,
"system": 1.2863043799999998,
"min": 2.66051265794,
"max": 2.71085949194,
"times": [
2.6700574119400002,
2.67640630094,
2.66364173794,
2.67064472194,
2.68143608094,
2.67107284394,
2.71085949194,
2.70762854294,
2.66051265794,
2.6825866559400002
]
},
{
"command": "pacquet@main",
"mean": 2.68087217704,
"stddev": 0.012844886407003509,
"median": 2.6820992629400005,
"user": 1.5445183,
"system": 1.23610848,
"min": 2.66246750894,
"max": 2.7020556459400003,
"times": [
2.68261441794,
2.69607424394,
2.6818874159400004,
2.66496838094,
2.67921611394,
2.7020556459400003,
2.66246750894,
2.66871776294,
2.68231110994,
2.68840916994
]
},
{
"command": "pnpr@HEAD",
"mean": 1.56242656324,
"stddev": 0.13104596737694313,
"median": 1.5360975194400002,
"user": 0.9797722999999999,
"system": 1.0898570799999998,
"min": 1.3878128329400001,
"max": 1.80963883594,
"times": [
1.50225844794,
1.3878128329400001,
1.52188371094,
1.41353049494,
1.5503113279400003,
1.61131018194,
1.63738446194,
1.4827430809400002,
1.70739225694,
1.80963883594
]
},
{
"command": "pnpr@main",
"mean": 1.5983099380399999,
"stddev": 0.12958727353110466,
"median": 1.61505605244,
"user": 0.9624153,
"system": 1.09254148,
"min": 1.39197833394,
"max": 1.8208733749400001,
"times": [
1.5761137989400003,
1.67475452494,
1.8208733749400001,
1.6787745739400002,
1.6713940119400001,
1.58026847994,
1.6498436249400001,
1.51821374894,
1.42088490794,
1.39197833394
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.5480235178200001,
"stddev": 0.006039861504002002,
"median": 0.54770374062,
"user": 0.6690641599999999,
"system": 0.643817,
"min": 0.5382461846200001,
"max": 0.5596046426200001,
"times": [
0.5448430886200001,
0.54912876462,
0.54227582062,
0.5596046426200001,
0.54989187362,
0.55357109462,
0.55110065762,
0.54529433462,
0.54627871662,
0.5382461846200001
]
},
{
"command": "pacquet@main",
"mean": 0.52182490122,
"stddev": 0.00838367717290208,
"median": 0.5234671471200001,
"user": 0.62611466,
"system": 0.6269612999999998,
"min": 0.50395785262,
"max": 0.53506656962,
"times": [
0.50395785262,
0.5229076596200001,
0.52402663462,
0.52483895662,
0.52632576162,
0.52509026662,
0.53506656962,
0.51228848362,
0.5225904666200001,
0.52115636062
]
},
{
"command": "pnpr@HEAD",
"mean": 0.29445603622000005,
"stddev": 0.005521067334603948,
"median": 0.29448513012,
"user": 0.18336365999999998,
"system": 0.5291035999999999,
"min": 0.28461304162,
"max": 0.30302618462,
"times": [
0.29502035262000004,
0.29764818362,
0.30043234762000004,
0.29016663262000003,
0.29394990762,
0.29312586362000004,
0.29745031262000005,
0.28912753562000004,
0.30302618462,
0.28461304162
]
},
{
"command": "pnpr@main",
"mean": 0.28799134252,
"stddev": 0.004906005945971855,
"median": 0.28927808362,
"user": 0.18477255999999997,
"system": 0.5036361,
"min": 0.28064646362,
"max": 0.29681393062,
"times": [
0.28359742062000004,
0.28064646362,
0.28121250362,
0.29003550662,
0.28866014162000003,
0.29003386262,
0.29063676262000004,
0.28838080762,
0.28989602562,
0.29681393062
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.8363345062799996,
"stddev": 0.006652230617500245,
"median": 1.83433397748,
"user": 0.8552451000000001,
"system": 0.7330708599999999,
"min": 1.82685793198,
"max": 1.84660975198,
"times": [
1.84603033698,
1.83545676498,
1.8426428729800002,
1.82685793198,
1.83163703198,
1.83271390898,
1.84660975198,
1.8315113279800002,
1.8332111899799999,
1.83667394498
]
},
{
"command": "pacquet@main",
"mean": 1.82936562638,
"stddev": 0.013940041426468382,
"median": 1.83441334148,
"user": 0.8563578999999999,
"system": 0.7245865599999999,
"min": 1.8037355099799999,
"max": 1.84823960298,
"times": [
1.83445535998,
1.84823960298,
1.84461562798,
1.83507605298,
1.83437132298,
1.81931046798,
1.82490555698,
1.83567142698,
1.81327533498,
1.8037355099799999
]
},
{
"command": "pnpr@HEAD",
"mean": 0.28333803838,
"stddev": 0.0032364588450171953,
"median": 0.28349611698,
"user": 0.1877511,
"system": 0.47786176,
"min": 0.27734337298,
"max": 0.28728599398,
"times": [
0.28561382298,
0.28238637798,
0.28140591098,
0.28459347198,
0.28239876197999997,
0.27982713598,
0.28728599398,
0.28554207798,
0.27734337298,
0.28698345698
]
},
{
"command": "pnpr@main",
"mean": 0.28050698488,
"stddev": 0.010473955439640187,
"median": 0.27590404898,
"user": 0.1659384,
"system": 0.48241806,
"min": 0.27063738698,
"max": 0.30016995198,
"times": [
0.29562548097999997,
0.30016995198,
0.27306256798,
0.27063738698,
0.27291504097999997,
0.27712046598,
0.28903060098,
0.27470025498,
0.27505144298,
0.27675665498
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.3233422319,
"stddev": 0.006380215008282453,
"median": 0.32564736460000004,
"user": 0.3153087,
"system": 0.05654818,
"min": 0.31019146960000005,
"max": 0.32957840560000007,
"times": [
0.32553612560000006,
0.31019146960000005,
0.32170373060000007,
0.3234047346,
0.32957840560000007,
0.3274984416,
0.3272321436,
0.32575860360000003,
0.32833424660000005,
0.31418441760000004
]
},
{
"command": "pacquet@main",
"mean": 0.3244948395000001,
"stddev": 0.008784813795871474,
"median": 0.3231689636,
"user": 0.3205378,
"system": 0.04846508,
"min": 0.31469354260000004,
"max": 0.34267984060000006,
"times": [
0.33363358060000003,
0.34267984060000006,
0.32594894960000004,
0.31814799060000004,
0.32547284860000003,
0.31727999560000003,
0.31711827160000006,
0.32910829660000007,
0.31469354260000004,
0.3208650786
]
},
{
"command": "pnpr@HEAD",
"mean": 0.08598983954117648,
"stddev": 0.001735419926204029,
"median": 0.0863031611,
"user": 0.01921928235294118,
"system": 0.008885217647058826,
"min": 0.0825068226,
"max": 0.0890979856,
"times": [
0.0836799186,
0.0861445436,
0.0868310696,
0.0842027776,
0.0859004876,
0.0870247126,
0.0867749156,
0.0854741286,
0.08542827260000001,
0.08646177860000001,
0.08365071460000001,
0.0874063676,
0.0856306926,
0.0825068226,
0.08329654160000001,
0.0869227016,
0.0872685296,
0.0869346446,
0.08724827060000001,
0.0878714686,
0.08657225560000001,
0.0890979856,
0.08786159060000001,
0.08543040760000001,
0.0888984616,
0.08524054160000001,
0.08826567660000001,
0.08800879660000001,
0.0836097876,
0.0854237146,
0.0845352006,
0.08297859660000001,
0.0844322276,
0.0866399426
]
},
{
"command": "pnpr@main",
"mean": 0.082611771225,
"stddev": 0.0012034753526118604,
"median": 0.0823875391,
"user": 0.018284056249999996,
"system": 0.0084715225,
"min": 0.08027728760000001,
"max": 0.0872849296,
"times": [
0.0872849296,
0.08540348660000001,
0.08223125560000001,
0.08329337560000001,
0.08027728760000001,
0.0835741806,
0.0817217026,
0.0822218386,
0.08249660260000001,
0.0828258496,
0.0834667296,
0.0813470606,
0.0823996916,
0.08234541960000001,
0.08266107060000001,
0.08206098760000001,
0.0830453606,
0.0823765986,
0.0823622516,
0.0825270196,
0.0823516516,
0.08224481060000001,
0.0834895226,
0.0819348506,
0.0814465966,
0.08257957760000001,
0.0823293506,
0.0826090336,
0.0823984796,
0.0817743206,
0.0818403996,
0.0826553866
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.48058967826,
"stddev": 0.09586502004204989,
"median": 4.43597702006,
"user": 1.6169983799999996,
"system": 1.35312734,
"min": 4.40554490906,
"max": 4.68111634706,
"times": [
4.43068766806,
4.43182130006,
4.552304268059999,
4.40804272706,
4.40554490906,
4.68111634706,
4.44013274006,
4.59973514906,
4.41634828606,
4.44016338806
]
},
{
"command": "pacquet@main",
"mean": 4.592460559360001,
"stddev": 0.21296649825422817,
"median": 4.473144871560001,
"user": 1.6510462799999999,
"system": 1.37194284,
"min": 4.4068015440599995,
"max": 4.87661661306,
"times": [
4.40869694306,
4.51353292006,
4.41193017006,
4.74813257606,
4.8543042950599995,
4.41420683006,
4.85762687906,
4.87661661306,
4.4068015440599995,
4.43275682306
]
},
{
"command": "pnpr@HEAD",
"mean": 3.5320084162599996,
"stddev": 0.133826444542249,
"median": 3.4660796655599997,
"user": 1.16175788,
"system": 1.20492184,
"min": 3.43394259106,
"max": 3.80149494706,
"times": [
3.7541974800599998,
3.46287237006,
3.46928696106,
3.45725618106,
3.45600817006,
3.55357081406,
3.43394259106,
3.80149494706,
3.45457457506,
3.47688007306
]
},
{
"command": "pnpr@main",
"mean": 3.5262728535599996,
"stddev": 0.12929103110915108,
"median": 3.47584071106,
"user": 1.14592348,
"system": 1.21694824,
"min": 3.41935961706,
"max": 3.85219513006,
"times": [
3.47118901406,
3.5228115020599997,
3.85219513006,
3.41935961706,
3.53640116506,
3.48049240806,
3.62769377706,
3.44843069706,
3.44233976806,
3.4618154570599997
]
}
]
} |
|
| Branch | pr/13158 |
| 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,387.81 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 277.34 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 284.61 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 82.51 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,388.75 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,433.94 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 250.55 ms |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Code review by qodo was updated up to the latest commit 5544af6 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pnpm/crates/config/src/workspace_yaml.rs (1)
1-1: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick winPreserve explicit HTTP proxies from lower-priority configuration layers.
WorkspaceSettings::apply_proxy_tounconditionally overwrites an already-sethttp_proxywithhttps_proxywhenever the current layer defineshttps_proxybut nohttp_proxy. To align with pnpm's configuration precedence, the HTTPS fallback should only occur whenhttp_proxyhas not been explicitly set by any layer.
pnpm/crates/config/src/workspace_yaml.rs#L978-996: Addhttp_proxy_is_explicit: boolto the signature and gate thehttps_proxyfallback on!http_proxy_is_explicit.pnpm/crates/config/src/workspace_yaml.rs#L774-775: Passconfig.http_proxy_is_explicittoself.apply_proxy_to(...).pnpm/crates/config/src/lib.rs#L2204-2205: Passself.package_manager_bootstrap.http_proxy_is_explicittoglobal_settings.apply_proxy_to(...).pnpm/crates/config/src/lib.rs#L2346-2346: Passself.package_manager_bootstrap.http_proxy_is_explicittoenv_settings.apply_proxy_to(...).🐛 Proposed fixes
For
pnpm/crates/config/src/workspace_yaml.rs:- pub fn apply_to(self, config: &mut Config, base_dir: &Path) { - self.apply_proxy_to(&mut config.proxy); + pub fn apply_to(self, config: &mut Config, base_dir: &Path) { + self.apply_proxy_to(&mut config.proxy, config.http_proxy_is_explicit);- pub(crate) fn apply_proxy_to(&self, proxy_config: &mut pacquet_network::ProxyConfig) { + pub(crate) fn apply_proxy_to( + &self, + proxy_config: &mut pacquet_network::ProxyConfig, + http_proxy_is_explicit: bool, + ) { if let Some(value) = self.https_proxy.as_ref().or(self.proxy.as_ref()) { proxy_config.https_proxy = Some(value.clone()); } if let Some(value) = &self.http_proxy { proxy_config.http_proxy = Some(value.clone()); - } else if self.https_proxy.is_some() || self.proxy.is_some() { + } else if (self.https_proxy.is_some() || self.proxy.is_some()) && !http_proxy_is_explicit { proxy_config.http_proxy.clone_from(&proxy_config.https_proxy); } if let Some(value) = self.no_proxy.as_ref().or(self.noproxy.as_ref()) {For
pnpm/crates/config/src/lib.rs:if let Some(global_settings) = global_settings.as_ref() { self.package_manager_bootstrap.http_proxy_is_explicit |= has_nonempty_string(global_settings.http_proxy.as_deref()); - global_settings.apply_proxy_to(&mut self.package_manager_bootstrap.proxy); + global_settings.apply_proxy_to( + &mut self.package_manager_bootstrap.proxy, + self.package_manager_bootstrap.http_proxy_is_explicit, + ); }self.http_proxy_is_explicit |= env_http_proxy_is_explicit; self.package_manager_bootstrap.http_proxy_is_explicit |= env_http_proxy_is_explicit; collect_explicit_settings(&mut self.explicit_settings, &env_settings); - env_settings.apply_proxy_to(&mut self.package_manager_bootstrap.proxy); + env_settings.apply_proxy_to( + &mut self.package_manager_bootstrap.proxy, + self.package_manager_bootstrap.http_proxy_is_explicit, + );🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pnpm/crates/config/src/workspace_yaml.rs` at line 1, Update WorkspaceSettings::apply_proxy_to to accept an http_proxy_is_explicit boolean and only use the current layer’s https_proxy as an http_proxy fallback when it is false. Pass config.http_proxy_is_explicit from the workspace call site, and pass self.package_manager_bootstrap.http_proxy_is_explicit in the global_settings and env_settings apply_proxy_to calls.
🧹 Nitpick comments (1)
pnpm/crates/testing-utils/src/fixtures.rs (1)
4-26: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRestore rustdoc comments for public API contracts.
When
minimal_tarballwas extracted fromtarball_url_dependency.rs, its descriptive rustdoc comment was removed. As per coding guidelines, public API contracts should use rustdoc comments. Please restore the comment forminimal_tarballand add one for the newly introducedsha512_integrityhelper.📝 Proposed documentation
-#[must_use] -pub fn minimal_tarball(name: &str, version: &str) -> Vec<u8> { +/// Builds a minimal valid gzipped tarball bytes containing a `package.json` +/// with the given `name` and `version`. +#[must_use] +pub fn minimal_tarball(name: &str, version: &str) -> Vec<u8> { use std::io::Write; let manifest = serde_json::json!({ "name": name, "version": version }).to_string(); let manifest = manifest.as_bytes(); let mut builder = tar::Builder::new(Vec::new()); let mut header = tar::Header::new_gnu(); header.set_path("package/package.json").expect("set tar entry path"); header.set_size(manifest.len() as u64); header.set_mode(0o644); header.set_cksum(); builder.append(&header, manifest).expect("append package.json to tar"); let tar_bytes = builder.into_inner().expect("finish tar"); let mut encoder = flate2::write::GzEncoder::new(Vec::new(), flate2::Compression::default()); encoder.write_all(&tar_bytes).expect("gzip tar"); encoder.finish().expect("finish gzip") } +/// Computes an SSRI SHA-512 integrity string for the provided byte slice. #[must_use] pub fn sha512_integrity(bytes: &[u8]) -> String {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pnpm/crates/testing-utils/src/fixtures.rs` around lines 4 - 26, Add rustdoc comments directly above the public functions minimal_tarball and sha512_integrity. Restore minimal_tarball’s descriptive contract from its former location and document sha512_integrity’s purpose and returned SHA-512 integrity format, without changing their implementations.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@pnpm/crates/config/src/workspace_yaml.rs`:
- Line 1: Update WorkspaceSettings::apply_proxy_to to accept an
http_proxy_is_explicit boolean and only use the current layer’s https_proxy as
an http_proxy fallback when it is false. Pass config.http_proxy_is_explicit from
the workspace call site, and pass
self.package_manager_bootstrap.http_proxy_is_explicit in the global_settings and
env_settings apply_proxy_to calls.
---
Nitpick comments:
In `@pnpm/crates/testing-utils/src/fixtures.rs`:
- Around line 4-26: Add rustdoc comments directly above the public functions
minimal_tarball and sha512_integrity. Restore minimal_tarball’s descriptive
contract from its former location and document sha512_integrity’s purpose and
returned SHA-512 integrity format, without changing their implementations.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 5c26dc67-c068-4a53-b4d4-c17d4fb65354
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock,!Cargo.lock
📒 Files selected for processing (20)
.changeset/tidy-wolves-proxy.mdpnpm/crates/cli/src/cli_args/cli_command.rspnpm/crates/cli/src/cli_args/config/tests.rspnpm/crates/cli/src/cli_args/dispatch.rspnpm/crates/cli/src/cli_args/tests.rspnpm/crates/cli/src/config_overrides.rspnpm/crates/cli/src/config_overrides/tests.rspnpm/crates/cli/tests/auth.rspnpm/crates/cli/tests/tarball_url_dependency.rspnpm/crates/config/src/env_overlay.rspnpm/crates/config/src/lib.rspnpm/crates/config/src/npmrc_auth.rspnpm/crates/config/src/tests.rspnpm/crates/config/src/workspace_yaml.rspnpm/crates/config/src/workspace_yaml/tests.rspnpm/crates/network/src/tests.rspnpm/crates/package-manager/src/install_package_from_registry/tests.rspnpm/crates/testing-utils/Cargo.tomlpnpm/crates/testing-utils/src/fixtures.rspnpm/plans/TEST_PORTING.md
|
Addressed the outside-diff CodeRabbit findings in
Validated with the 21 proxy-related config tests, focused Clippy, repository-wide Dylint, and the full pre-push suite. Written by an agent (Codex, GPT-5). |
|
Code review by qodo was updated up to the latest commit 83f1301 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Summary
Related to #13146.
Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting.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-5).
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit
--http-proxy,--https-proxy, and--no-proxy.config.yamlwhen using global configuration commands.