Repository navigation
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
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 (1)
📝 WalkthroughWalkthroughAdds ChangesConvergence override support
Estimated code review effort: 4 (Complex) | ~45 minutes 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 QodoAdd convergence override selector ("pkg@": exact version)
AI Description
Diagram
High-Level Assessment
Files changed (26)
|
Code Review by Qodo
Context used✅ Tickets:
🎫 New override syntax "pkg@": "version" — apply only where the version satisfies the declared range✅ Compliance rules (platform):
18 rules 1.
|
PR Code Suggestions ✨Latest suggestions up to fdd1818 Warning
Previous suggestionsSuggestions
|
||||||||||||||||||
There was a problem hiding this comment.
🧹 Nitpick comments (3)
pnpm11/installing/deps-installer/src/install/warnOnStaleConvergenceOverrides.ts (2)
61-64: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low valueConsider hoisting the
[...ranges]spread out of thefindcallback.The spread
[...ranges]is re-evaluated for every candidate version insidefind. Hoisting it to a local const before the chain avoids repeated Set→Array conversions.♻️ Suggested refactor
+ const allRanges = [...ranges] const best = candidates .filter((version): version is string => version != null && semver.gt(version, override.newBareSpecifier)) .sort(semver.rcompare) - .find((version) => [...ranges].every((range) => semver.satisfies(version, range, true))) + .find((version) => allRanges.every((range) => semver.satisfies(version, range, true)))🤖 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 `@pnpm11/installing/deps-installer/src/install/warnOnStaleConvergenceOverrides.ts` around lines 61 - 64, The `best` lookup in `warnOnStaleConvergenceOverrides` repeatedly converts `ranges` from a Set to an array inside the `find` callback. Hoist the `[...ranges]` conversion into a local constant before the `candidates.filter(...).sort(...).find(...)` chain, then have the `find` predicate reuse that array when checking `semver.satisfies` so the conversion happens once instead of for every candidate.
57-59: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winLog errors in the catch block instead of silently swallowing them.
The bare
catch { return undefined }swallows all errors with no trace. While the doc comment explains the design intent (failures suppress the warning, never fabricate one), the coding guideline states "never swallow errors." A persistent issue (e.g., misconfigured registry, auth failure) would make the staleness check silently inoperative with no way to diagnose it. Adding a debug-level log preserves the design intent while enabling troubleshooting.As per coding guidelines: "Catch only specific expected errors, never swallow errors, and include context such as offending paths in error messages."
♻️ Suggested fix: add debug logging
if (response.body.policyViolation != null) return undefined return response.body.manifest?.version - } catch { + } catch (err) { + logger.debug({ + message: `Stale convergence override check: failed to resolve range "${range}" for "${name}"`, + prefix: opts.lockfileDir, + }) return undefined }You'll need to import a debug-capable logger from
@pnpm/logger(e.g.,globalInfoor a scopedlogger) alongside the existingglobalWarnimport.🤖 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 `@pnpm11/installing/deps-installer/src/install/warnOnStaleConvergenceOverrides.ts` around lines 57 - 59, The bare catch in warnOnStaleConvergenceOverrides is swallowing unexpected failures, so update that catch block to log the error at debug level before returning undefined. Use the existing function name to locate the block, add a debug-capable logger import from `@pnpm/logger` alongside globalWarn, and include enough context in the message to identify the stale-convergence check while still preserving the current behavior of suppressing the warning.Source: Coding guidelines
pacquet/crates/package-manager/src/warn_on_stale_convergence_overrides.rs (1)
41-87: 🚀 Performance & Scalability | 🔵 TrivialRange resolutions run fully sequentially — parallelize per REVIEW_GUIDE performance priority and pnpm parity.
Each declared range is resolved with a sequential
for range in ranges { ... .await }inside a sequentialfor override_entry in ...loop. pnpm's TS counterpart resolves every declared range concurrently viaPromise.all. On a workspace with several convergence overrides and many declared ranges, this compounds into fully serial network round-trips, adding avoidable latency to the gated (full-resolution) staleness check.♻️ Suggested concurrent resolution
- let mut candidates = Vec::new(); - for range in ranges { - if let Some(version) = resolve_range(name.clone(), range.clone()).await { - candidates.push(version); - } - } + let candidates: Vec<Version> = futures::future::join_all( + ranges.iter().map(|range| resolve_range(name.clone(), range.clone())), + ) + .await + .into_iter() + .flatten() + .collect();As per path instructions, "Performance second: stale-convergence detection is extra work—confirm it only runs on gated paths ... and doesn't add network/CPU work to the warm/common install path unnecessarily," and pnpm↔pacquet parity requires matching behavior; unnecessary serialization here works against both.
[medium_effort][high_reward]🤖 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 `@pacquet/crates/package-manager/src/warn_on_stale_convergence_overrides.rs` around lines 41 - 87, The staleness check in find_stale_convergence_overrides resolves declared ranges one-by-one, which is fully sequential and slower than pnpm parity. Update the resolution step inside this function to resolve all ranges for a given override concurrently instead of awaiting each call in the for range in ranges loop, then keep the existing filtering/sorting logic unchanged. Use the existing resolve_range closure and the parsed_ranges/candidates flow in find_stale_convergence_overrides to locate the async block to parallelize.Source: Path instructions
🤖 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.
Nitpick comments:
In `@pacquet/crates/package-manager/src/warn_on_stale_convergence_overrides.rs`:
- Around line 41-87: The staleness check in find_stale_convergence_overrides
resolves declared ranges one-by-one, which is fully sequential and slower than
pnpm parity. Update the resolution step inside this function to resolve all
ranges for a given override concurrently instead of awaiting each call in the
for range in ranges loop, then keep the existing filtering/sorting logic
unchanged. Use the existing resolve_range closure and the
parsed_ranges/candidates flow in find_stale_convergence_overrides to locate the
async block to parallelize.
In
`@pnpm11/installing/deps-installer/src/install/warnOnStaleConvergenceOverrides.ts`:
- Around line 61-64: The `best` lookup in `warnOnStaleConvergenceOverrides`
repeatedly converts `ranges` from a Set to an array inside the `find` callback.
Hoist the `[...ranges]` conversion into a local constant before the
`candidates.filter(...).sort(...).find(...)` chain, then have the `find`
predicate reuse that array when checking `semver.satisfies` so the conversion
happens once instead of for every candidate.
- Around line 57-59: The bare catch in warnOnStaleConvergenceOverrides is
swallowing unexpected failures, so update that catch block to log the error at
debug level before returning undefined. Use the existing function name to locate
the block, add a debug-capable logger import from `@pnpm/logger` alongside
globalWarn, and include enough context in the message to identify the
stale-convergence check while still preserving the current behavior of
suppressing the warning.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 24245b85-8ed9-4d56-90ee-91122527848c
⛔ Files ignored due to path filters (2)
Cargo.lockis excluded by!**/*.lock,!Cargo.lockpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml,!pnpm-lock.yaml
📒 Files selected for processing (25)
.changeset/olive-pandas-converge.mdpacquet/crates/cli/tests/convergence_overrides.rspacquet/crates/config-parse-overrides/Cargo.tomlpacquet/crates/config-parse-overrides/src/lib.rspacquet/crates/config-parse-overrides/src/tests.rspacquet/crates/package-manager/src/dependencies_graph_to_lockfile/tests.rspacquet/crates/package-manager/src/install_with_fresh_lockfile.rspacquet/crates/package-manager/src/lib.rspacquet/crates/package-manager/src/overrides.rspacquet/crates/package-manager/src/overrides/tests.rspacquet/crates/package-manager/src/warn_on_stale_convergence_overrides.rspacquet/crates/package-manager/src/warn_on_stale_convergence_overrides/tests.rspnpm11/config/parse-overrides/package.jsonpnpm11/config/parse-overrides/src/index.tspnpm11/config/parse-overrides/test/index.tspnpm11/hooks/read-package-hook/src/createReadPackageHook.tspnpm11/hooks/read-package-hook/src/createVersionsOverrider.tspnpm11/hooks/read-package-hook/test/createVersionOverrider.test.tspnpm11/installing/deps-installer/package.jsonpnpm11/installing/deps-installer/src/install/extendInstallOptions.tspnpm11/installing/deps-installer/src/install/index.tspnpm11/installing/deps-installer/src/install/warnOnStaleConvergenceOverrides.tspnpm11/installing/deps-installer/test/install/convergenceOverrides.tspnpm11/installing/deps-installer/test/install/warnOnStaleConvergenceOverrides.test.tspnpm11/installing/deps-installer/tsconfig.json
Micro-Benchmark ResultsLinux |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12876 +/- ##
==========================================
+ Coverage 85.45% 85.49% +0.03%
==========================================
Files 474 475 +1
Lines 74555 74777 +222
==========================================
+ Hits 63714 63930 +216
- Misses 10841 10847 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Integrated-Benchmark Report (Linux)Commit: Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.0378631474399995,
"stddev": 0.10947391981656766,
"median": 4.02550788294,
"user": 3.9728242000000002,
"system": 3.3973898399999998,
"min": 3.91921735544,
"max": 4.30088396044,
"times": [
4.30088396044,
4.11215746344,
3.92663876644,
4.05611342144,
4.03060741944,
3.9624514944399998,
4.01954582744,
4.025739074440001,
3.91921735544,
4.02527669144
]
},
{
"command": "pacquet@main",
"mean": 4.099265836640001,
"stddev": 0.2148202429494948,
"median": 3.9871660779399996,
"user": 3.9133181,
"system": 3.4309911399999997,
"min": 3.88762257344,
"max": 4.50770052744,
"times": [
4.50770052744,
3.98032559044,
3.91633559244,
4.23351827044,
3.88762257344,
4.40926201344,
3.9927697734399996,
3.97043065344,
4.11313098944,
3.98156238244
]
},
{
"command": "pnpr@HEAD",
"mean": 2.15629502794,
"stddev": 0.14654271309425548,
"median": 2.1189958504399997,
"user": 2.7484557,
"system": 2.9170046399999996,
"min": 1.97042952944,
"max": 2.37644944344,
"times": [
2.08568887044,
2.37644944344,
1.99696579344,
2.31053373944,
2.05383927144,
2.1523028304399996,
1.97042952944,
2.26066157644,
2.04814121744,
2.3079380074399998
]
},
{
"command": "pnpr@main",
"mean": 2.19034627254,
"stddev": 0.14250840082421318,
"median": 2.1953275659399996,
"user": 2.7381687999999995,
"system": 2.9196586399999993,
"min": 2.0106624214399997,
"max": 2.41550521444,
"times": [
2.07141786344,
2.2588763144399997,
2.35346048544,
2.2459324604399997,
2.2967581934399997,
2.0106624214399997,
2.14472267144,
2.0620206134399997,
2.41550521444,
2.0441064874399997
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6534567625000001,
"stddev": 0.014269814160407027,
"median": 0.6531388622000001,
"user": 0.38797847999999996,
"system": 1.3337322600000001,
"min": 0.6354744077000001,
"max": 0.6747574417000001,
"times": [
0.6474359607000001,
0.6390998317000001,
0.6696616327,
0.6361889537000001,
0.6591595007000001,
0.6581012577,
0.6481764667000001,
0.6354744077000001,
0.6747574417000001,
0.6665121717000001
]
},
{
"command": "pacquet@main",
"mean": 0.6514971801,
"stddev": 0.010595180755616105,
"median": 0.6504376752000001,
"user": 0.40773117999999997,
"system": 1.31347656,
"min": 0.6398318927000001,
"max": 0.6676747717,
"times": [
0.6666738257,
0.6552196407,
0.6409897807,
0.6676747717,
0.6542889047,
0.6586509357,
0.6465864457,
0.6398867967,
0.6451688067000001,
0.6398318927000001
]
},
{
"command": "pnpr@HEAD",
"mean": 0.7255445616,
"stddev": 0.06829983067494451,
"median": 0.7066869992,
"user": 0.40539497999999996,
"system": 1.3821129600000002,
"min": 0.6943115557,
"max": 0.9189416427000001,
"times": [
0.7026622127000001,
0.6945015317000001,
0.7044903197000001,
0.6975186207,
0.7134549717,
0.7117183037,
0.7089627787,
0.7088836787,
0.6943115557,
0.9189416427000001
]
},
{
"command": "pnpr@main",
"mean": 0.7481408884000001,
"stddev": 0.10743153545786537,
"median": 0.7163105842,
"user": 0.41852178,
"system": 1.3871953599999998,
"min": 0.6919987677,
"max": 1.0498499787,
"times": [
0.7190882277,
0.6919987677,
0.7198770447,
0.7112735047000001,
0.6945227797000001,
0.7233959677,
0.7135329407000001,
0.7037482637000001,
1.0498499787,
0.7541214087
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.275913587020002,
"stddev": 0.0521735053913691,
"median": 4.26508345942,
"user": 3.8561069600000004,
"system": 3.3207106200000007,
"min": 4.22750896692,
"max": 4.40375928792,
"times": [
4.2976496849200005,
4.23940591092,
4.28229862592,
4.26625004992,
4.26391686892,
4.22750896692,
4.24801353392,
4.22829924092,
4.30203369992,
4.40375928792
]
},
{
"command": "pacquet@main",
"mean": 4.22901830202,
"stddev": 0.029684802076149257,
"median": 4.221117337420001,
"user": 3.83334656,
"system": 3.2974190200000004,
"min": 4.183357050920001,
"max": 4.28829589892,
"times": [
4.183357050920001,
4.25555239892,
4.20741040792,
4.21380634392,
4.21486135592,
4.227373318920001,
4.21260129792,
4.24791385392,
4.28829589892,
4.23901109292
]
},
{
"command": "pnpr@HEAD",
"mean": 2.1794246973200004,
"stddev": 0.14632414307465194,
"median": 2.1620871404199997,
"user": 2.58868316,
"system": 2.82721682,
"min": 2.00771719892,
"max": 2.4239457189199998,
"times": [
2.0596939229199998,
2.4239457189199998,
2.05933437692,
2.00771719892,
2.19288944892,
2.32226108392,
2.04302440092,
2.13182775292,
2.19234652792,
2.36120654092
]
},
{
"command": "pnpr@main",
"mean": 2.2345868146199996,
"stddev": 0.12792528877541667,
"median": 2.24114155092,
"user": 2.58525366,
"system": 2.85341982,
"min": 2.0498528279199997,
"max": 2.40957843092,
"times": [
2.18474210192,
2.10006099792,
2.0930127269199996,
2.20013465492,
2.0498528279199997,
2.28214844692,
2.37246300692,
2.2923390869199998,
2.36153586492,
2.40957843092
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.4337241769600002,
"stddev": 0.02074852276278727,
"median": 1.42736277086,
"user": 1.3819599,
"system": 1.7329864000000001,
"min": 1.41388630936,
"max": 1.4674890093600002,
"times": [
1.41388630936,
1.45010715636,
1.41391049136,
1.43559592336,
1.4191296183600002,
1.4155230113600001,
1.41563043336,
1.4473813553600001,
1.4674890093600002,
1.45858846136
]
},
{
"command": "pacquet@main",
"mean": 1.45474189836,
"stddev": 0.06259939641704271,
"median": 1.43614463086,
"user": 1.4010776999999999,
"system": 1.7393897999999997,
"min": 1.4044688973600001,
"max": 1.6251800973600001,
"times": [
1.6251800973600001,
1.45288497936,
1.43234030936,
1.47040960236,
1.4310910703600002,
1.4399489523600002,
1.42822233636,
1.4044688973600001,
1.4177785173600002,
1.44509422136
]
},
{
"command": "pnpr@HEAD",
"mean": 0.66596960886,
"stddev": 0.007703070603822347,
"median": 0.6645999523599999,
"user": 0.33502580000000004,
"system": 1.2872221,
"min": 0.65766717736,
"max": 0.67915254136,
"times": [
0.66017233436,
0.67915254136,
0.66866677136,
0.65766717736,
0.66078886836,
0.66841103636,
0.65881070236,
0.65898184936,
0.67483840636,
0.67220640136
]
},
{
"command": "pnpr@main",
"mean": 0.69422021456,
"stddev": 0.04586864432878466,
"median": 0.68216531536,
"user": 0.344823,
"system": 1.3095683,
"min": 0.66143211336,
"max": 0.81971959636,
"times": [
0.69086867436,
0.66819014736,
0.68084801636,
0.68348261436,
0.69953510736,
0.69620502136,
0.67352035636,
0.66840049836,
0.81971959636,
0.66143211336
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 3.04725186216,
"stddev": 0.02914068231453169,
"median": 3.04290876696,
"user": 1.7659387000000002,
"system": 1.9877433200000003,
"min": 3.00113717146,
"max": 3.10131263646,
"times": [
3.0517878124599997,
3.0320470394599996,
3.00113717146,
3.10131263646,
3.02411977446,
3.02864989846,
3.03402972146,
3.07531771146,
3.0675177584599997,
3.05659909746
]
},
{
"command": "pacquet@main",
"mean": 3.18247107746,
"stddev": 0.06603555949077071,
"median": 3.16650846896,
"user": 1.8694210999999998,
"system": 2.0705630200000003,
"min": 3.0943477854599997,
"max": 3.34462852846,
"times": [
3.0943477854599997,
3.14486522846,
3.16642155646,
3.14811585646,
3.15478209246,
3.1665953814599996,
3.1993520214599998,
3.34462852846,
3.19272332046,
3.21287900346
]
},
{
"command": "pnpr@HEAD",
"mean": 0.6882781486600001,
"stddev": 0.009715617180855889,
"median": 0.6878875859600001,
"user": 0.36239039999999995,
"system": 1.31177692,
"min": 0.6756185024600001,
"max": 0.7021676574600001,
"times": [
0.6842072644600001,
0.6792698554600001,
0.7021676574600001,
0.6915679074600001,
0.6955654034600001,
0.6826926364600001,
0.6772447894600001,
0.70051962846,
0.6756185024600001,
0.6939278414600001
]
},
{
"command": "pnpr@main",
"mean": 0.7073471988600001,
"stddev": 0.006985061909380249,
"median": 0.7072570829600001,
"user": 0.3733114,
"system": 1.3195895199999998,
"min": 0.6953596574600001,
"max": 0.7178920104600001,
"times": [
0.7099005754600001,
0.7081893294600001,
0.7035508104600001,
0.7103637904600001,
0.7178920104600001,
0.6953596574600001,
0.7063248364600001,
0.7019776154600001,
0.7025408924600001,
0.7173724704600001
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.69801330484,
"stddev": 0.013790949907907055,
"median": 0.69558718174,
"user": 0.6563249200000001,
"system": 0.15171790000000002,
"min": 0.67473887324,
"max": 0.72196266624,
"times": [
0.69451467824,
0.68980021924,
0.67473887324,
0.7016105192400001,
0.69938084924,
0.72196266624,
0.71828233824,
0.68974851624,
0.69343470324,
0.69665968524
]
},
{
"command": "pacquet@main",
"mean": 0.69373934094,
"stddev": 0.010289287315044221,
"median": 0.69183164024,
"user": 0.64820502,
"system": 0.1577845,
"min": 0.67952805524,
"max": 0.71645017924,
"times": [
0.6842748682400001,
0.67952805524,
0.69603899224,
0.69237647224,
0.70254283324,
0.69686323324,
0.68853394124,
0.68949802624,
0.69128680824,
0.71645017924
]
},
{
"command": "pnpr@HEAD",
"mean": 0.11215996423999998,
"stddev": 0.00043084686396152166,
"median": 0.11218500424,
"user": 0.02822195333333333,
"system": 0.022481541666666664,
"min": 0.11145840224,
"max": 0.11296452724,
"times": [
0.11176460224,
0.11148613324000001,
0.11289310024,
0.11215213524,
0.11225376824000001,
0.11253160624,
0.11256660824,
0.11153265224,
0.11238359324000001,
0.11165517724,
0.11224159924,
0.11215502924000001,
0.11230047824,
0.11257325324,
0.11188709124,
0.11274933424,
0.11192509324000001,
0.11193173224,
0.11210284124,
0.11238778924000001,
0.11221497924,
0.11296452724,
0.11145840224,
0.11172761524000001
]
},
{
"command": "pnpr@main",
"mean": 0.11891962124,
"stddev": 0.03178387826879172,
"median": 0.11220972674000002,
"user": 0.029020578333333335,
"system": 0.021691124999999995,
"min": 0.11094498924,
"max": 0.26793220124,
"times": [
0.11094498924,
0.11194869924,
0.11267876324000001,
0.11224538524000001,
0.11219141424000001,
0.11222803924000001,
0.11195214424000001,
0.11305162824000001,
0.11209396724000001,
0.11173209324,
0.11214247024,
0.11257215724,
0.11170881824000001,
0.11243561224000001,
0.11233923724,
0.11247720924,
0.11178096624,
0.11189527824,
0.11253072524,
0.26793220124,
0.12002220524,
0.11139410524,
0.11151821124,
0.11225458924000001
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 6.856734658800001,
"stddev": 0.09479669794179912,
"median": 6.8408219839,
"user": 4.15740202,
"system": 3.6518167399999997,
"min": 6.727181032400001,
"max": 6.992366408400001,
"times": [
6.8969178414000005,
6.9494419674,
6.992366408400001,
6.8285410384,
6.8256800964,
6.8531029294,
6.727181032400001,
6.7665941084000005,
6.9766582734,
6.750862892400001
]
},
{
"command": "pacquet@main",
"mean": 6.8349776792,
"stddev": 0.1493698096261517,
"median": 6.7634413749,
"user": 4.084591919999999,
"system": 3.6240823399999997,
"min": 6.674078933400001,
"max": 7.1128665214,
"times": [
6.9642276964,
7.004888487400001,
7.1128665214,
6.893543713400001,
6.7456930494,
6.7452369044000005,
6.674078933400001,
6.6980689584,
6.729982827400001,
6.781189700400001
]
},
{
"command": "pnpr@HEAD",
"mean": 4.852331218800001,
"stddev": 0.04994010041457515,
"median": 4.8506681019,
"user": 2.86391522,
"system": 3.0889593399999997,
"min": 4.7951498664,
"max": 4.9536627354,
"times": [
4.858654206400001,
4.911493566400001,
4.8574858754,
4.9536627354,
4.800407728400001,
4.8438503284,
4.8038010494000005,
4.7951498664,
4.8594361014,
4.839370730400001
]
},
{
"command": "pnpr@main",
"mean": 4.9538259753,
"stddev": 0.13168804054251035,
"median": 4.949701885400001,
"user": 2.8523142200000002,
"system": 3.0824238399999997,
"min": 4.735682064400001,
"max": 5.194454604400001,
"times": [
4.8555040254,
4.955455054400001,
5.0159782494,
4.8705955294,
4.8565257784,
5.194454604400001,
5.060802665400001,
4.9439487164,
4.735682064400001,
5.049313065400001
]
}
]
} |
|
| Branch | pr/12876 |
| 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 | 2,179.42 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 688.28 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 665.97 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 112.16 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 2,156.30 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 4,852.33 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 725.54 ms |
|
Code review by qodo was updated up to the latest commit 44a1f75 |
PR Code Suggestions ✨Warning
|
|||||||||
Implements the empty-range override selector from #12794 in both stacks. "form-data@": "4.0.6" rewrites a dependency edge to exactly 4.0.6 iff 4.0.6 satisfies the edge's declared range, so compatible consumers converge while incompatible ones keep their own resolution — semver-safe by construction, unlike a bare override, and future-proof against new compatible dependents, unlike a range-scoped one. Design decisions: - The value must be an exact version (ERR_PNPM_INVALID_CONVERGENCE_OVERRIDE otherwise): a range value would make "satisfies" ill-defined (issue open question 4). - Empty ranges are rejected inside parent>child selectors, reserving that design space until precedence there is settled (open question 5, first half); when "pkg" or "pkg@range" and "pkg@" both match an edge, the explicit override wins. - Satisfies checks use loose semver, matching the npm picker; workspace:, catalog:, npm:, git/URL, and dist-tag specifiers are skipped ("satisfies" is only defined against a semver range — open question 3). - Staleness detection (lifecycle rule 3 of the issue) ships with the syntax: after a full resolution — the only time the versions overrider has seen every manifest, so the collected declared-range set is complete — each convergence entry resolves every declared range against the cached registry metadata (release-age policy applied), and if a version newer than the value satisfies every declared range, install warns with that concrete replacement value. Partial resolutions stay silent to avoid false positives from unseen ranges; failed range resolutions can only suppress the warning, never fabricate one. - An empty range previously slipped through parsing and behaved like a bare override; that undocumented accident is replaced by validation and the converge semantics. pacquet mirrors the TS behavior byte-for-byte: same error code and messages, same warning text emitted on the pnpm:global warn channel the shared default reporter renders, same precedence and skip rules, with matching test coverage (parser, overrider, staleness unit tests, and mocked-registry e2e asserting the exact warning on stdout). Deferred follow-ups from the issue's lifecycle plan: pnpm update / pnpm dedupe refreshing and pruning managed entries (rules 1-2) and pnpm outdated listing stale entries (rule 4). Related to #12794. Co-Authored-By: Claude Fable 5 <[email protected]>
Raw strings for the stale-convergence warning literals and trailing commas in multi-line macro invocations, as required by the dylint perfectionist lints the pre-push hook enforces. Co-Authored-By: Claude Fable 5 <[email protected]>
meta-updater adds the config/version-policy reference introduced by the convergence-override staleness check. Co-Authored-By: Claude Fable 5 <[email protected]>
Summary
Implements the convergence override selector proposed in #12794, in both stacks (Related to #12794 — the lifecycle follow-ups below remain open).
A new override selector form with an empty range —
"pkg@": "<exact version>"— applies the override to a dependency edgepkg@Riff the version satisfiesR: compatible consumers converge on the version, incompatible consumers keep their own resolution, and dependents added later are governed automatically. This is semver-safe by construction (unlike a bare override) and future-proof (unlike range-scoped overrides, which silently stop covering new compatible ranges).What lands here:
"pkg@"selectors are recognized as convergence overrides; the value must be an exact version, and empty ranges inparent>childselectors are rejected (bothERR_PNPM_INVALID_CONVERGENCE_OVERRIDE). An empty range previously slipped through undocumented and behaved like a bare override."pkg"/"pkg@range"overrides win over"pkg@";workspace:,catalog:,npm:, git/URL, and dist-tag specifiers are skipped.Deferred follow-ups from the issue's lifecycle plan (called out per the sync rule):
pnpm update/pnpm deduperefreshing and pruning managed entries (rules 1–2), andpnpm outdatedlisting stale entries (rule 4). Documentation for pnpm.io also still needs a PR.Verified end-to-end with the bundled CLI against the live registry: converge applied below latest, stale warning with exact recommendation, fresh value silent, incompatible edge untouched. Test suites run: parse-overrides (15), read-package-hook (37), deps-installer new + overrides/dedupe/peer regression suites, peers-checker, deps-status; pacquet: config-parse-overrides (17), package-manager (694), targeted CLI integration suites (68) incl. byte-exact warning assertions; clippy/dylint/fmt/doc clean.
Squash Commit Body
Checklist
pacquet/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 (Claude Code, claude-fable-5) on behalf of zkochan.
🤖 Generated with Claude Code
Summary by CodeRabbit
pkg@to coordinate compatible dependency resolutions.parent>childselectors can’t use empty ranges.