Skip to content

fix(ci): compare integrated benchmarks on the same runner - #15228

Merged
zkochan merged 4 commits into
mainfrom
intb
Sep 21, 2026
Merged

zkochan merged 4 commits into
mainfrom
intb

Conversation

@zkochan

@zkochan zkochan commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

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

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.

Checklist

  • Added or updated tests.
  • Updated the documentation if needed.

No published packages change, so no changeset is needed.


Written by an agent (Codex, gpt-6).

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

Warning

Review limit reached

Next included review available in 15 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: pnpm/pnpm/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 103bc123-f8d8-4c76-b91e-ab61db5b638d

📥 Commits

Reviewing files that changed from the base of the PR and between 8c86377 and 1edc9ad.

📒 Files selected for processing (3)
  • .github/scripts/compare-integrated-benchmarks.mjs
  • .github/scripts/compare-integrated-benchmarks.test.mjs
  • pnpm/CONTRIBUTING.md

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: pnpm/pnpm/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: ebfdb16a-36f2-4828-8973-3c6346eadcd8

📥 Commits

Reviewing files that changed from the base of the PR and between 93a68d9 and 8c86377.

📒 Files selected for processing (5)
  • .github/scripts/compare-integrated-benchmarks.md
  • .github/scripts/compare-integrated-benchmarks.mjs
  • .github/scripts/compare-integrated-benchmarks.test.mjs
  • .github/workflows/pacquet-integrated-benchmark-comment.yml
  • .github/workflows/pacquet-integrated-benchmark.yml

Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The 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.

Changes

Integrated benchmark regression gate

Layer / File(s) Summary
Comparison engine and validation
.github/scripts/compare-integrated-benchmarks.mjs, .github/scripts/compare-integrated-benchmarks.test.mjs, .github/scripts/compare-integrated-benchmarks.md
The new comparison module validates benchmark samples, calculates medians and ratios, classifies regressions, renders reports, and provides a CLI. Tests and documentation cover the comparison rules and invalid data cases.
Pull request comparison and enforcement
.github/workflows/pacquet-integrated-benchmark-comment.yml
The comment workflow checks out the trusted script, compares benchmark artifacts, adds the result to summaries and reports, publishes a check, and fails when comparison is unsuccessful.
Benchmark workflow integration
.github/workflows/pacquet-integrated-benchmark.yml
The workflow tracks comparison files, runs their tests, separates historical Bencher uploads from branch gating, and checks same-run regressions for non-main manual dispatches.

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
Loading

Merge Risk: ⚪ Minimal · up to 8c863

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
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: eaf2362bea95

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.434 ± 0.150 2.290 2.694 1.71 ± 0.18
pacquet@main 2.450 ± 0.109 2.310 2.653 1.73 ± 0.16
pnpr@HEAD 1.528 ± 0.146 1.346 1.732 1.08 ± 0.14
pnpr@main 1.420 ± 0.117 1.309 1.624 1.00
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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 361.8 ± 18.7 339.0 394.8 1.00
pacquet@main 370.4 ± 25.0 328.2 412.7 1.02 ± 0.09
pnpr@HEAD 390.7 ± 17.9 359.4 413.4 1.08 ± 0.07
pnpr@main 409.0 ± 15.3 392.5 437.2 1.13 ± 0.07
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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 9.2 ± 1.0 7.2 12.3 1.00
pacquet@main 10.2 ± 1.8 7.6 21.3 1.12 ± 0.23
pnpr@HEAD 12.9 ± 2.4 8.4 21.3 1.41 ± 0.31
pnpr@main 12.1 ± 2.3 7.7 19.6 1.32 ± 0.29
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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 9.3 ± 1.6 7.0 15.0 1.01 ± 0.22
pacquet@main 9.2 ± 1.3 6.5 19.0 1.00
pnpr@HEAD 10.2 ± 3.1 6.8 24.1 1.11 ± 0.37
pnpr@main 9.7 ± 1.7 7.1 16.2 1.06 ± 0.23
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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.695 ± 0.075 2.604 2.857 1.74 ± 0.16
pacquet@main 2.688 ± 0.052 2.611 2.772 1.74 ± 0.15
pnpr@HEAD 1.546 ± 0.131 1.425 1.818 1.00
pnpr@main 1.572 ± 0.115 1.420 1.785 1.02 ± 0.11
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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 581.9 ± 66.1 483.1 668.5 1.59 ± 0.22
pacquet@main 670.0 ± 83.1 465.8 763.7 1.83 ± 0.27
pnpr@HEAD 436.8 ± 93.9 345.9 668.5 1.20 ± 0.27
pnpr@main 365.5 ± 28.4 318.2 426.4 1.00
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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.601 ± 0.031 1.548 1.660 5.36 ± 0.22
pacquet@main 1.652 ± 0.109 1.591 1.948 5.53 ± 0.42
pnpr@HEAD 0.302 ± 0.019 0.282 0.344 1.01 ± 0.07
pnpr@main 0.299 ± 0.011 0.285 0.316 1.00
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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 323.4 ± 28.5 276.3 358.4 2.75 ± 0.29
pacquet@main 344.1 ± 20.7 307.2 371.9 2.92 ± 0.25
pnpr@HEAD 117.7 ± 7.1 103.5 133.7 1.00
pnpr@main 119.4 ± 5.0 109.3 127.8 1.01 ± 0.07
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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 789.2 ± 70.9 692.9 911.5 1.00
pacquet@main 808.1 ± 100.2 663.0 991.8 1.02 ± 0.16
pnpm@HEAD 3590.4 ± 448.6 3222.8 4730.1 4.55 ± 0.70
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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 195.2 ± 19.1 172.3 231.0 1.11 ± 0.11
pacquet@main 175.2 ± 5.4 166.3 186.7 1.00
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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.544 ± 0.153 4.355 4.860 1.26 ± 0.10
pacquet@main 4.550 ± 0.236 4.303 5.007 1.26 ± 0.11
pnpr@HEAD 3.602 ± 0.247 3.371 4.059 1.00
pnpr@main 3.667 ± 0.110 3.524 3.821 1.02 ± 0.08
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 store

Same 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.

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 133.5 ± 14.6 123.5 182.2 1.00
pacquet@main 144.4 ± 7.4 131.6 163.6 1.08 ± 0.13
pnpr@HEAD 156.8 ± 9.0 145.2 174.7 1.17 ± 0.14
pnpr@main 162.1 ± 6.0 148.2 174.6 1.21 ± 0.14
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
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/15228
Testbedpacquet

🚨 4 Alerts

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
isolated-linker.fresh-install.hot-cache.hot-storeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
483.09 ms
(+26.86%)Baseline: 380.80 ms
456.95 ms
(105.72%)

isolated-linker.fresh-resolve.hot-cache.offlineLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
276.30 ms
(+33.34%)Baseline: 207.21 ms
248.66 ms
(111.12%)

isolated-linker.fresh-restore.hot-cache.hot-storeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
339.05 ms
(+54.30%)Baseline: 219.74 ms
263.69 ms
(128.58%)

isolated-linker.peer-heavy-resolve.hot-cache.offlineLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
692.92 ms
(+22.87%)Baseline: 563.93 ms
676.71 ms
(102.40%)

Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
gvs-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
123.46 ms
(+8.16%)Baseline: 114.14 ms
136.97 ms
(90.13%)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,603.84 ms
(+5.82%)Baseline: 2,460.56 ms
2,952.67 ms
(88.19%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,547.91 ms
(-0.35%)Baseline: 1,553.38 ms
1,864.06 ms
(83.04%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
483.09 ms
(+26.86%)Baseline: 380.80 ms
456.95 ms
(105.72%)

isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
🚨 view alert (🔔)
276.30 ms
(+33.34%)Baseline: 207.21 ms
248.66 ms
(111.12%)

isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,290.00 ms
(+0.09%)Baseline: 2,288.01 ms
2,745.61 ms
(83.41%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,354.61 ms
(+0.47%)Baseline: 4,334.35 ms
5,201.22 ms
(83.72%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
339.05 ms
(+54.30%)Baseline: 219.74 ms
263.69 ms
(128.58%)

isolated-linker.linked-workspace-resolve.hot-cache.offline📈 view plot
🚷 view threshold
172.30 ms
(+1.41%)Baseline: 169.91 ms
203.89 ms
(84.51%)
isolated-linker.peer-heavy-resolve.hot-cache.offline📈 view plot
🚷 view threshold
🚨 view alert (🔔)
692.92 ms
(+22.87%)Baseline: 563.93 ms
676.71 ms
(102.40%)

isolated-linker.repeat-install.cold-cache.hot-store📈 view plot
🚷 view threshold
7.04 ms
(+5.48%)Baseline: 6.67 ms
8.01 ms
(87.90%)
isolated-linker.repeat-install.hot-cache.hot-store📈 view plot
🚷 view threshold
7.19 ms
(+6.04%)Baseline: 6.78 ms
8.14 ms
(88.36%)
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan marked this pull request as ready for review September 21, 2026 18:06
@zkochan

zkochan commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

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 workflow_run reporter executes from the default branch, so its replacement in this PR only takes effect after merge. The old red check is still visible; I have not overridden it. The new comparison's actual check-publication path needs post-merge verification.

New comparator replay against this PR's artifact

Same-run regression check

HEAD 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.

Scenario Engine main median HEAD median Change Result
isolated-fresh-restore-cold-cache-cold-store pacquet 2439.44 ms 2383.81 ms -2.3% Within tolerance
isolated-fresh-restore-cold-cache-cold-store pnpr 1397.65 ms 1489.45 ms 6.6% Within tolerance
isolated-fresh-restore-hot-cache-hot-store pacquet 367.78 ms 354.76 ms -3.5% Within tolerance
isolated-fresh-restore-hot-cache-hot-store pnpr 405.92 ms 394.44 ms -2.8% Within tolerance
isolated-repeat-install-hot-cache-hot-store pacquet 9.80 ms 9.04 ms -7.7% Within tolerance
isolated-repeat-install-hot-cache-hot-store pnpr 11.55 ms 12.80 ms 10.8% Within tolerance
isolated-repeat-install-cold-cache-hot-store pacquet 8.99 ms 8.82 ms -1.9% Within tolerance
isolated-repeat-install-cold-cache-hot-store pnpr 9.37 ms 8.93 ms -4.7% Within tolerance
isolated-fresh-install-cold-cache-cold-store pacquet 2675.37 ms 2683.51 ms 0.3% Within tolerance
isolated-fresh-install-cold-cache-cold-store pnpr 1573.57 ms 1489.58 ms -5.3% Within tolerance
isolated-fresh-install-hot-cache-hot-store pacquet 678.38 ms 572.15 ms -15.7% Within tolerance
isolated-fresh-install-hot-cache-hot-store pnpr 365.75 ms 415.95 ms 13.7% Within tolerance
isolated-fresh-install-cold-cache-hot-store pacquet 1613.42 ms 1600.51 ms -0.8% Within tolerance
isolated-fresh-install-cold-cache-hot-store pnpr 299.32 ms 297.06 ms -0.8% Within tolerance
isolated-fresh-resolve-hot-cache-offline pacquet 349.75 ms 332.57 ms -4.9% Within tolerance
isolated-fresh-resolve-hot-cache-offline pnpr 119.88 ms 118.74 ms -0.9% Within tolerance
isolated-peer-heavy-resolve-hot-cache-offline pacquet 782.62 ms 765.62 ms -2.2% Within tolerance
isolated-linked-workspace-resolve-hot-cache-offline pacquet 174.78 ms 195.09 ms 11.6% Within tolerance
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pacquet 4482.95 ms 4533.30 ms 1.1% Within tolerance
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pnpr 3642.83 ms 3475.71 ms -4.6% Within tolerance
gvs-fresh-restore-hot-cache-hot-store pacquet 143.19 ms 129.96 ms -9.2% Within tolerance
gvs-fresh-restore-hot-cache-hot-store pnpr 163.06 ms 154.45 ms -5.3% Within tolerance

Written by an agent (Codex, gpt-6).

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Compare integrated benchmarks on the same runner

🐞 Bug fix 🧪 Tests 📝 Documentation ⚙️ Configuration changes 🕐 40+ Minutes

Grey Divider

AI Description

• Compare HEAD and main samples on one runner, eliminating cross-machine benchmark noise.
• Fail sustained 20% slowdowns while reporting overlapping sample ranges as inconclusive.
• Preserve Bencher history and required checks while publishing reports before enforcement.
Diagram

sequenceDiagram
  actor PR as Pull Request
  participant BW as Benchmark Workflow
  participant R as Same Runner
  participant A as Report Artifact
  participant CW as Comment Workflow
  participant C as Trusted Comparator
  participant GH as GitHub Checks
  participant B as Bencher
  PR->>BW: Trigger benchmarks
  BW->>R: Run HEAD and main
  R-->>A: Store sample reports
  CW->>A: Download reports
  CW->>C: Compare distributions
  C-->>CW: Return report and status
  CW->>GH: Publish required check
  CW->>B: Upload historical minima
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Statistical significance testing
  • ➕ Provides a formal measure of confidence instead of an empirical overlap rule.
  • ➕ Can quantify uncertainty for noisy benchmark distributions.
  • ➖ Nine samples may be insufficient for reliable inference.
  • ➖ Requires distribution assumptions or resampling and remains vulnerable to sequential runner drift.
  • ➖ Would make CI outcomes harder to explain and reproduce.
2. Interleave HEAD and main measurements
  • ➕ Reduces bias from temperature, load, and runner drift during sequential execution.
  • ➕ Could detect smaller regressions with greater confidence.
  • ➖ Requires changes to benchmark orchestration or generated hyperfine commands.
  • ➖ May increase execution overhead and complicate artifact generation.
  • ➖ Does not eliminate shared-runner contention.

Recommendation: Use the PR's same-run median and trimmed-range comparison as the immediate gate. It is transparent, conservative, fail-closed for invalid data, and compatible with the current artifacts while separating historical tracking from enforcement. Interleaving HEAD and main samples is the strongest future improvement if runner drift remains material; formal statistical testing should wait for more samples and an explicitly selected model.

Files changed (5) +295 / -32

Bug fix (3) +164 / -32
compare-integrated-benchmarks.mjsAdd fail-closed same-run benchmark comparator +79/-0

Add fail-closed same-run benchmark comparator

• Validates at least nine successful samples for each expected scenario and engine, then compares HEAD and main medians with trimmed sample-range separation. It renders a Markdown report and returns a failing CLI status only for confirmed regressions or invalid input.

.github/scripts/compare-integrated-benchmarks.mjs

pacquet-integrated-benchmark-comment.ymlPublish and enforce trusted same-run comparison checks +64/-11

Publish and enforce trusted same-run comparison checks

• Checks out the comparator from the trusted default branch, evaluates downloaded artifacts, and prepends the result to benchmark reports before enforcement. Bencher uploads no longer create gating checks; the workflow instead publishes the comparison under the existing required-check name on the PR head SHA.

.github/workflows/pacquet-integrated-benchmark-comment.yml

pacquet-integrated-benchmark.ymlIntegrate comparator tests and branch regression checks +21/-21

Integrate comparator tests and branch regression checks

• Triggers benchmark CI for comparator and comment-workflow changes, runs the Node test suite, and clarifies that Bencher only tracks historical minima. Non-main manual dispatches now run the same-run comparator, while historical Bencher thresholds no longer fail branch jobs.

.github/workflows/pacquet-integrated-benchmark.yml

Tests (1) +92 / -0
compare-integrated-benchmarks.test.mjsCover benchmark comparison rules and CLI behavior +92/-0

Cover benchmark comparison rules and CLI behavior

• Tests shared machine slowdowns, confirmed regressions, improvements, noisy results, outliers, invalid data, scenario coverage, command names, and exit codes. It also verifies the comparator remains synchronized with scenarios uploaded by the workflow.

.github/scripts/compare-integrated-benchmarks.test.mjs

Documentation (1) +39 / -0
compare-integrated-benchmarks.mdDocument same-run benchmark regression policy +39/-0

Document same-run benchmark regression policy

• Explains sample requirements, the 20% median and retained-range criteria, inconclusive outcomes, and remaining noise limitations. It also documents trusted workflow execution, Bencher's historical role, and preservation of the required check name.

.github/scripts/compare-integrated-benchmarks.md

@qodo-code-review

qodo-code-review Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Fork authors can forge benchmark passes ✗ Dismissed 🐞 Bug ⛨ Security
Description
Compare HEAD with main from the same runner accepts timing JSON produced by the
pull-request-controlled benchmark workflow, and Publish regression check on the PR commit maps its
successful exit directly to the required check conclusion. A fork can alter the upstream workflow to
upload nine valid but artificially low HEAD samples alongside normal main samples, so the privileged
workflow_run publishes success without measuring the regression.
Code

.github/workflows/pacquet-integrated-benchmark-comment.yml[128]

+          node trusted-tools/.github/scripts/compare-integrated-benchmarks.mjs benchmark-artifact > comparison.md
Relevance

●●● Strong

Security precedents favor separating untrusted fork-controlled execution or data from privileged
workflows and write-capable operations.

PR-#12654
PR-#11735

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The PR-triggered workflow checks out the pull request head and later uploads its generated JSON
files as the benchmark artifact. The privileged workflow downloads that artifact, passes it directly
to the trusted comparator, and converts the comparator outcome into a check run on the pull request
commit; validation of sample shape cannot establish that those samples came from genuine
measurements.

.github/workflows/pacquet-integrated-benchmark.yml[33-52]
.github/workflows/pacquet-integrated-benchmark.yml[278-288]
.github/workflows/pacquet-integrated-benchmark.yml[923-957]
.github/workflows/pacquet-integrated-benchmark-comment.yml[113-128]
.github/workflows/pacquet-integrated-benchmark-comment.yml[207-232]
.github/scripts/compare-integrated-benchmarks.mjs[33-43]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The privileged benchmark check treats JSON generated by a pull-request-controlled workflow as authoritative. A fork can replace the measurement or artifact-generation steps with fabricated valid samples and cause the required check to report success.

## Fix Focus Areas
- .github/workflows/pacquet-integrated-benchmark-comment.yml[123-128]
- .github/workflows/pacquet-integrated-benchmark-comment.yml[207-232]
- .github/workflows/pacquet-integrated-benchmark.yml[33-52]

## Recommended Fix
Make the required conclusion depend only on measurements produced by an immutable default-branch workflow and harness. At minimum, have the trusted workflow verify that all measurement-producing workflow, action, and harness files match the default branch before accepting the artifact; fail the check and require those infrastructure changes to land separately when they differ.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Failed samples lack regression coverage ✓ Resolved 📜 Skill insight ▣ Testability
Description
The failed case in the invalid-data test supplies one exit code for ten timing samples, so
samples() throws on the length mismatch before checking nonzero codes. Removing
exitCodes.some(code => code !== 0) would leave this test passing, so a correctly shaped report
containing a failed benchmark is not protected against regression.
Code

.github/scripts/compare-integrated-benchmarks.test.mjs[46]

+    { results: [{ ...valid.results[0], exit_codes: [1] }, valid.results[1]] },
Relevance

●●● Strong

Accepted testing precedents favor regression fixtures that exercise the intended validation branch,
not an earlier malformed-data failure.

PR-#12612
PR-#13702

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Compliance rule 3365260 requires tests to assert the changed effect rather than pass through another
failure path. The fixture at line 46 has ten timing samples but only one exit code, while
samples() checks array length before checking whether any exit code is nonzero; therefore the
assertion does not exercise rejection of an otherwise well-formed failed benchmark.

.github/scripts/compare-integrated-benchmarks.test.mjs[38-48]
.github/scripts/compare-integrated-benchmarks.mjs[36-42]
Skill: review-code

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The failed-benchmark fixture has fewer exit codes than timing samples, so it only exercises the length validation and cannot detect removal of the nonzero-exit validation.

## Fix Focus Areas
- .github/scripts/compare-integrated-benchmarks.test.mjs[38-48]

## Recommended Fix
Construct the failed case with an `exit_codes` array matching the timing sample count and set at least one entry to a nonzero value. Keep the assertion that `compare()` throws so the test fails if nonzero benchmark exits are accidentally accepted.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 64 rules
✅ Skills: review-code
✅ Cross-repo context — repo relationships
Review mode: ⚖️ Balanced: This changes CI benchmark-gating logic and its reporting threshold, with meaningful performance/regression-detection and workflow-facing behavior that warrants a careful single-pass review.

Grey Divider

Tip of the day
💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit b785cff

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

@greptile-apps

greptile-apps Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable new issues remain.

Reviews (3) · Last reviewed commit: "fix(ci): use a five percent benchmark to..."

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 8c86377

@zkochan

zkochan commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

@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).

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

greptile-apps[bot]
greptile-apps Bot previously approved these changes Sep 21, 2026
@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Sep 21, 2026
@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

@zkochan: I will review the current head commit 8c86377457, including the later test-coverage commits.

✅ Action performed

Full review finished.

@greptile-apps
greptile-apps Bot dismissed their stale review September 21, 2026 18:39

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

@zkochan

zkochan commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

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).

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 1edc9ad

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

@zkochan
zkochan merged commit bd4d526 into main Sep 21, 2026
39 checks passed
@zkochan
zkochan deleted the intb branch September 21, 2026 18:54
@zkochan

zkochan commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

@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).

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

@zkochan: I will review the current head 1edc9adfd2. I will check the 5% tolerance with the 2 ms floor and the benchmark documentation update.

⚠️ Action not completed

Pull request is closed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

zkochan added a commit that referenced this pull request Sep 21, 2026
…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.
u9g pushed a commit to u9g/pnpm that referenced this pull request Sep 25, 2026
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.
u9g pushed a commit to u9g/pnpm that referenced this pull request Sep 25, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant