Repository navigation
fix(npm-resolver): apply the publishedBy cutoff to the held-back-update baseline - #13115
Conversation
|
💖 Thanks for opening this pull request! 💖 |
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? |
|
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:
📝 WalkthroughWalkthroughHeld-back update warning baselines now apply ChangesHeld-back warning behavior
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Resolver
participant MetadataFilter
participant VersionPicker
participant WarningLogger
Resolver->>MetadataFilter: Filter versions by release-age cutoff
MetadataFilter-->>Resolver: Return eligible baseline metadata
Resolver->>VersionPicker: Select preferred version
VersionPicker-->>Resolver: Return preferred version
Resolver->>WarningLogger: Emit warning only when versions differ
Assessment against linked issues
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ 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 |
Confidence Score: 5/5
Reviews (6): Last reviewed commit: "refactor(npm-resolver): route the publis..." | Re-trigger Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13115 +/- ##
==========================================
+ Coverage 88.12% 88.13% +0.01%
==========================================
Files 609 611 +2
Lines 99159 99396 +237
==========================================
+ Hits 87383 87602 +219
- Misses 11776 11794 +18 ☔ 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.5866849625400006,
"stddev": 0.10067989250697577,
"median": 2.60624398044,
"user": 1.9355047000000003,
"system": 1.55388378,
"min": 2.4235439619399997,
"max": 2.72366757794,
"times": [
2.4235439619399997,
2.72366757794,
2.60860660794,
2.60967249594,
2.56326078394,
2.46589268794,
2.65530146894,
2.60388135294,
2.71585068094,
2.49717200694
]
},
{
"command": "pacquet@main",
"mean": 2.67822087324,
"stddev": 0.17770033489588358,
"median": 2.6565025589399998,
"user": 2.2783613,
"system": 1.74323288,
"min": 2.43624002794,
"max": 2.92026604194,
"times": [
2.50350966094,
2.60218361394,
2.50746278894,
2.7108215039399997,
2.92026604194,
2.86255517794,
2.7938349639399997,
2.56577175294,
2.8795631999399998,
2.43624002794
]
},
{
"command": "pnpr@HEAD",
"mean": 1.6442228415400002,
"stddev": 0.15611381899807436,
"median": 1.59970125844,
"user": 1.6842925000000002,
"system": 1.5081679799999999,
"min": 1.38928990494,
"max": 1.8806330799400002,
"times": [
1.79864334894,
1.8437640619400002,
1.5771911519400001,
1.57252179594,
1.62221136494,
1.67947625594,
1.5127912139400002,
1.8806330799400002,
1.38928990494,
1.56570623694
]
},
{
"command": "pnpr@main",
"mean": 1.5478133115400001,
"stddev": 0.15830347954652446,
"median": 1.51892084644,
"user": 1.5456911,
"system": 1.4656256799999996,
"min": 1.3794713689400002,
"max": 1.7962087239400002,
"times": [
1.7962087239400002,
1.3892747059400001,
1.55651444794,
1.4303812739400001,
1.41000234494,
1.3794713689400002,
1.7588607329400001,
1.71634987994,
1.5597423919400002,
1.4813272449400001
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.31481295086,
"stddev": 0.012590225033932562,
"median": 0.31351393695999996,
"user": 0.27170126,
"system": 0.6079138399999999,
"min": 0.29404372396,
"max": 0.34165700796,
"times": [
0.31032160496,
0.30521713796,
0.31784234096,
0.32493356696,
0.30908461696,
0.31202272395999997,
0.29404372396,
0.31500514996,
0.34165700796,
0.31800163496
]
},
{
"command": "pacquet@main",
"mean": 0.31371057356,
"stddev": 0.013418881421979502,
"median": 0.31521518796000003,
"user": 0.27632726,
"system": 0.62034904,
"min": 0.29124476296,
"max": 0.33258489096,
"times": [
0.31384562496,
0.29124476296,
0.33258489096,
0.32486142096,
0.32824845296,
0.31448463496,
0.30002113196,
0.29887324096,
0.31594574096,
0.31699583396
]
},
{
"command": "pnpr@HEAD",
"mean": 0.33079077476,
"stddev": 0.009818740727653182,
"median": 0.33428985746,
"user": 0.28075895999999995,
"system": 0.6118792399999998,
"min": 0.31465620796,
"max": 0.34172593896,
"times": [
0.33377373396,
0.34172593896,
0.33637018196,
0.33480598096,
0.32473473996,
0.33999403096,
0.34024578796,
0.32405911596,
0.31754202896,
0.31465620796
]
},
{
"command": "pnpr@main",
"mean": 0.33782261665999996,
"stddev": 0.014294437972453462,
"median": 0.33900709846,
"user": 0.28036596,
"system": 0.65029454,
"min": 0.31515112596,
"max": 0.36605931696,
"times": [
0.34799207896,
0.36605931696,
0.34193902496,
0.33846214996,
0.34653669596,
0.33955204696,
0.31515112596,
0.32988940796,
0.32683017296,
0.32581414596
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.73422706568,
"stddev": 0.021545432350121078,
"median": 2.73502748748,
"user": 2.16901114,
"system": 1.7489426799999996,
"min": 2.69976599548,
"max": 2.76746901948,
"times": [
2.74121704848,
2.76746901948,
2.7227323384799997,
2.71491899948,
2.71487556048,
2.69976599548,
2.74420198048,
2.75839899448,
2.74985279348,
2.72883792648
]
},
{
"command": "pacquet@main",
"mean": 2.70424422198,
"stddev": 0.11360032546814124,
"median": 2.6675920404799998,
"user": 2.09639234,
"system": 1.69332168,
"min": 2.60438004948,
"max": 2.99781025148,
"times": [
2.6965809634799998,
2.64674174148,
2.60438004948,
2.73776906248,
2.99781025148,
2.7556758274799997,
2.64723345148,
2.66670451348,
2.66847956748,
2.62106679148
]
},
{
"command": "pnpr@HEAD",
"mean": 1.6497510300799998,
"stddev": 0.1543057270609285,
"median": 1.64909804398,
"user": 1.48153014,
"system": 1.38558458,
"min": 1.46700566948,
"max": 1.9156464984800001,
"times": [
1.87892224748,
1.46700566948,
1.6445919314800002,
1.6536041564800001,
1.7123523054800003,
1.5176968984800001,
1.9156464984800001,
1.48188362848,
1.5610239174800002,
1.66478304748
]
},
{
"command": "pnpr@main",
"mean": 1.6650010002800002,
"stddev": 0.16065094435541383,
"median": 1.6336052049800003,
"user": 1.54458084,
"system": 1.5277139800000001,
"min": 1.49893489448,
"max": 1.96297245748,
"times": [
1.50908261648,
1.75640945848,
1.52859411548,
1.7916605814800002,
1.5201026534800002,
1.6730930954800003,
1.49893489448,
1.8150428154800002,
1.5941173144800003,
1.96297245748
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.47709609238000006,
"stddev": 0.028702469159118536,
"median": 0.48176433078,
"user": 0.6341552,
"system": 0.87607658,
"min": 0.41620398928,
"max": 0.51249131528,
"times": [
0.41620398928,
0.47316369928,
0.48651973828,
0.50566733628,
0.47700892328,
0.51249131528,
0.49873049628,
0.46222133528000003,
0.45040065128,
0.48855343928
]
},
{
"command": "pacquet@main",
"mean": 0.4451462788800001,
"stddev": 0.03758227460149899,
"median": 0.45945691328000005,
"user": 0.6019416000000001,
"system": 0.8051209800000001,
"min": 0.39269574028,
"max": 0.48837762428000003,
"times": [
0.40554582828,
0.48837762428000003,
0.46966081028,
0.45859131928,
0.46032250728,
0.47590349628,
0.48513179528,
0.41627208228,
0.39269574028,
0.39896158528000003
]
},
{
"command": "pnpr@HEAD",
"mean": 0.33419490518,
"stddev": 0.009080064255695578,
"median": 0.33218778328,
"user": 0.22545489999999999,
"system": 0.58039968,
"min": 0.32427584528,
"max": 0.35013779728,
"times": [
0.33237453228,
0.32427584528,
0.33200103428,
0.32507482628,
0.35013779728,
0.34416594928,
0.32449311728,
0.34354152128,
0.33559907028,
0.33028535828
]
},
{
"command": "pnpr@main",
"mean": 0.33143782737999994,
"stddev": 0.01478365376013558,
"median": 0.33131694478,
"user": 0.2201035,
"system": 0.5665596799999999,
"min": 0.31401746328,
"max": 0.36412215828,
"times": [
0.36412215828,
0.33132719828,
0.31884634928,
0.33535773928,
0.33130669128,
0.33355290328,
0.34308516028,
0.31509912628,
0.32766348428,
0.31401746328
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.7422278094200003,
"stddev": 0.022477668136286818,
"median": 1.73380206752,
"user": 0.7890282399999999,
"system": 0.7930322000000001,
"min": 1.72523320852,
"max": 1.7998028725200002,
"times": [
1.7998028725200002,
1.75062896052,
1.75099425352,
1.74512466652,
1.73302739452,
1.73457674052,
1.72523320852,
1.72603799552,
1.7275870505200002,
1.72926495152
]
},
{
"command": "pacquet@main",
"mean": 1.71991757342,
"stddev": 0.011908048031206922,
"median": 1.71964836502,
"user": 0.73323384,
"system": 0.7777779,
"min": 1.70109717952,
"max": 1.73969434452,
"times": [
1.73969434452,
1.71935324652,
1.70109717952,
1.71278871252,
1.7294389445200002,
1.72956270352,
1.72519080152,
1.71994348352,
1.7036000015200001,
1.71850631652
]
},
{
"command": "pnpr@HEAD",
"mean": 0.30909787192000004,
"stddev": 0.014104303883828656,
"median": 0.30787412402000003,
"user": 0.18343514,
"system": 0.5352746999999999,
"min": 0.29063038052,
"max": 0.33464820352,
"times": [
0.29063038052,
0.30896613952,
0.31006447752,
0.29944601452,
0.30199437952,
0.33464820352,
0.32893414952,
0.31513449452,
0.30678210852,
0.29437837152
]
},
{
"command": "pnpr@main",
"mean": 0.31620626562,
"stddev": 0.011270518382151809,
"median": 0.31315369602,
"user": 0.20311893999999997,
"system": 0.5405812999999999,
"min": 0.30199339552,
"max": 0.33132212452,
"times": [
0.30199339552,
0.32773625052,
0.32750834952,
0.31767941552,
0.30681005152,
0.30862797652,
0.30601621452,
0.30722430652,
0.33132212452,
0.32714457152
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.1869743135971429,
"stddev": 0.01148898099233408,
"median": 0.18554268074000002,
"user": 0.16428391999999997,
"system": 0.0951944457142857,
"min": 0.17516164774,
"max": 0.21598000174,
"times": [
0.19819070974,
0.17949857774,
0.19689142274000002,
0.18933568074,
0.18618161074,
0.17713304574,
0.17516164774,
0.17682236874,
0.17558812574000002,
0.17891577074,
0.18942723074,
0.18490375074,
0.19361044674,
0.21598000174
]
},
{
"command": "pacquet@main",
"mean": 0.18850612045428572,
"stddev": 0.008755669669902606,
"median": 0.18828647774,
"user": 0.16348634857142857,
"system": 0.09916430285714285,
"min": 0.17498142774,
"max": 0.20534017974000002,
"times": [
0.20090980874,
0.19398352174,
0.19056514574,
0.19559223274,
0.19336717174,
0.19107281774,
0.18600780974,
0.18212556774,
0.18037580674,
0.20534017974000002,
0.18072212374000002,
0.18060365874,
0.18343841374,
0.17498142774
]
},
{
"command": "pnpr@HEAD",
"mean": 0.09734742192750001,
"stddev": 0.0064422716628348186,
"median": 0.09679712174,
"user": 0.02408657625,
"system": 0.014943972500000001,
"min": 0.08756929174,
"max": 0.10958408274,
"times": [
0.08921183974,
0.08759196274,
0.08974611274,
0.09757766874,
0.09772789274,
0.09814050074,
0.09790811074,
0.09506891774,
0.09515982474,
0.09587762274,
0.09673466074,
0.09426571874,
0.09270988474,
0.08756929174,
0.08947633674,
0.09147159674,
0.09685958274,
0.09430204474000001,
0.09934587674,
0.10221906074,
0.09905542474,
0.10912773174,
0.10655016374,
0.10905380074,
0.10232905874,
0.10575679574,
0.10423829274,
0.10958408274,
0.10423503274,
0.09018938774,
0.09375786374,
0.09227535874
]
},
{
"command": "pnpr@main",
"mean": 0.09539453556758622,
"stddev": 0.0044858625964150824,
"median": 0.09523004774,
"user": 0.022243006206896544,
"system": 0.015459418620689657,
"min": 0.08631266274,
"max": 0.10633618174000001,
"times": [
0.09731071774,
0.10633618174000001,
0.09688013074,
0.08879075174,
0.08631266274,
0.09283452774,
0.09273108474,
0.09285712574,
0.09105503774,
0.09271762174,
0.09389497674,
0.09350235274,
0.08959573774,
0.09025996974,
0.09694938674,
0.09559436874,
0.09525607974,
0.09523004774,
0.09923369474,
0.09696254874,
0.09497162974000001,
0.09725604374,
0.10170819774,
0.09433025974,
0.09594402974,
0.09457536474,
0.09779619674000001,
0.09963437674,
0.10592042674
]
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.1317720478933333,
"stddev": 0.2348106459046836,
"median": 1.11303169656,
"user": 1.0481484644444443,
"system": 0.34286167777777776,
"min": 0.80837656156,
"max": 1.48396612256,
"times": [
1.00548227056,
0.81998488956,
1.15227400556,
1.48396612256,
1.3175610045600001,
1.11303169656,
1.1022222725600002,
1.38304960756,
0.80837656156
]
},
{
"command": "pacquet@main",
"mean": 1.12325556756,
"stddev": 0.3858255827744713,
"median": 1.17488866456,
"user": 1.0680002422222223,
"system": 0.3324082333333333,
"min": 0.6238452315599999,
"max": 1.7942543895600003,
"times": [
1.4340822315600001,
0.85004547056,
1.33247485756,
0.6238452315599999,
1.7942543895600003,
1.32377940156,
0.72278882656,
0.85314103456,
1.17488866456
]
},
{
"command": "pnpm@HEAD",
"mean": 3.271344220782223,
"stddev": 0.12784365913004964,
"median": 3.31906630456,
"user": 4.720845797777778,
"system": 0.32504856666666665,
"min": 3.03935928856,
"max": 3.4029029945600002,
"times": [
3.3740412815600003,
3.31495838256,
3.03935928856,
3.36492597356,
3.31906630456,
3.4029029945600002,
3.12046003356,
3.17344723256,
3.3329364955600003
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.59748394302,
"stddev": 0.16070002533672947,
"median": 4.5539645769199995,
"user": 1.9813293599999997,
"system": 1.52237844,
"min": 4.44751597342,
"max": 4.89971674942,
"times": [
4.523377229419999,
4.4860447494199995,
4.5845519244199995,
4.857464665419999,
4.46619134142,
4.598761072419999,
4.633617860419999,
4.47759786442,
4.44751597342,
4.89971674942
]
},
{
"command": "pacquet@main",
"mean": 4.5767801735199996,
"stddev": 0.14048132177135023,
"median": 4.51714188542,
"user": 2.0677990599999996,
"system": 1.5128269399999998,
"min": 4.43553328342,
"max": 4.821234760419999,
"times": [
4.49658912442,
4.750000303419999,
4.51742931342,
4.51685445742,
4.48154813342,
4.821234760419999,
4.43553328342,
4.53609746342,
4.750989630419999,
4.46152526542
]
},
{
"command": "pnpr@HEAD",
"mean": 3.5755943621199995,
"stddev": 0.12922626952243566,
"median": 3.51399540092,
"user": 1.48117396,
"system": 1.3576768399999999,
"min": 3.47984617042,
"max": 3.8683162544200003,
"times": [
3.4868231234200002,
3.4895704854200003,
3.5273089514200002,
3.8683162544200003,
3.5321495304200003,
3.49975258742,
3.69820622842,
3.47984617042,
3.50068185042,
3.6732884394200003
]
},
{
"command": "pnpr@main",
"mean": 3.56196562702,
"stddev": 0.11553859251004601,
"median": 3.54157439042,
"user": 1.3595292600000002,
"system": 1.31263614,
"min": 3.45120624742,
"max": 3.77590034742,
"times": [
3.74716909342,
3.5454773104200004,
3.57655641842,
3.46325974242,
3.46384570942,
3.5376714704200003,
3.45120624742,
3.4781719264200004,
3.58039800442,
3.77590034742
]
}
]
} |
|
| Branch | pr/13115 |
| 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,485.99 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 282.65 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 285.71 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 78.44 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,491.52 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,579.89 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 263.11 ms |
d30b626 to
6492efb
Compare
|
Rebased onto the latest Local checks:
Note: pushes use |
Code Review by Qodo
1.
|
|
Code review by qodo was updated up to the latest commit 6492efb |
|
| Project | pnpm's project |
| Branch | pr/13115 |
| Testbed | pacquet |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result milliseconds (ms) (Result Δ%) | Upper Boundary milliseconds (ms) (Limit %) |
|---|---|---|---|
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot 🚷 view threshold | 2,699.77 ms(-1.43%)Baseline: 2,738.92 ms | 3,286.70 ms (82.14%) |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot 🚷 view threshold | 1,725.23 ms(-5.37%)Baseline: 1,823.14 ms | 2,187.77 ms (78.86%) |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot 🚷 view threshold | 416.20 ms(-11.48%)Baseline: 470.17 ms | 564.21 ms (73.77%) |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot 🚷 view threshold | 175.16 ms(-19.23%)Baseline: 216.85 ms | 260.22 ms (67.31%) |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot 🚷 view threshold | 2,423.54 ms(-2.10%)Baseline: 2,475.41 ms | 2,970.49 ms (81.59%) |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot 🚷 view threshold | 4,447.52 ms(-1.59%)Baseline: 4,519.46 ms | 5,423.35 ms (82.01%) |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot 🚷 view threshold | 294.04 ms(-3.79%)Baseline: 305.62 ms | 366.75 ms (80.18%) |
| isolated-linker.peer-heavy-resolve.hot-cache.offline | 📈 view plot 🚷 view threshold | 808.38 ms(+11.15%)Baseline: 727.31 ms | 872.77 ms (92.62%) |
|
| Project | pnpm's project |
| Branch | pr/13115 |
| 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,467.01 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 290.63 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 324.28 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 87.57 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,389.29 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,479.85 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 314.66 ms |
…te baseline The held-back-update warning compared the picked version against a baseline picked from the unfiltered metadata, while the actual pick excluded versions blocked by minimumReleaseAge. When the age gate was the only reason a newer version was not picked, the warning still fired and misattributed the hold-back to the manifests and already installed dependencies, recommending an override that would defeat the age gate. Filter the baseline metadata by the same publishedBy cutoff (honoring publishedByExclude) in both stacks, so the warning only fires when a preference a fresh install would apply is the real cause. Closes pnpm#13071
…TS suite The Rust suite covered publishedByExclude keeping the baseline unfiltered but the TypeScript suite did not; add the equivalent integration test. Also wrap the issue URL in the Rust test comment in angle brackets to satisfy dylint's bare-url lint.
…y cutoff The held-back suites pinned "cutoff blocks the newer version" and "no cutoff, manifest pin holds the update back", but nothing exercised a cutoff that is active while the newer version is already mature. A baseline filter that dropped too much would have suppressed a legitimate warning undetected, so both stacks get that case. The Rust packument also gains the `release_age_upgrade_checked` and `derived` fields `Package` grew on main, without which the crate no longer compiles after the rebase.
… contract `filter_pkg_metadata_by_publish_date` named the publishedBy branch in `pick_package_from_meta` as its only caller; the held-back baseline is a second one. State the precondition callers must satisfy instead of enumerating them.
6492efb to
91fb50f
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Code review by qodo was updated up to the latest commit 91fb50f |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
pnpm11/resolving/npm-resolver/test/heldBackUpdateWarning.test.ts (2)
47-51: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDeclare
collectWarningsafter its first use.Move
collectWarningsbelow thebeforeEachandafterEachregistrations. The TypeScript style requires function declarations after use.🤖 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/resolving/npm-resolver/test/heldBackUpdateWarning.test.ts` around lines 47 - 51, Move the collectWarnings function declaration below the beforeEach and afterEach registrations in the test setup, without changing its warning-filtering or collection behavior.Source: Coding guidelines
66-66: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winReplace repeated regular-expression URL trimming.
The registry URL is a fixed string with one trailing slash. Define a shared base URL with a string operation and use it in each mock setup.
pnpm11/resolving/npm-resolver/test/heldBackUpdateWarning.test.ts#L66-L66: Use the shared base URL.pnpm11/resolving/npm-resolver/test/heldBackUpdateWarning.test.ts#L92-L92: Use the shared base URL.pnpm11/resolving/npm-resolver/test/heldBackUpdateWarning.test.ts#L116-L116: Use the shared base URL.pnpm11/resolving/npm-resolver/test/heldBackUpdateWarning.test.ts#L141-L141: Use the shared base URL.Proposed change
const registries: Registries = { default: 'https://registry.npmjs.org/', } +const registryBaseUrl = registries.default.slice(0, -1) - getMockAgent().get(registries.default.replace(/\/$/, '')) + getMockAgent().get(registryBaseUrl)As per coding guidelines, prefer plain string operations over custom regular expressions.
🤖 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/resolving/npm-resolver/test/heldBackUpdateWarning.test.ts` at line 66, Replace the repeated registries.default regular-expression trimming in pnpm11/resolving/npm-resolver/test/heldBackUpdateWarning.test.ts at lines 66, 92, 116, and 141 with one shared base URL constant derived using a plain string operation, then use that constant in all four getMockAgent mock setups.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.
Inline comments:
In `@pnpm/crates/resolving-npm-resolver/src/preferred_overlay/tests.rs`:
- Around line 140-154: Add exact-version exclusion coverage in both affected
tests: in pnpm/crates/resolving-npm-resolver/src/preferred_overlay/tests.rs
lines 140-154, configure the policy to trust only [email protected] and assert the
held-back preferred result remains; in
pnpm11/resolving/npm-resolver/test/heldBackUpdateWarning.test.ts lines 140-165,
configure publishedByExclude for only 2.1.4 and assert the held-back warning
remains. Preserve resolver parity for this excluded-version case.
---
Nitpick comments:
In `@pnpm11/resolving/npm-resolver/test/heldBackUpdateWarning.test.ts`:
- Around line 47-51: Move the collectWarnings function declaration below the
beforeEach and afterEach registrations in the test setup, without changing its
warning-filtering or collection behavior.
- Line 66: Replace the repeated registries.default regular-expression trimming
in pnpm11/resolving/npm-resolver/test/heldBackUpdateWarning.test.ts at lines 66,
92, 116, and 141 with one shared base URL constant derived using a plain string
operation, then use that constant in all four getMockAgent mock setups.
🪄 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: 1ca1d78d-5c85-44da-aa03-484dc421770c
📒 Files selected for processing (6)
.changeset/held-back-warning-release-age.mdpnpm/crates/resolving-npm-resolver/src/pick_package_from_meta.rspnpm/crates/resolving-npm-resolver/src/preferred_overlay.rspnpm/crates/resolving-npm-resolver/src/preferred_overlay/tests.rspnpm11/resolving/npm-resolver/src/index.tspnpm11/resolving/npm-resolver/test/heldBackUpdateWarning.test.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- .changeset/held-back-warning-release-age.md
- pnpm11/resolving/npm-resolver/src/index.ts
- pnpm/crates/resolving-npm-resolver/src/preferred_overlay.rs
`minimumReleaseAgeExclude` entries carry optional exact versions (`[email protected]`), which reach the baseline as a trusted-versions list. Both stacks only exercised the package-wide exclusion, leaving that list untested: dropping it would silently narrow the baseline back to the mature versions and swallow the warning. Also declare the warning collector below its registrations and derive the mock registry origin once with a plain string slice.
|
Code review by qodo was updated up to the latest commit de2a1c0 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
The held-back baseline re-derived the maturity filter the pick applies: evaluate the exclude policy, decide between "excluded wholesale", "trusted exact versions", and "abbreviated metadata", then filter. Two copies of that decision is how the baseline drifted from the pick in the first place, which is the bug this branch fixes. Both stacks now compute it once, in applyPublishedByPolicy / apply_published_by_policy, which reports the abbreviated-metadata case back as `needsFullMetadata` instead of deciding it: the pick refetches full metadata, while the baseline treats a pick that already succeeded as proof the versions cleared the cutoff. No behavior change; the filter itself was already memoized per packument and policy, so this deduplicates the decision, not the work.
|
Code review by qodo was updated up to the latest commit 70c9a3f |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Summary
The held-back-update warning printed by
pnpm updateblamed "your manifests and already installed dependencies" (and recommended an override) even whenminimumReleaseAgewas the actual reason a newer version was not picked. The baseline pick that the warning compares against ran without thepublishedBy/minimumReleaseAgefilter, so any hold-back looked like a manifest constraint. Both stacks had the gap (the Rust side hardcodedpublished_by: None); both are fixed in this PR.Closes #13071
Squash Commit Body
Checklist
pnpm/port.@pnpm/resolving.npm-resolver,pnpm,pacquet).test/heldBackUpdateWarning.test.ts; Rustpreferred_overlay/tests.rs— TS npm-resolver suite 279 passing, Rust crate 294 + 3 passing, fmt/clippy clean).Written by an agent (Claude Code, claude-fable-5).
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit
Bug Fixes
minimumReleaseAge.Tests