Repository navigation
feat: absorb a parent-scoped override into the fast lockfile update - #13797
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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughFast override updates now resolve compatible semver ranges from locked versions and support parent-scoped replacements in the Rust and TypeScript paths. The changes include selective dependency rewrites, graph pruning, and coverage for shared dependencies. ChangesFast override lockfile updates
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Installer
participant OverrideProcessor
participant Lockfile
participant Tests
Installer->>OverrideProcessor: pass lockfile and override configuration
OverrideProcessor->>Lockfile: select highest compatible locked version
OverrideProcessor->>Lockfile: repoint matching parent dependency edges
Lockfile-->>Installer: updated package graph
Tests->>Lockfile: verify retained and pruned package entries
Assessment against linked issues
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 |
PR Summary by QodoFast lockfile rewrite: support range + parent-scoped overrides without full resolve
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
A parent-scoped override (parent>child) bailed to the resolver in both stacks unless it was a removal. Measured what a full resolution does with one: only the named parent's edge moves, the other dependents keep the version they had, and the version left behind is pruned when nothing reaches it any more. That is expressible. The plan already inserts the new version alongside the old and leaves reachability to the shared prune, so the old key survives on its own whenever another dependent still points at it. What was missing is that the repoint ignored the selector's parent and moved every edge; it now consults the same predicate parent-scoped removals already use, extracted so both share it. Importer edges keep the exit removals take there, since a parent selector never names an importer. Closes #13795.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (2): Last reviewed commit: "test: assert the parent-scoped rewrite, ..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pnpm/crates/package-manager/src/fast_update_overrides.rs (1)
545-552: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winHonor the parent selector when rebuilding replacement dependencies.
Line 551 rewrites every matching old key in this path. For a
parent>targetoverride,parent_keycan name the replacement package instead ofparent. This can rewrite an unrelatedtargetedge and violate the scoped-override contract.Gate this assignment with
should_replace_dependency(&name, Some(parent_key), &plan.overrides), asrewrite_snapshot_dependency_mapalready does.Proposed fix
if let Some(old_key) = dep_ref.resolve(&name) && let Some(new_key) = plan.replacements.get(&old_key) + && should_replace_dependency(&name, Some(parent_key), &plan.overrides) { dep_ref = SnapshotDepRef::Plain(new_key.suffix.clone()); }As per path instructions, pacquet and the TypeScript CLI must remain behaviorally identical for lockfile behavior.
🤖 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/package-manager/src/fast_update_overrides.rs` around lines 545 - 552, In the replacement-dependency rebuild around `SnapshotDepRef::resolve`, guard the `dep_ref = SnapshotDepRef::Plain(...)` assignment with `should_replace_dependency(&name, Some(parent_key), &plan.overrides)`, matching `rewrite_snapshot_dependency_map`. Preserve unscoped replacement behavior while preventing parent-scoped overrides from rewriting unrelated target edges, and keep pacquet and the TypeScript CLI lockfile behavior identical.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.
Inline comments:
In `@pnpm11/installing/deps-installer/test/install/overrideRangeFastUpdate.ts`:
- Around line 110-129: The test around tryFastUpdateOverrides must complete
successfully and assert the rewritten lockfile for parent-scoped overrides.
Replace the requestPackage rejection with successful resolution fixtures, then
verify parent uses [email protected], other remains on [email protected], and the old
target version is pruned when unreachable; cover both shared-dependent and
sole-dependent cases, and remove the historical assertion comment.
---
Outside diff comments:
In `@pnpm/crates/package-manager/src/fast_update_overrides.rs`:
- Around line 545-552: In the replacement-dependency rebuild around
`SnapshotDepRef::resolve`, guard the `dep_ref = SnapshotDepRef::Plain(...)`
assignment with `should_replace_dependency(&name, Some(parent_key),
&plan.overrides)`, matching `rewrite_snapshot_dependency_map`. Preserve unscoped
replacement behavior while preventing parent-scoped overrides from rewriting
unrelated target edges, and keep pacquet and the TypeScript CLI lockfile
behavior identical.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 76e1e357-b889-45fa-ab0c-c33148e611b4
📒 Files selected for processing (8)
.changeset/override-range-fast-update.md.changeset/parent-scoped-overrides.mdpnpm/crates/package-manager/src/fast_update_importers.rspnpm/crates/package-manager/src/fast_update_importers/tests.rspnpm/crates/package-manager/src/fast_update_overrides.rspnpm/crates/package-manager/src/fast_update_overrides/tests.rspnpm11/installing/deps-installer/src/install/tryFastUpdateOverrides.tspnpm11/installing/deps-installer/test/install/overrideRangeFastUpdate.ts
8931c79 to
ac06fb4
Compare
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
The TypeScript test stopped at the resolution step, so it proved only that the parent-scoped form no longer bails — it never checked what the rewrite produced, while the pacquet tests did. It now resolves through a stub and asserts the same two outcomes: the named parent moves to the new version while the other dependent stays put and both survive, and the version left behind is pruned when nothing else holds it.
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Micro-Benchmark ResultsLinux |
Code Review by Qodo
1. rewriteReference has 4 params
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13797 +/- ##
==========================================
- Coverage 88.23% 88.23% -0.01%
==========================================
Files 624 624
Lines 101779 101798 +19
==========================================
+ Hits 89809 89819 +10
- Misses 11970 11979 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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. 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.5543600944,
"stddev": 0.17419670433355894,
"median": 2.5235488055,
"user": 1.7442681399999997,
"system": 1.4103818199999998,
"min": 2.3439924320000003,
"max": 2.783331279,
"times": [
2.372167567,
2.749211398,
2.4527148480000003,
2.7345591320000002,
2.3439924320000003,
2.370428131,
2.690098546,
2.783331279,
2.459132553,
2.587965058
]
},
{
"command": "pacquet@main",
"mean": 2.4940958201,
"stddev": 0.09952753805763632,
"median": 2.4796953245,
"user": 1.7938792399999997,
"system": 1.3990373199999997,
"min": 2.3646094460000002,
"max": 2.677006244,
"times": [
2.5074309550000002,
2.413428413,
2.451959694,
2.6173794150000003,
2.677006244,
2.553268568,
2.509991165,
2.4493003890000002,
2.396583912,
2.3646094460000002
]
},
{
"command": "pnpr@HEAD",
"mean": 1.6327352836000002,
"stddev": 0.20838000849272403,
"median": 1.642477101,
"user": 1.20675314,
"system": 1.1704952199999998,
"min": 1.3561628860000001,
"max": 1.9458710220000002,
"times": [
1.9458710220000002,
1.4124851170000001,
1.7232225650000002,
1.7927662070000001,
1.3561628860000001,
1.858928181,
1.394712575,
1.538368844,
1.7431038020000003,
1.561731637
]
},
{
"command": "pnpr@main",
"mean": 1.4914352358,
"stddev": 0.12478599074657605,
"median": 1.4357677945,
"user": 1.1479911399999998,
"system": 1.1698117199999998,
"min": 1.363978257,
"max": 1.7109457860000001,
"times": [
1.4108257990000002,
1.3944548390000002,
1.5314588750000002,
1.418009104,
1.453526485,
1.3859506060000002,
1.363978257,
1.7109457860000001,
1.676657783,
1.568544824
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.27831394789999997,
"stddev": 0.007852197615230348,
"median": 0.2768156465,
"user": 0.23238437999999997,
"system": 0.5510115,
"min": 0.26685056700000004,
"max": 0.288593064,
"times": [
0.27473970200000003,
0.275373237,
0.28648795600000004,
0.26685056700000004,
0.26786550000000003,
0.288259545,
0.281635766,
0.288593064,
0.275076086,
0.27825805600000003
]
},
{
"command": "pacquet@main",
"mean": 0.27973639060000005,
"stddev": 0.02754149037342047,
"median": 0.277912673,
"user": 0.25912208,
"system": 0.5261465999999999,
"min": 0.245149472,
"max": 0.33416517300000004,
"times": [
0.28506287,
0.30774596800000004,
0.27096753300000004,
0.29551539800000004,
0.284857813,
0.25810198500000003,
0.26427242900000003,
0.245149472,
0.251525265,
0.33416517300000004
]
},
{
"command": "pnpr@HEAD",
"mean": 0.31882983630000006,
"stddev": 0.03334828023791243,
"median": 0.310960079,
"user": 0.28978958,
"system": 0.5824449999999999,
"min": 0.27387912200000003,
"max": 0.375389701,
"times": [
0.30478173000000003,
0.301136236,
0.317138428,
0.375389701,
0.37185987600000003,
0.322887207,
0.332767847,
0.29885535500000004,
0.27387912200000003,
0.28960286100000004
]
},
{
"command": "pnpr@main",
"mean": 0.2936646955,
"stddev": 0.017285404064300142,
"median": 0.2894240625,
"user": 0.24342608000000004,
"system": 0.5567388,
"min": 0.27045383500000003,
"max": 0.32153322500000003,
"times": [
0.27045383500000003,
0.276114897,
0.284541798,
0.28710172300000003,
0.299808954,
0.302889892,
0.282540875,
0.31991535400000004,
0.291746402,
0.32153322500000003
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.6860237871200003,
"stddev": 0.036761909718584326,
"median": 2.6867202605200005,
"user": 1.8028075600000002,
"system": 1.50298618,
"min": 2.63803509902,
"max": 2.76694013002,
"times": [
2.7003537300200002,
2.76694013002,
2.6784148450200003,
2.6795732200200004,
2.69386730102,
2.6534117310200003,
2.69742750302,
2.7039991750200003,
2.63803509902,
2.64821513702
]
},
{
"command": "pacquet@main",
"mean": 2.6641573023200005,
"stddev": 0.04064641248052928,
"median": 2.66864434752,
"user": 1.80812526,
"system": 1.4298483800000001,
"min": 2.61417427902,
"max": 2.74318164702,
"times": [
2.74318164702,
2.6862012940200004,
2.6972238490200002,
2.65217518302,
2.6745792880200003,
2.6163910500200003,
2.66343757002,
2.61417427902,
2.67385112502,
2.62035773802
]
},
{
"command": "pnpr@HEAD",
"mean": 1.63357369202,
"stddev": 0.14447184887462874,
"median": 1.6292684260199999,
"user": 1.24704756,
"system": 1.3443213799999998,
"min": 1.45901001002,
"max": 1.86995518202,
"times": [
1.82420145902,
1.73661412302,
1.6764846820200001,
1.65260174902,
1.60593510302,
1.48145048302,
1.86995518202,
1.45901001002,
1.50490899602,
1.5245751330200001
]
},
{
"command": "pnpr@main",
"mean": 1.6650132295200002,
"stddev": 0.10355553481010672,
"median": 1.61659246152,
"user": 1.38185346,
"system": 1.44515868,
"min": 1.55213426002,
"max": 1.86881572602,
"times": [
1.55213426002,
1.7419150840200002,
1.61593384502,
1.60776705102,
1.86881572602,
1.58131712202,
1.66373944102,
1.60364503002,
1.61725107802,
1.7976136580200002
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.50631853484,
"stddev": 0.03461894889249712,
"median": 0.50822716964,
"user": 0.68915668,
"system": 0.8011041399999999,
"min": 0.46715794814,
"max": 0.58678369714,
"times": [
0.49087446314000005,
0.46715794814,
0.52959896114,
0.50946814314,
0.47151234614000004,
0.58678369714,
0.51212607414,
0.50787893714,
0.47920937614000003,
0.5085754021400001
]
},
{
"command": "pacquet@main",
"mean": 0.49984494524,
"stddev": 0.012953823649335137,
"median": 0.50409498064,
"user": 0.69871818,
"system": 0.77313984,
"min": 0.47562334614,
"max": 0.51638477214,
"times": [
0.50535659414,
0.49355968614,
0.48892190414000003,
0.48835883214000003,
0.51638477214,
0.50589553014,
0.5060080421400001,
0.50283336714,
0.51550737814,
0.47562334614
]
},
{
"command": "pnpr@HEAD",
"mean": 0.35851449734,
"stddev": 0.00872947866097982,
"median": 0.35890879464000003,
"user": 0.26860158,
"system": 0.6145335399999999,
"min": 0.34274554614,
"max": 0.37426175514000004,
"times": [
0.36218657514,
0.34274554614,
0.35531089214,
0.35379115814,
0.35960583814,
0.35821175114000003,
0.37426175514000004,
0.36589647614000004,
0.35025151514,
0.36288346614
]
},
{
"command": "pnpr@main",
"mean": 0.35675261523999996,
"stddev": 0.014814332985546977,
"median": 0.35830951514000003,
"user": 0.27765578,
"system": 0.60069954,
"min": 0.33532084014,
"max": 0.38037238414,
"times": [
0.34481314314,
0.33959489714,
0.33532084014,
0.37601917914000005,
0.34926463514,
0.36071602214000004,
0.35590300814000003,
0.38037238414,
0.36116027914000004,
0.36436176414000004
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.8486658336200001,
"stddev": 0.03038338933825285,
"median": 1.8443127817200002,
"user": 0.9679795599999999,
"system": 0.8992142999999999,
"min": 1.7991001477200002,
"max": 1.8884528707200001,
"times": [
1.87892431072,
1.8400155767200002,
1.8876495367200001,
1.84860998672,
1.8341320947200002,
1.83142247772,
1.86230317872,
1.8884528707200001,
1.8160481557200001,
1.7991001477200002
]
},
{
"command": "pacquet@main",
"mean": 1.8272021063200001,
"stddev": 0.02492986736562671,
"median": 1.8226288102200001,
"user": 0.97516196,
"system": 0.9054871,
"min": 1.78611461072,
"max": 1.86408859372,
"times": [
1.85970264572,
1.86408859372,
1.81266844572,
1.8498179137200002,
1.8327603097200003,
1.8138447717200001,
1.81149826972,
1.83141284872,
1.78611461072,
1.81011265372
]
},
{
"command": "pnpr@HEAD",
"mean": 0.33775176832000003,
"stddev": 0.007058959512674958,
"median": 0.33671521472,
"user": 0.22769275999999997,
"system": 0.6053336,
"min": 0.32515339072,
"max": 0.34669749972,
"times": [
0.34548404072,
0.33324656972,
0.34669749972,
0.34565557572,
0.33408872572000003,
0.34187352472,
0.32515339072,
0.33638381472,
0.33704661472,
0.33188792672
]
},
{
"command": "pnpr@main",
"mean": 0.34459641741999997,
"stddev": 0.015886173494397055,
"median": 0.34526672222,
"user": 0.23666026,
"system": 0.6270143999999999,
"min": 0.32136270372000003,
"max": 0.36442201872,
"times": [
0.35641542172,
0.36442201872,
0.35906979672,
0.36334496772,
0.34784807972000004,
0.32136270372000003,
0.33193227072000003,
0.34268536472,
0.32805135372,
0.33083219672
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2454791817366667,
"stddev": 0.015799552949004127,
"median": 0.24064275382,
"user": 0.2222940766666667,
"system": 0.06327845666666666,
"min": 0.22307417532,
"max": 0.27620874532000006,
"times": [
0.23170100032000002,
0.23473519032,
0.24481710932,
0.24243172132000002,
0.23754144232000002,
0.26122523532,
0.27620874532000006,
0.23885378632,
0.24837880432,
0.22307417532,
0.23764127032000001,
0.26914170032000007
]
},
{
"command": "pacquet@main",
"mean": 0.2417246924109091,
"stddev": 0.01098191418406938,
"median": 0.23960205632,
"user": 0.2122738418181818,
"system": 0.06332635818181818,
"min": 0.22898188332,
"max": 0.26078835132000006,
"times": [
0.25309473632,
0.24541501632,
0.24642162432,
0.23881419232,
0.23119941432000002,
0.22915308632,
0.26078835132000006,
0.23960205632,
0.25350600132000006,
0.23199525432,
0.22898188332
]
},
{
"command": "pnpr@HEAD",
"mean": 0.09184890902967743,
"stddev": 0.0016658956876101656,
"median": 0.09188370732,
"user": 0.02311378903225806,
"system": 0.011298264516129029,
"min": 0.08762846432,
"max": 0.09532023732,
"times": [
0.09060285232,
0.09316816932,
0.08985139632,
0.09162884832,
0.09186133532,
0.09119413732,
0.09296289232,
0.09213254832,
0.09532023732,
0.09305201032,
0.09121940532,
0.09282452132,
0.09087181032,
0.09131047732,
0.09236205932,
0.09238455232,
0.09188370732,
0.09077906632,
0.09499901232,
0.08762846432,
0.09311596032,
0.09322850332,
0.08835039632,
0.09206602132,
0.09154013032,
0.09404675632,
0.09047143532,
0.09107697732,
0.08997204332,
0.09223143332,
0.09317901932
]
},
{
"command": "pnpr@main",
"mean": 0.0929520263533333,
"stddev": 0.002733391169298659,
"median": 0.09270632781999999,
"user": 0.02304389333333333,
"system": 0.011969188666666668,
"min": 0.08846402032,
"max": 0.09987380232,
"times": [
0.09325584532,
0.08846402032,
0.09373394632,
0.09981440032,
0.09179385832,
0.09497144932,
0.09411205932,
0.09139136932,
0.09333787932,
0.09987380232,
0.09353943932,
0.09573766332,
0.08867719132,
0.09295251332,
0.09079460532,
0.09407324632,
0.09509954132,
0.09014311632,
0.09234326432,
0.09093104232,
0.09120994832,
0.09128996832,
0.09186045332,
0.09227486532,
0.08967744832,
0.09264541332,
0.09098704732,
0.09276724232,
0.09339899532,
0.09740915532
]
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.7932404128755556,
"stddev": 0.18695511212235583,
"median": 0.71871015532,
"user": 0.7624992711111109,
"system": 0.11467857555555556,
"min": 0.62337857632,
"max": 1.18943490232,
"times": [
0.8867361623200001,
1.18943490232,
0.65428444732,
0.94534773932,
0.62337857632,
0.71871015532,
0.68547841032,
0.80182213432,
0.63397118832
]
},
{
"command": "pacquet@main",
"mean": 0.8241572759866668,
"stddev": 0.09192262645970174,
"median": 0.8192950683200001,
"user": 0.7882038266666666,
"system": 0.11631079777777775,
"min": 0.72626806432,
"max": 1.03051027532,
"times": [
0.83487996332,
0.7569632283200001,
0.75780242032,
0.8192950683200001,
0.87859736732,
0.72626806432,
0.84392523732,
0.76917385932,
1.03051027532
]
},
{
"command": "pnpm@HEAD",
"mean": 3.410191807764444,
"stddev": 0.22771369576071013,
"median": 3.50169329832,
"user": 5.1778317155555555,
"system": 0.31596568666666663,
"min": 3.02906368932,
"max": 3.76059785932,
"times": [
3.21700796032,
3.02906368932,
3.2916046353199997,
3.24457058832,
3.76059785932,
3.53406573332,
3.50169329832,
3.53004174632,
3.58308075932
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.6548104421600005,
"stddev": 0.15438492791764727,
"median": 4.5710563868600005,
"user": 2.3749100800000003,
"system": 1.7640214999999997,
"min": 4.537461099360001,
"max": 4.952269724360001,
"times": [
4.59768575036,
4.855589123360001,
4.56638910836,
4.5529909473600005,
4.80603956836,
4.57572366536,
4.537461099360001,
4.56257263136,
4.952269724360001,
4.54138280336
]
},
{
"command": "pacquet@main",
"mean": 4.654750686360001,
"stddev": 0.13555180685835522,
"median": 4.62341131536,
"user": 2.26328568,
"system": 1.6411003000000002,
"min": 4.49469941136,
"max": 4.829118488360001,
"times": [
4.50250359436,
4.80361505736,
4.7954395643600005,
4.66808632536,
4.49469941136,
4.5496325863600005,
4.5787363053600005,
4.829118488360001,
4.77919563936,
4.546479891360001
]
},
{
"command": "pnpr@HEAD",
"mean": 3.60385818226,
"stddev": 0.12478129622611492,
"median": 3.5688279068599997,
"user": 1.3343822799999998,
"system": 1.317903,
"min": 3.4643055933599998,
"max": 3.7911260053599998,
"times": [
3.7911260053599998,
3.4745132373599996,
3.5472030643599997,
3.48487589336,
3.59045274936,
3.4643055933599998,
3.75602566336,
3.7316946933599997,
3.5224717903599996,
3.67591313236
]
},
{
"command": "pnpr@main",
"mean": 3.54880048586,
"stddev": 0.10370647987734036,
"median": 3.51682207936,
"user": 1.30924938,
"system": 1.3674515,
"min": 3.46361644436,
"max": 3.8166677973599996,
"times": [
3.51580216636,
3.5178419923599997,
3.4956372503599997,
3.47504486936,
3.5383140353599996,
3.49565893236,
3.8166677973599996,
3.6160114443599998,
3.46361644436,
3.55340992636
]
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/13797 |
| 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,459.01 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 325.15 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 342.75 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 87.63 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,356.16 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,464.31 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 273.88 ms |
Summary
Closes #13795 — the half of item 6 of #13696 left out when the range half landed in #13792.
A parent-scoped override (
"parent>child": "2.0.0") bailed to the resolver in both stacks unless it was a removal. Measured what a full resolution actually does with one, before touching anything —parentandotherboth depending on[email protected], then overriding onlyparent's edge:That turned out to be expressible with the plan as it stands. The apply step already inserts the new version alongside the old and leaves reachability to the shared prune, so the old key survives on its own whenever another dependent still points at it — I had expected to need per-edge plan entries and did not. What was actually missing is that the repoint ignored the selector's parent and moved every edge to the package.
It now consults the same predicate parent-scoped removals have always used, extracted so both share it (
override_applies_to/overrideApplies). Importer edges keep the exit removals take there, since aparent>childselector never names an importer.Both stacks are tested at the handler level: the named parent moves while the other dependent does not and both versions survive; the version left behind is pruned when it becomes unreachable. The pacquet scoping is break-tested — removing the parent check makes the "moves only that parent's edge" test fail.
Squash Commit Body
Checklist
already linked to it solves it.
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 (Claude Code, claude-opus-5).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit