Repository navigation
Conversation
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. Warning Review limit reachedNext included review available in 15 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: pnpm/pnpm/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
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 (5)
Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe PR adds same-run benchmark comparison logic for HEAD and main samples. It validates and classifies benchmark reports, publishes comparison results in the pull request workflow, and removes Bencher threshold enforcement from branch uploads. ChangesIntegrated benchmark regression gate
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant Benchmark as pacquet-integrated-benchmark.yml
participant Artifact as Benchmark artifacts
participant Compare as compare-integrated-benchmarks.mjs
participant Comment as pacquet-integrated-benchmark-comment.yml
participant Checks as GitHub Checks
Benchmark->>Artifact: Produce HEAD and main benchmark reports
Comment->>Artifact: Read benchmark reports
Comment->>Compare: Run renderComparison
Compare-->>Comment: Return markdown and failure status
Comment->>Checks: Publish comparison result
Comment->>Comment: Fail when a regression is detected
Merge Risk: ⚪ Minimal · up to The comparison check remains publishable even if ancillary reporting steps fail, and the benchmark artifact includes its summary on successful upstream runs. No actionable merge-blocking risk remains. ✨ 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 |
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.4340906540200002,
"stddev": 0.1504584967812669,
"median": 2.38381497682,
"user": 1.48072034,
"system": 1.6591586,
"min": 2.28999659832,
"max": 2.69382292632
},
{
"command": "pacquet@main",
"mean": 2.4500461269200002,
"stddev": 0.10904948046860753,
"median": 2.43944412882,
"user": 1.4770146399999997,
"system": 1.631853,
"min": 2.3095556793200003,
"max": 2.6528110123200004
},
{
"command": "pnpr@HEAD",
"mean": 1.52761259122,
"stddev": 0.14580804405602707,
"median": 1.48945178082,
"user": 1.3769483399999998,
"system": 1.5189208,
"min": 1.34634277332,
"max": 1.73193377132
},
{
"command": "pnpr@main",
"mean": 1.4201682565199998,
"stddev": 0.11663705851970585,
"median": 1.39765167932,
"user": 1.3146158399999996,
"system": 1.4776995,
"min": 1.30911459632,
"max": 1.62351619032
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.36176371152,
"stddev": 0.01867520096512325,
"median": 0.35475579162000004,
"user": 0.40197313999999995,
"system": 0.8445237399999999,
"min": 0.33904777412,
"max": 0.39480958112000003
},
{
"command": "pacquet@main",
"mean": 0.37041746542,
"stddev": 0.024964169904378657,
"median": 0.36778191262000004,
"user": 0.43616453999999993,
"system": 0.84972194,
"min": 0.32820215612000003,
"max": 0.41272724812
},
{
"command": "pnpr@HEAD",
"mean": 0.39067415132,
"stddev": 0.017925208593335382,
"median": 0.39444215412,
"user": 0.43314684000000003,
"system": 0.8443683399999999,
"min": 0.35941377612000003,
"max": 0.41337660312
},
{
"command": "pnpr@main",
"mean": 0.40904251482000004,
"stddev": 0.015348791038194401,
"median": 0.40592439662,
"user": 0.42702044,
"system": 0.8857508399999998,
"min": 0.39246012812000003,
"max": 0.43721989312000004
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.009162554458181815,
"stddev": 0.0010016807107199952,
"median": 0.009044643440000001,
"user": 0.0054822000000000004,
"system": 0.004327377745454545,
"min": 0.007193148440000001,
"max": 0.012253811440000002
},
{
"command": "pacquet@main",
"mean": 0.010227465875294115,
"stddev": 0.0017936879901029094,
"median": 0.00979837444,
"user": 0.006015672941176473,
"system": 0.004871786352941179,
"min": 0.007562449440000001,
"max": 0.021310925440000003
},
{
"command": "pnpr@HEAD",
"mean": 0.012946672399183672,
"stddev": 0.0024133222260598873,
"median": 0.01279900144,
"user": 0.007937964625850337,
"system": 0.005807218503401352,
"min": 0.008437676440000002,
"max": 0.02125679444
},
{
"command": "pnpr@main",
"mean": 0.012078091810588245,
"stddev": 0.0022750685558973207,
"median": 0.01154747394,
"user": 0.006818558823529416,
"system": 0.005990763764705882,
"min": 0.007651466440000001,
"max": 0.01955030944
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.009255353262970296,
"stddev": 0.0016184840627836339,
"median": 0.00882055356,
"user": 0.005862878019801979,
"system": 0.004221015247524751,
"min": 0.00703891556,
"max": 0.015034478560000002
},
{
"command": "pacquet@main",
"mean": 0.00919136912422019,
"stddev": 0.00126012108163702,
"median": 0.008991589060000001,
"user": 0.005657212110091743,
"system": 0.004357735229357796,
"min": 0.00645486056,
"max": 0.018951663560000002
},
{
"command": "pnpr@HEAD",
"mean": 0.010246206125693423,
"stddev": 0.003142596958369362,
"median": 0.008930644560000001,
"user": 0.006170542481751825,
"system": 0.004933017956204378,
"min": 0.00675799956,
"max": 0.024059171560000002
},
{
"command": "pnpr@main",
"mean": 0.009714686735675675,
"stddev": 0.0016845225548968096,
"median": 0.00937169606,
"user": 0.005650911171171172,
"system": 0.004891413153153153,
"min": 0.007081755560000001,
"max": 0.01624826756
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.6952172697399996,
"stddev": 0.07502964956542692,
"median": 2.68351344054,
"user": 2.4010117600000003,
"system": 1.9886290799999997,
"min": 2.60384447204,
"max": 2.85687161904
},
{
"command": "pacquet@main",
"mean": 2.68765331074,
"stddev": 0.052110755305032716,
"median": 2.67536866654,
"user": 2.4179492600000003,
"system": 2.0165410799999997,
"min": 2.61069651004,
"max": 2.77181552504
},
{
"command": "pnpr@HEAD",
"mean": 1.54558308384,
"stddev": 0.13113239365709914,
"median": 1.48957635054,
"user": 1.53212736,
"system": 1.61301408,
"min": 1.42508103904,
"max": 1.8179873740399999
},
{
"command": "pnpr@main",
"mean": 1.57202056454,
"stddev": 0.11515402903015597,
"median": 1.57356869954,
"user": 1.4064340599999998,
"system": 1.55760798,
"min": 1.42046480804,
"max": 1.78478580804
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.5819456297600001,
"stddev": 0.06612215328442264,
"median": 0.5721506088600001,
"user": 0.9449925799999997,
"system": 1.17938966,
"min": 0.48308994636,
"max": 0.6684630853600001
},
{
"command": "pacquet@main",
"mean": 0.6700055497600002,
"stddev": 0.08312638881197588,
"median": 0.6783791303600001,
"user": 1.0585412799999998,
"system": 1.24050826,
"min": 0.46581403436,
"max": 0.7637269523600001
},
{
"command": "pnpr@HEAD",
"mean": 0.4367876402600001,
"stddev": 0.09386245069651769,
"median": 0.41595389736,
"user": 0.38800398,
"system": 0.72059406,
"min": 0.34586961436,
"max": 0.6685002553600001
},
{
"command": "pnpr@main",
"mean": 0.36550255706,
"stddev": 0.028399427360389334,
"median": 0.36574893736,
"user": 0.31273458,
"system": 0.6537367599999999,
"min": 0.31819102236,
"max": 0.42643732236000004
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.6006389260199996,
"stddev": 0.03103881909283319,
"median": 1.60051362252,
"user": 0.9325125200000001,
"system": 0.96987106,
"min": 1.54790593602,
"max": 1.65981998302
},
{
"command": "pacquet@main",
"mean": 1.65238377382,
"stddev": 0.10903515059607562,
"median": 1.61341728252,
"user": 1.03835122,
"system": 1.1244779599999999,
"min": 1.5906894680199999,
"max": 1.94785143202
},
{
"command": "pnpr@HEAD",
"mean": 0.30244606382,
"stddev": 0.018766349970822768,
"median": 0.29705561352,
"user": 0.24559981999999994,
"system": 0.57813786,
"min": 0.28238102202,
"max": 0.34394943502
},
{
"command": "pnpr@main",
"mean": 0.29869740262,
"stddev": 0.010918680190652985,
"median": 0.29931781852,
"user": 0.23416061999999999,
"system": 0.57151166,
"min": 0.28487753702,
"max": 0.31630555202
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.32338588656,
"stddev": 0.02850750066751481,
"median": 0.33257276636,
"user": 0.3409052,
"system": 0.13343997999999996,
"min": 0.27629931486000003,
"max": 0.35840055686
},
{
"command": "pacquet@main",
"mean": 0.34409045966,
"stddev": 0.020660224538905057,
"median": 0.34975222786000004,
"user": 0.37726,
"system": 0.12918117999999998,
"min": 0.30715744586,
"max": 0.37186359786
},
{
"command": "pnpr@HEAD",
"mean": 0.11765485677304349,
"stddev": 0.007053223296534953,
"median": 0.11874148386,
"user": 0.059328439130434785,
"system": 0.02443798956521739,
"min": 0.10350124886,
"max": 0.13374700986000002
},
{
"command": "pnpr@main",
"mean": 0.11937149972363635,
"stddev": 0.005023257518937073,
"median": 0.11987760686000001,
"user": 0.05779697272727274,
"system": 0.026356807272727267,
"min": 0.10932384686,
"max": 0.12776606286
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.7891883788177778,
"stddev": 0.07089415149604306,
"median": 0.7656221350400001,
"user": 0.7967310155555556,
"system": 0.2263550155555555,
"min": 0.6929235060400001,
"max": 0.9114965340400001
},
{
"command": "pacquet@main",
"mean": 0.8080662111511112,
"stddev": 0.10018943413334959,
"median": 0.7826158380400001,
"user": 0.8175807933333333,
"system": 0.23501445999999998,
"min": 0.6629995470400001,
"max": 0.9918227760400001
},
{
"command": "pnpm@HEAD",
"mean": 3.590426798928889,
"stddev": 0.4485530389681999,
"median": 3.49184662204,
"user": 5.289273793333333,
"system": 0.30408490444444447,
"min": 3.22282914004,
"max": 4.73013743304
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.19517395260666667,
"stddev": 0.019069290181924742,
"median": 0.19509009094000002,
"user": 0.14513724,
"system": 0.09441332666666666,
"min": 0.17229787094000001,
"max": 0.23100158894
},
{
"command": "pacquet@main",
"mean": 0.1752162221275,
"stddev": 0.005439526761324915,
"median": 0.17478160644000001,
"user": 0.12559264,
"system": 0.08604238499999999,
"min": 0.16630206994000002,
"max": 0.18671458394
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.544456472119999,
"stddev": 0.15318239695820635,
"median": 4.53330239982,
"user": 1.8579165,
"system": 1.8909394,
"min": 4.35460811682,
"max": 4.85951866582
},
{
"command": "pacquet@main",
"mean": 4.5500596694199995,
"stddev": 0.2362334168538861,
"median": 4.48294763282,
"user": 1.7697578,
"system": 1.8129935,
"min": 4.3028018028199995,
"max": 5.00656383782
},
{
"command": "pnpr@HEAD",
"mean": 3.602460613819999,
"stddev": 0.24740428548593119,
"median": 3.4757126758199997,
"user": 1.5758487,
"system": 1.7758249999999998,
"min": 3.3706054488199997,
"max": 4.0590978798199995
},
{
"command": "pnpr@main",
"mean": 3.6674194825199997,
"stddev": 0.10964621389318775,
"median": 3.64282910932,
"user": 1.7651858,
"system": 1.8894923,
"min": 3.52441751282,
"max": 3.8208400118199997
}
]
}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.13347218557999999,
"stddev": 0.014563332592810856,
"median": 0.12995599458,
"user": 0.16465524285714286,
"system": 0.1608598342857143,
"min": 0.12345546308000001,
"max": 0.18218865408
},
{
"command": "pacquet@main",
"mean": 0.1444076179133334,
"stddev": 0.007352392050961393,
"median": 0.14319226808000002,
"user": 0.16803093333333333,
"system": 0.19892145333333333,
"min": 0.13160483908,
"max": 0.16360707408000003
},
{
"command": "pnpr@HEAD",
"mean": 0.15680455029428572,
"stddev": 0.009014949874359489,
"median": 0.15444821658000002,
"user": 0.18278281428571433,
"system": 0.18985712000000002,
"min": 0.14519263208000002,
"max": 0.17473608708000002
},
{
"command": "pnpr@main",
"mean": 0.1620828482675,
"stddev": 0.006040166013774014,
"median": 0.16305986358000002,
"user": 0.19615509999999997,
"system": 0.18898643249999997,
"min": 0.14823264108000003,
"max": 0.17463178808000002
}
]
} |
|
All build, test, security-analysis, and benchmark scenario jobs passed on eaf2362. The existing default-branch Bencher check subsequently raised four historical-threshold alerts. The new comparator passes all 22 same-run comparisons using the artifact from https://github.com/pnpm/pnpm/actions/runs/35634090955. For each of the four flagged scenarios, HEAD's median is faster than main measured on the same runner: warm fresh install (-15.7%), offline fresh resolve (-4.9%), warm fresh restore (-3.5%), and peer-heavy resolve (-2.2%). The old check compares against timings from different machines. The privileged New comparator replay against this PR's artifactSame-run regression checkHEAD and main are measured on the same runner. A regression requires a median slowdown above 20% and the fastest retained HEAD sample to be more than 20% slower than the slowest retained main sample, after trimming up to 10% from each tail. 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.
Written by an agent (Codex, gpt-6). |
PR Summary by QodoCompare integrated benchmarks on the same runner
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Code review by qodo was updated up to the latest commit b785cff |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
|
Code review by qodo was updated up to the latest commit 8c86377 |
|
@coderabbitai review Please review the current head, 8c86377. The review status still points to the initial commit; both subsequent commits only strengthen test coverage. Written by an agent (Codex, gpt-6). |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
✅ Action performedFull review finished. |
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
Updated in 1edc9ad: the regression tolerance is now 5% of main's median or 2 ms, whichever is larger. This keeps a 2 ms floor for very short runs while catching sustained 6% slowdowns in multi-second scenarios. The same-run sample-separation guard remains in place, and each report row displays its effective tolerance. All eleven comparison tests and the required push-hook checks pass. Replaying the stricter comparator against this PR's first artifact yields 19 rows within tolerance and 3 inconclusive rows, with no confirmed regressions. The separate script documentation file was removed; the explanation now lives in pnpm/CONTRIBUTING.md. CI and review are running again on the updated head. Written by an agent (Codex, gpt-6). |
|
Code review by qodo was updated up to the latest commit 1edc9ad |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
@coderabbitai review The quota window has elapsed. Please review current head 1edc9ad, which changes the tolerance to 5% with a 2 ms floor and moves the explanation into the existing benchmark documentation. Greptile has reviewed this head with no outstanding findings. Written by an agent (Codex, gpt-6). |
|
|
…5231) Confirm suspected integrated benchmark regressions once with target order reversed. Same-run measurements can still be biased by sustained runner drift: a control run on identical Rust sources produced a 29% apparent pnpr slowdown. Keep the 5% tolerance with a 2 ms floor and the retained-sample noise guard. Require the regression to reproduce in the confirmation, preserve both sets of measurements in the artifact and report, and keep the initial timings for historical Bencher uploads. Missing required confirmations fail the check. The wrapper preserves the existing harness arguments and assertions. It does not retry command failures, and confirmation failures propagate. Main-only runs and scenarios without suspected regressions execute once. Related to #15228.
Compare integrated benchmark samples against main measured on the same runner. Keep absolute minimum timings in Bencher for historical tracking without letting cross-machine historical alerts overwrite the PR regression check. Require at least nine successful samples per target. Fail when the median slowdown and retained sample separation both exceed 5% of main's median or 2 ms, whichever is larger. Trim up to 10% from each tail. Report other median slowdowns above that tolerance as inconclusive. This conservative noise guard is not a statistical confidence interval; smaller or noisy regressions can pass, and sequential measurements remain vulnerable to runner drift. Run the comparison from trusted default-branch code in the privileged comment workflow, publish the report before enforcing the result, and preserve the existing check name on the triggering PR commit. Keep the peer-heavy Rust-versus-TypeScript assertion unchanged. Cover regressions, shared machine slowdowns, outliers, invalid data, all scenario and engine combinations, command names, CLI exit codes, and the duration-dependent tolerance with Node tests. Keep the explanation in the existing benchmark documentation.
…pm#15231) Confirm suspected integrated benchmark regressions once with target order reversed. Same-run measurements can still be biased by sustained runner drift: a control run on identical Rust sources produced a 29% apparent pnpr slowdown. Keep the 5% tolerance with a 2 ms floor and the retained-sample noise guard. Require the regression to reproduce in the confirmation, preserve both sets of measurements in the artifact and report, and keep the initial timings for historical Bencher uploads. Missing required confirmations fail the check. The wrapper preserves the existing harness arguments and assertions. It does not retry command failures, and confirmation failures propagate. Main-only runs and scenarios without suspected regressions execute once. Related to pnpm#15228.
Summary
Integrated benchmark checks currently compare absolute timings against historical runs on different machines. In #15211, main itself exceeded three historical limits, and #15213 required another investigation of the same mismatch.
Keep every scenario and the Bencher history, but gate PRs using HEAD and main samples from 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 separation of the retained sample ranges to exceed that tolerance. Noisy slowdowns are reported as inconclusive. Reports are posted before the check fails, and the existing required-check name is preserved.
Validation: eleven Node tests pass, covering multi-second regressions, the 2 ms floor, boundary values, noisy data, failed commands, and matrix coverage. Both workflow YAML files and their shell steps parse. The stricter comparator was replayed against actual artifacts from #15211, #15213, and this PR. The previous CI run passed all test and benchmark jobs; CI is rerunning after the threshold update.
The existing default-branch Bencher check raised historical alerts on this PR even where HEAD is faster than same-run main. The privileged comment workflow takes effect after this change reaches the default branch, so its posting/check-publication path needs post-merge verification. The old check has not been overridden.
Squash Commit Body
Checklist
No published packages change, so no changeset is needed.
Written by an agent (Codex, gpt-6).