Repository navigation
fix(update): respect overrides during no-save updates - #15261
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pnpm/pnpm/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe update pipeline detects direct dependencies affected by selector overrides. No-save rewrites preserve effective override specifiers, skip incompatible or removed requests, and avoid conflicting lockfile changes. Unit and CLI tests cover these behaviors. ChangesOverride-aware update flow
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant User
participant UpdateCommand
participant UpdateScope
participant Rewrite
participant Lockfile
User->>UpdateCommand: run update --no-save
UpdateCommand->>UpdateScope: collect overridden direct dependencies
UpdateScope-->>Rewrite: provide effective specifiers
Rewrite->>Lockfile: preserve compatible importer and version state
Lockfile-->>User: frozen-lockfile remains valid
Assessment against linked issues
Suggested labels: Suggested reviewers: Merge Risk: ⚪ Minimal · up to This change preserves selector overrides during no-save updates, preventing incompatible lockfiles and maintaining frozen-install compatibility. No actionable merge-blocking risk is identified. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15261 +/- ##
========================================
Coverage 91.52% 91.53%
========================================
Files 1381 1381
Lines 185685 185800 +115
========================================
+ Hits 169942 170064 +122
+ Misses 15743 15736 -7 ☔ 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.3977796739999997,
"stddev": 0.10379273945987152,
"median": 2.3842450611,
"user": 1.41996286,
"system": 1.5674743,
"min": 2.2907924206,
"max": 2.6148688016
},
{
"command": "pacquet@main",
"mean": 2.4061106763,
"stddev": 0.13304236977166173,
"median": 2.3995158991,
"user": 1.35023926,
"system": 1.4529155000000002,
"min": 2.2363072766,
"max": 2.6262963336
},
{
"command": "pnpr@HEAD",
"mean": 1.3725102417,
"stddev": 0.12435244474954153,
"median": 1.3033296441,
"user": 1.15283916,
"system": 1.2504974000000002,
"min": 1.2755345586,
"max": 1.5854454626
},
{
"command": "pnpr@main",
"mean": 1.4271792455,
"stddev": 0.11237191217987479,
"median": 1.3801625291000001,
"user": 1.2557491600000001,
"system": 1.3756881,
"min": 1.2959892746,
"max": 1.5850649566000001
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
Confirmation (reversed target order)
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.37171491320000005,
"stddev": 0.0457714481334078,
"median": 0.3616490714,
"user": 0.42569742,
"system": 0.76672828,
"min": 0.3135363504,
"max": 0.43516635740000004
},
{
"command": "pacquet@main",
"mean": 0.2721459951,
"stddev": 0.007275320101011821,
"median": 0.2733658249,
"user": 0.29971952,
"system": 0.64791808,
"min": 0.26031180740000004,
"max": 0.2833666564
},
{
"command": "pnpr@HEAD",
"mean": 0.2924185322,
"stddev": 0.02746539245354286,
"median": 0.2842493139,
"user": 0.29277152,
"system": 0.6371622799999999,
"min": 0.2586983974,
"max": 0.3454106364
},
{
"command": "pnpr@main",
"mean": 0.308133987,
"stddev": 0.028390135649087846,
"median": 0.30382556790000004,
"user": 0.33004322,
"system": 0.64594318,
"min": 0.2866216914,
"max": 0.3812715324
}
],
"confirmation": {
"results": [
{
"command": "pnpr@main",
"mean": 0.33689343528000004,
"stddev": 0.03488100892153916,
"median": 0.32596021158,
"user": 0.35432698,
"system": 0.7003951199999999,
"min": 0.29653697008,
"max": 0.40712877808000003
},
{
"command": "pnpr@HEAD",
"mean": 0.35134915368,
"stddev": 0.04021297535369648,
"median": 0.35005297058,
"user": 0.38039728,
"system": 0.7066474199999999,
"min": 0.30311692108,
"max": 0.42648112108
},
{
"command": "pacquet@main",
"mean": 0.26966388678,
"stddev": 0.017052725220064277,
"median": 0.27261360458,
"user": 0.30382198,
"system": 0.61805702,
"min": 0.24413867808,
"max": 0.29677880508
},
{
"command": "pacquet@HEAD",
"mean": 0.28431565318,
"stddev": 0.0341305861832141,
"median": 0.27184636058,
"user": 0.30819488,
"system": 0.65754052,
"min": 0.25516585308,
"max": 0.37148488808
}
]
}
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.013109931126451622,
"stddev": 0.003688197106481353,
"median": 0.011548138820000001,
"user": 0.00793392946236559,
"system": 0.005999704623655913,
"min": 0.007775366319999999,
"max": 0.02389346032
},
{
"command": "pacquet@main",
"mean": 0.011939159597566536,
"stddev": 0.0025536524458549007,
"median": 0.01139466532,
"user": 0.0070491674524714824,
"system": 0.005724501977186309,
"min": 0.00752698932,
"max": 0.024072916320000002
},
{
"command": "pnpr@HEAD",
"mean": 0.009838080329554138,
"stddev": 0.00160559929748447,
"median": 0.00950808032,
"user": 0.005890787006369429,
"system": 0.004640447070063697,
"min": 0.007171019319999999,
"max": 0.01674234532
},
{
"command": "pnpr@main",
"mean": 0.010134871687346938,
"stddev": 0.0020053141611557426,
"median": 0.00967963832,
"user": 0.005859094344023322,
"system": 0.004991911253644314,
"min": 0.00722173532,
"max": 0.017956790320000002
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.010699414856190474,
"stddev": 0.0011244287061683502,
"median": 0.010620602780000002,
"user": 0.006189540952380947,
"system": 0.005220237333333332,
"min": 0.00796563278,
"max": 0.013473392780000001
},
{
"command": "pacquet@main",
"mean": 0.010835484153786414,
"stddev": 0.0011357865366366491,
"median": 0.010661302780000001,
"user": 0.006043559999999998,
"system": 0.005538155339805826,
"min": 0.008631511780000002,
"max": 0.014198895780000002
},
{
"command": "pnpr@HEAD",
"mean": 0.01066034680904565,
"stddev": 0.0009775459505244046,
"median": 0.010582817780000002,
"user": 0.006368804813278008,
"system": 0.005012381078838177,
"min": 0.007928162780000001,
"max": 0.013769661780000001
},
{
"command": "pnpr@main",
"mean": 0.011271952087692303,
"stddev": 0.001135892532662362,
"median": 0.011116781780000001,
"user": 0.006625873186813186,
"system": 0.00542097164835165,
"min": 0.009108581780000001,
"max": 0.014976550780000002
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.5781191676599997,
"stddev": 0.04923201445484999,
"median": 2.56647007846,
"user": 2.1371938399999997,
"system": 2.06913126,
"min": 2.5385271714599997,
"max": 2.71239872746
},
{
"command": "pacquet@main",
"mean": 2.58103782346,
"stddev": 0.021029662223301823,
"median": 2.57576051996,
"user": 2.14578094,
"system": 2.06102556,
"min": 2.55178337746,
"max": 2.60877843646
},
{
"command": "pnpr@HEAD",
"mean": 1.58451849176,
"stddev": 0.11246863795515526,
"median": 1.58599310696,
"user": 1.3967293399999998,
"system": 1.76329946,
"min": 1.46150648946,
"max": 1.7309592034599999
},
{
"command": "pnpr@main",
"mean": 1.5984435750600001,
"stddev": 0.13967968279803183,
"median": 1.5978361319599999,
"user": 1.3949278400000003,
"system": 1.81413066,
"min": 1.43803333846,
"max": 1.8053166644599998
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.46717030664000003,
"stddev": 0.033384218594417654,
"median": 0.4743173284400001,
"user": 0.7562785200000001,
"system": 0.9823892800000001,
"min": 0.41046734744,
"max": 0.50715632844
},
{
"command": "pacquet@main",
"mean": 0.48097973874000005,
"stddev": 0.06664594445470576,
"median": 0.46762462694000007,
"user": 0.79155312,
"system": 1.00501438,
"min": 0.40092790744,
"max": 0.6490053984399999
},
{
"command": "pnpr@HEAD",
"mean": 0.33008241594,
"stddev": 0.022832793928318853,
"median": 0.32545617994,
"user": 0.26792982000000004,
"system": 0.6188970800000001,
"min": 0.30069759644000005,
"max": 0.37658665244
},
{
"command": "pnpr@main",
"mean": 0.34315459884,
"stddev": 0.0321511378115904,
"median": 0.33659022894,
"user": 0.28739082,
"system": 0.6212038800000002,
"min": 0.31833675144,
"max": 0.42991400744
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.7365949932600002,
"stddev": 0.18159101430688843,
"median": 1.6345864897600002,
"user": 1.13014886,
"system": 1.1126393,
"min": 1.59503030776,
"max": 2.0610755037599997
},
{
"command": "pacquet@main",
"mean": 1.8933582788600003,
"stddev": 0.15718401602848048,
"median": 1.8521296832600003,
"user": 1.4490295599999998,
"system": 1.3196697000000002,
"min": 1.7111424807600002,
"max": 2.1820038027599997
},
{
"command": "pnpr@HEAD",
"mean": 0.29101133956,
"stddev": 0.02083251441728373,
"median": 0.28935429476,
"user": 0.24249685999999998,
"system": 0.5292512,
"min": 0.26661280576,
"max": 0.33709793476000005
},
{
"command": "pnpr@main",
"mean": 0.36210179366000006,
"stddev": 0.02681631966418704,
"median": 0.35002753626000005,
"user": 0.32996195999999994,
"system": 0.6693577999999999,
"min": 0.33081305876000006,
"max": 0.41491966576000006
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2343253411733334,
"stddev": 0.01181328956025196,
"median": 0.23675148134000001,
"user": 0.2518090966666666,
"system": 0.08725402333333332,
"min": 0.21244213134,
"max": 0.24968502834000003
},
{
"command": "pacquet@main",
"mean": 0.23783213597636366,
"stddev": 0.00794674259673204,
"median": 0.24079478034000001,
"user": 0.26707963454545447,
"system": 0.07393189454545455,
"min": 0.22263604034,
"max": 0.24719386634
},
{
"command": "pnpr@HEAD",
"mean": 0.09490401148285717,
"stddev": 0.0034373541685352796,
"median": 0.09412751534,
"user": 0.03696214428571428,
"system": 0.013613011428571426,
"min": 0.08890366434000001,
"max": 0.10240580634
},
{
"command": "pnpr@main",
"mean": 0.09588731140451612,
"stddev": 0.004238599447973438,
"median": 0.09411128534,
"user": 0.0377034058064516,
"system": 0.014689171612903227,
"min": 0.09068025534,
"max": 0.10400740634000001
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.8028847160200001,
"stddev": 0.1358056987440454,
"median": 0.8708310990200001,
"user": 0.8084152488888887,
"system": 0.25333212222222223,
"min": 0.62439950602,
"max": 0.9711821100200001
},
{
"command": "pacquet@main",
"mean": 0.7262564485755556,
"stddev": 0.14521466059726237,
"median": 0.7355560820200001,
"user": 0.7417680266666665,
"system": 0.19681034444444445,
"min": 0.46590543402000006,
"max": 0.8740212420200001
},
{
"command": "pnpm@HEAD",
"mean": 3.348318643242222,
"stddev": 0.10884384184732335,
"median": 3.36896363302,
"user": 4.874501137777778,
"system": 0.3053326777777778,
"min": 3.18341623902,
"max": 3.50377494402
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.19232727118000004,
"stddev": 0.014385277596804295,
"median": 0.18915313418000002,
"user": 0.141367375,
"system": 0.09442143,
"min": 0.17829685268000003,
"max": 0.22346198468000003
},
{
"command": "pacquet@main",
"mean": 0.17311651618000004,
"stddev": 0.003996198349019695,
"median": 0.17263044418,
"user": 0.1332556875,
"system": 0.07274105499999999,
"min": 0.16794777268000002,
"max": 0.18439997468000002
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.56276775368,
"stddev": 0.15600607594349625,
"median": 4.589265317480001,
"user": 1.8417445799999996,
"system": 2.11476448,
"min": 4.38024713598,
"max": 4.85448574098
},
{
"command": "pacquet@main",
"mean": 4.52334023588,
"stddev": 0.17920408381916,
"median": 4.44914279448,
"user": 1.6957489799999999,
"system": 2.0109357799999996,
"min": 4.33694842798,
"max": 4.8045003169800005
},
{
"command": "pnpr@HEAD",
"mean": 3.52436293428,
"stddev": 0.10094837117387194,
"median": 3.4836335534800003,
"user": 1.6270432799999999,
"system": 1.8943490800000002,
"min": 3.43806434698,
"max": 3.7330040399800004
},
{
"command": "pnpr@main",
"mean": 3.56399470518,
"stddev": 0.11985149508222226,
"median": 3.52395539948,
"user": 1.7090054799999996,
"system": 1.9952865799999997,
"min": 3.42714162198,
"max": 3.8195656279800003
}
]
}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.1298058331,
"stddev": 0.00573318609979615,
"median": 0.1304381645,
"user": 0.14888758000000002,
"system": 0.14431049,
"min": 0.11967722150000001,
"max": 0.14034141049999999
},
{
"command": "pacquet@main",
"mean": 0.1545818602692308,
"stddev": 0.019052316548820634,
"median": 0.1515955765,
"user": 0.18955300307692308,
"system": 0.15546557846153847,
"min": 0.12220498850000001,
"max": 0.2008587925
},
{
"command": "pnpr@HEAD",
"mean": 0.16129079621428571,
"stddev": 0.016579466567162915,
"median": 0.158489124,
"user": 0.19250765142857137,
"system": 0.14664282571428575,
"min": 0.1359946825,
"max": 0.1930929125
},
{
"command": "pnpr@main",
"mean": 0.1499575453125,
"stddev": 0.01103828342863286,
"median": 0.151337052,
"user": 0.1743147675,
"system": 0.14994703999999998,
"min": 0.1301436875,
"max": 0.16640410249999998
}
]
} |
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
6266bc5 to
ec9e45c
Compare
Code Review by Qodo
1. Repositories can forge terminal warnings
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
1 similar comment
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Plan versioned no-save updates against effective override specifiers while preserving the original declarations used to match range-scoped overrides. Skip excluded or removed dependencies without recording preferred versions. Add CLI and unit regressions for override ownership, dependency removal, and skipped update seeds. Closes pnpm#14923.
1b27e33 to
0fd83b6
Compare
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
Code review by qodo was updated up to the latest commit 0fd83b6 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Congrats on merging your first pull request! 🎉🎉🎉 |
Determine override ownership and effective dependency specifiers before planning a no-save update, using the existing override parser and VersionsOverrider. Keep the original declaration unchanged so a range-scoped override remains applicable during resolution. Reject concrete versions excluded by the effective range, keep removed dependencies out of the update, and avoid recording preferred-version seeds for skipped requests. Other override-owned requests retain the override's specifier, matching the current v11 read-only handling. Add CLI regressions for pinned and removal overrides, and unit coverage for preserved declarations and empty seeds after a skipped request. Make the engine-check fixtures probe Node with the same working directory and shim configuration as the command under test. Closes pnpm#14923. --------- Co-authored-by: waltu <[email protected]> Co-authored-by: Zoltan Kochan <[email protected]>
Summary
Versioned
pnpm update --no-saverequests now respect the override that applies to the original dependency declaration. A request excluded by the effective range is skipped; an override-owned declaration is preserved, including overrides that remove a dependency.For the reproduction in #14923, an override pins
semverto7.5.0, but requesting7.6.0produced a lockfile with specifier7.5.0and version7.6.0. This change keeps both at7.5.0, and the subsequent frozen install succeeds.Closes #14923.
Two existing validation issues are also corrected: a public rustdoc link to a private filesystem helper, and engine-check fixtures that probed Node with a different working directory or shim configuration than the command under test. They blocked the required documentation and coverage checks respectively.
Validation
pnpm test:rust -p pnpm-cli -p pnpm-package-manager -E 'test(update::)').install_root_enginetests passed.echo/trueexecutables in the local test PATH and pass after correcting it. The remaining six also fail with the original production files restored: five symlink-related tests on this non-elevated Windows environment and the concurrent global-store junction test. No tests were disabled or changed to tolerate these failures.Squash Commit Body
Checklist
pacquetpackage.Written by an agent (Codex, GPT-6 Astra).
Summary by CodeRabbit
Bug Fixes
pnpm update --no-saveto respect version-scoped overrides in dependency selectors.pnpm install --frozen-lockfileoperations.Tests