Repository navigation
Description
The integrated benchmark has alerted on four consecutive pure-code-motion PRs. In at least one the changed code cannot execute in any benchmarked scenario, so the alerts are not measuring what they claim to.
pacquet-integrated-benchmark.yml already anticipates this. It reports each scenario's minimum latency rather than the mean, and the comment explains why:
the latency-free offline scenario is pure CPU/disk and swung ~30% between runs, tripping a spurious alert on a control run whose HEAD and main binaries were byte-identical
That mitigation is not holding.
Evidence
| PR | What changed | Alerts | Contradicting signal in the same run |
|---|---|---|---|
| pnpm/pnpm#13649 | deps-restorer split + file: fix |
+23.2%, +27.1%, +23.1% | peer-heavy-resolve −25.6% |
| pnpm/pnpm#13652 | tarball crate split | 1 alert | — |
| pnpm/pnpm#13657 | cli_args/audit.rs only |
+20.4% | — |
| pnpm/pnpm#13659 | frozen-install split | +20.5%, +24.4% | fresh-resolve −7.7% |
pnpm/pnpm#13657 is the decisive case. Its diff touches only the pnpm audit command. Nothing on the install path references that module — it is reachable only from the audit subcommand, which no benchmarked scenario invokes. A 20% install regression from it is not possible.
Two further tells:
- Opposite-direction swings within a single run. On refactor(deps-restorer): split the frozen install into its subsystems pnpm#13659,
peer-heavy-resolverose 24.4% whilefresh-resolvefell 7.7% — both pure resolution, in a PR that touches no resolver code. - Re-runs come back clean. Re-running the same commit on refactor(deps-restorer): split create_virtual_store, and fix stale
file:dependency copies pnpm#13649 and refactor(tarball): split the crate root into per-concern modules pnpm#13652 produced no alerts.
The affected scenarios are consistently the short hot ones (roughly 200-500 ms), where a fixed perturbation is a large fraction of the measurement.
Why it matters
--err fails the workflow on a breach, so every PR needs a manual re-run to get green. The larger cost is that a real regression in this size range is now indistinguishable from the noise — the gate cannot do the job it exists for.
Possible directions
Worth measuring before choosing:
- Re-run the control experiment. Benchmark byte-identical HEAD and main binaries N times and record per-scenario spread. That gives a real noise floor per scenario instead of assumptions, and says directly whether the min-metric mitigation still works.
- Raise
min_runsfor the short scenarios. The min only needs one uncontended run, so more samples strictly improve it — cheapest fix if the floor is contention-driven. - Widen the boundary, or drop
--err, for scenarios whose measured floor exceeds it. Keep them reported, stop them blocking. - Check whether runner heterogeneity is the cause. If baseline and PR runs land on different hardware generations, the minimum shifts with the machine and no sampling strategy fixes it; pinning the runner class would.
Happy to do (1) — it is a self-contained experiment and would tell us which of the rest is warranted.
Written by an agent (Claude Code, claude-opus-5).
Activity
ci(benchmark): gate only stable scenarios
fix(benchmark): avoid duplicate failure checks
zkochan commentedon Sep 20, 2026
Four data points from two PRs this week, one of which could not have affected the measured binary at all.
pnpm/pnpm#15107 — diff was 100% files under
pnpm/crates/cli/tests/suite/, which are never compiled into the release binary the benchmark measures.fresh-resolve.hot-cache.offline+23.13%,peer-heavy-resolve.hot-cache.offline+23.35%pnpm/pnpm#15160 — a retry wrapper whose Linux path is a single inlined call, since the retry loop is
#[cfg(windows)].NotFoundbranches on an error path, plus comments and a changesetrepeat-install.cold-cache.hot-store+20.59%fresh-resolve.hot-cache.offline+22.73%,linked-workspace-resolve.hot-cache.offline+55.23%Two things stand out.
The alerts do not name the same benchmark twice. Two runs of one commit produced three different alerting benchmarks. A regression moves the same measurement every time; this moves around.
The commit that carried the change passed, and the one that could not have caused a regression failed. Whatever the alerts track, it is not the diff.
fresh-resolve.hot-cache.offlinealerts in both PRs, including the test-only one, so it looks like the least stable of them.Margins are also thin against the boundaries: the first pnpm/pnpm#15160 alert was 7.37 ms against a 7.33 ms upper boundary, 0.5% over, on a 7 ms benchmark whose siblings that run came in at +1.34%, -0.75% and -0.09%.
Worth considering whether the sub-10 ms benchmarks can carry a percentage threshold at all on shared runners, and whether a diff that touches no code the benchmark compiles should be measured against a threshold in the first place.
Written by an agent (Claude Code, claude-opus-5).
zkochan commentedon Sep 21, 2026
Another data point, from pnpm/pnpm#15188 (a test-only PR plus a monomorphized generic parameter).
gvs-linker.fresh-restore.hot-cache.hot-storealerted twice on the same head: 123.84 ms, then 129.12 ms on a re-run, against a 123.56 ms upper boundary.The integrated-benchmark table from the same job shows why that is not the PR:
pacquet@HEADpacquet@mainpacquet@main's own minimum, measured on the same machine in the same job, is 132.1 ms. That is above the 123.56 ms boundary Bencher applied to HEAD. So main alerts on itself on that runner, and any PR branched from it inherits the alert regardless of its contents.This one is worth separating from the pure-variance cases already on this issue: repeated runs landed at 123.84 and 129.12 ms, so it is not only run-to-run spread. The boundary looks stale relative to what the runner currently measures for main.
The in-job HEAD-vs-main table is the check that survives this, since both sides run on the same machine. It is already produced and posted on every PR.
Written by an agent (Claude Code, claude-opus-5).
fix(deps-restorer): serialize shared slot repairs (pnpm/pnpm#13660)
zkochan commentedon Sep 26, 2026
Fixed by pnpm/pnpm#15228 and pnpm/pnpm#15231.
--err, so historical alerts no longer gate PRs.The new check runs on merged PRs: 16205, 16197, 16196, 16187 and 15886 all report "Same-run benchmark comparison" and passed.
Written by an agent (Claude Code, claude-opus-5-5).