Skip to content

ci(benchmark): threshold Bencher on the minimum latency (via BMF) - #13111

Merged
zkochan merged 1 commit into
mainfrom
bench/reduce-hot-scenario-variance
Jul 18, 2026
Merged

zkochan merged 1 commit into
mainfrom
bench/reduce-hot-scenario-variance

Conversation

@zkochan

@zkochan zkochan commented Jul 17, 2026 •

Copy link
Copy Markdown
Member

Warning

The Post benchmark comment job (Upload PR results to Bencher) fails on this PR — this is expected and self-heals on merge. Merge through it.

workflow_run-triggered workflows always run from the default branch, so the comment workflow here runs main's copy, which still uses --adapter shell_hyperfine. This PR emits results in BMF (--adapter json), which shell_hyperfine can't parse — hence the red upload step. Once this lands on main, main's comment workflow uses --adapter json and the pipeline is consistent again. The build workflow's own upload (PR code, --adapter json) already succeeds, so Bencher does receive this PR's min-based data.

After merge: confirm the first Pacquet Integrated-Benchmark run on main is green (build → BMF, comment → json, consistent).

Summary

Make the integrated-benchmark's regression signal reliable on shared CI runners by having Bencher threshold on the minimum latency instead of the mean.

The problem

The benchmark's timed work is CPU- and disk-bound, not network-bound. The simulated network latency only adds a deterministic floor, and the noisiest scenario — fresh-resolve.hot-cache.offline — runs install --offline with no network at all (pure mirror reads + packument parsing). So the run-to-run variance is host contention on a shared cloud VM (CPU steal, frequency scaling, disk I/O, page-cache pressure across the four sequentially-measured arms), which the mean tracks faithfully.

That surfaced as spurious alerts. This PR's own benchmark is the proof: because it only changes the workflow YAML, pacquet@HEAD and pacquet@main are byte-identical binaries, yet the mean-based threshold still swung the offline scenario ~30% and alerted. With identical binaries, that's 100% measurement noise.

The fix

Report each scenario's minimum latency to Bencher. Contention only ever adds time, so the minimum is the run least perturbed by a noisy neighbour and the truest signal of a real code regression — the estimator the robust-benchmarking literature (arXiv:1608.04295) and Julia's CI (BenchmarkTools) use for exactly this. The "noise is additive" property is universal, so this applies to every scenario.

Done honestly via Bencher Metric Format (BMF) rather than by doctoring hyperfine's mean field: build_bencher_file emits {"<scenario>": {"latency": {"value": <min>}}} and the integrated-benchmark uploads use --adapter json. value is nanoseconds (min seconds × 1e9), matching the unit the shell_hyperfine adapter established for the latency measure, so the existing baseline stays comparable. A missing/renamed target fails the step rather than silently dropping a scenario.

Because the minimum only needs one uncontended run to be stable, hyperfine's default sampling (1 warmup, ≥10 runs) suffices — no --warmup/--min-runs bump. The human-readable PR comment still reports mean ± σ; only the alerting signal moves to the min.

Scope

  • Only the two integrated-benchmark uploaders (pacquet-integrated-benchmark.yml, pacquet-integrated-benchmark-comment.yml) switch to --adapter json.
  • The TypeScript test-duration and micro-benchmark uploaders (ci-performance-bencher-upload.yml, benchmark.yml) are untouched — they consume separate ci-performance-* artifacts, and their measurements are single-sample (mean = min = max), so min-based thresholding would be a no-op there anyway.

Transition

Once this lands on main, the main baseline re-establishes on min values on its next run; PRs then compare min-vs-min. During the first PR run after merge, a PR's new min is compared against main's old mean baseline (min ≤ mean), so the transition can only under-report a regression, never invent one.

Squash Commit Body

Report each scenario's minimum latency to Bencher instead of the mean, so the
threshold tracks the min. On shared CI runners the timed work is CPU/disk-bound
(the simulated latency only adds a deterministic floor, and the noisiest
scenario runs --offline with no network), so the mean drifts run-to-run with
host contention — byte-identical binaries differed ~30% on the offline scenario
and tripped a spurious alert.

Contention only ever adds time, so the minimum is the run least perturbed by a
noisy neighbour and the truest regression signal. Emit Bencher Metric Format
and upload the integrated benchmark with --adapter json, reporting the min
honestly as the value (nanoseconds, min seconds x 1e9, to match the latency
measure's unit) rather than relabelling hyperfine's mean field. The TS
test-duration and micro-benchmark uploads keep shell_hyperfine (single-sample,
so min equals mean there). Because the min only needs one uncontended run,
hyperfine's default sampling suffices. The human comment still shows mean +/- σ.

Note: the workflow_run-triggered comment workflow runs from the default branch,
so this PR's own benchmark-comment upload fails (main still uses
--adapter shell_hyperfine); it self-heals once this lands on main.

Checklist

  • Added or updated tests. — N/A: CI benchmark-config change, no product code.
  • Updated the documentation if needed. — the workflow step comments explain the rationale.

Written by an agent (Claude Code, claude-opus-4-8).

Copilot AI review requested due to automatic review settings July 17, 2026 20:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

CI benchmark: increase warmup/min-runs for sub-second integrated scenarios

⚙️ Configuration changes ✨ Enhancement 🕐 Less than 10 minutes

Grey Divider

AI Description

• Increase hyperfine sampling for three sub-second integrated-benchmark scenarios to reduce
 variance.
• Add workflow comments documenting sequential-arm bias and rationale for higher warmup/min-runs.
• Keep multi-second cold scenarios unchanged to avoid excess CI wall-clock time.
Diagram

graph TD
  A["GitHub Actions job"] --> B["just integrated-benchmark"] --> C["hyperfine (4 arms)"] --> D["Scenario runs"] --> E["Benchmark reports"]
  F{{"Shared runner load"}} --> C
  G["--warmup=3 --min-runs=20"] --> D
  subgraph Legend
    direction LR
    _job["Workflow step"] ~~~ _cfg["Sampling flags"] ~~~ _risk{{"External variance"}}
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Split benchmark arms into separate hyperfine invocations/jobs
  • ➕ Removes sequential-arm coupling within one hyperfine run
  • ➕ Easier to attribute variance to a single arm/job
  • ➖ More workflow complexity and duplication
  • ➖ May increase total CI time and artifact handling complexity
2. Change alerting metric (e.g., median/min, or robust regression thresholding)
  • ➕ Directly targets false positives from transient spikes/outliers
  • ➕ Can keep runtime similar to today
  • ➖ Requires changes in the benchmark harness/reporting pipeline
  • ➖ May mask real regressions if the metric is too forgiving
3. Use dedicated/isolated runners for benchmarks
  • ➕ Reduces external noise at the source
  • ➕ Improves signal quality across all scenarios, not just sub-second ones
  • ➖ Infrastructure cost and operational overhead
  • ➖ May be unavailable depending on CI environment constraints

Recommendation: The PR’s approach (raise warmup/min-runs only for sub-second scenarios) is a good incremental mitigation: it reduces variance where additional samples are cheap, avoids blowing up wall-clock time for slow scenarios, and keeps the harness unchanged. Consider a follow-up to address the root cause (sequential-arm bias) via arm/job interleaving or more robust alerting metrics if false positives persist.

Files changed (1) +22 / -5

Other (1) +22 / -5
pacquet-integrated-benchmark.ymlIncrease sampling for sub-second integrated benchmark scenarios +22/-5

Increase sampling for sub-second integrated benchmark scenarios

• Adds documentation explaining sequential hyperfine arm bias on shared runners and why it causes noisy regressions. Updates three sub-second 'just integrated-benchmark' invocations to pass '--warmup=3' and '--min-runs=20', while leaving slower scenarios unchanged to control CI duration.

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

@coderabbitai

coderabbitai Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e4e883e2-1649-4d79-86b5-1138657d38aa

📥 Commits

Reviewing files that changed from the base of the PR and between 8ec9544 and 93ee8f6.

📒 Files selected for processing (2)
  • .github/workflows/pacquet-integrated-benchmark-comment.yml
  • .github/workflows/pacquet-integrated-benchmark.yml
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/pacquet-integrated-benchmark-comment.yml
  • .github/workflows/pacquet-integrated-benchmark.yml

📝 Walkthrough

Walkthrough

The integrated benchmark workflows now generate Bencher Metric Format JSON from each scenario’s minimum latency, converted to nanoseconds, and upload it with Bencher’s JSON adapter. Reports continue to display mean ± σ.

Changes

Integrated benchmark workflow metric ingestion

Layer / File(s) Summary
Generate minimum-latency Metric Format JSON
.github/workflows/pacquet-integrated-benchmark.yml
Report text distinguishes mean ± σ from minimum-latency Bencher thresholds, and the jq transformation emits scenario-keyed latency values in nanoseconds.
Upload Metric Format JSON
.github/workflows/pacquet-integrated-benchmark.yml, .github/workflows/pacquet-integrated-benchmark-comment.yml
Bencher upload commands use the json adapter instead of shell_hyperfine.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: copilot

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bench/reduce-hot-scenario-variance

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.

@greptile-apps

greptile-apps Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Safe to merge — touches only CI workflow YAML with no product code changes.

The change is confined to benchmark workflow configuration. The BMF JSON output and --adapter json flag are consistent across both upload paths. The only finding is a jq first()// interaction that makes the informative error message unreachable; the step still fails, just with a less helpful parse error.

No files require special attention.

Reviews (5): Last reviewed commit: "ci(benchmark): threshold Bencher on the ..." | Re-trigger Greptile

@qodo-code-review

qodo-code-review Bot commented Jul 17, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 18 rules

Grey Divider


Action required

1. Wrong hyperfine result selector ✓ Resolved 🐞 Bug ≡ Correctness ⭐ New
Description
build_bencher_file selects the target result with select(.command == $command), but
integrated-benchmark keys hyperfine results by command_name (falling back to command) while the
executed command itself is a bash <script> string. This can cause the jq transform to miss
pacquet@HEAD/pnpr@HEAD and emit invalid/missing metric values for Bencher.
Code

.github/workflows/pacquet-integrated-benchmark.yml[R547-548]

+                'first(.results[] | select(.command == $c))
+                  | {($s): {latency: {value: (.min * 1e9)}}}' \
Evidence
The workflow currently filters on .command, but integrated-benchmark constructs hyperfine runs
with --command-name <id> and a separate executed command (bash <script_path>). The
integrated-benchmark code also explicitly prefers command_name when identifying results, so
filtering on .command is inconsistent with how targets are identified elsewhere in the repo.

.github/workflows/pacquet-integrated-benchmark.yml[536-552]
pnpm/tasks/integrated-benchmark/src/work_env.rs[621-628]
pnpm/tasks/integrated-benchmark/src/work_env.rs[154-162]
pnpm/tasks/integrated-benchmark/src/work_env.rs[1047-1064]
pnpm/tasks/integrated-benchmark/src/work_env.rs[1138-1149]

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 workflow’s jq transform filters hyperfine results with `select(.command == $c)`, but the integrated-benchmark harness treats the stable identifier as `command_name` (falling back to `command`). Since the harness executes `bash <script_path>` per target, `.command` may not equal `pacquet@HEAD`/`pnpr@HEAD`, causing the transform to miss the intended entry and generate an invalid/missing metric payload for Bencher.

## Issue Context
- The workflow passes `$command` values like `pacquet@HEAD` / `pnpr@HEAD`.
- integrated-benchmark invokes hyperfine with `--command-name <id>` while the actual command is `bash <script_path>`.
- integrated-benchmark’s own parsing prefers `command_name` via `HyperfineCommand::name()`.

## Fix Focus Areas
- .github/workflows/pacquet-integrated-benchmark.yml[546-552]

## Suggested fix
Update the jq selector to match on `command_name` when present, falling back to `command`, and fail fast if the result is missing. For example:

```bash
jq --arg s "$name" --arg c "$command" '
 (first(.results[] | select((.command_name // .command) == $c))
   // error("missing hyperfine result for \($c) in \($s)"))
 | {($s): {latency: {value: (.min * 1e9)}}}
' "$src" > "$dst"
```

This keeps compatibility with any reports that don’t include `command_name`, and makes missing/renamed targets fail the step instead of producing a malformed Bencher file.

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



Remediation recommended

2. Minimum hides slow regressions 🐞 Bug ➹ Performance
Description
By changing the Bencher-uploaded mean/median to the single minimum run, the regression gate
becomes sensitive to the best-case iteration and can miss regressions that affect typical/most runs
(i.e., reduced detection sensitivity). This risk is amplified in hot-cache/hot-store scenarios where
the harness intentionally preserves state across iterations, allowing later timed runs to be
systematically faster than earlier ones.
Code

.github/workflows/pacquet-integrated-benchmark.yml[557]

+                '.results |= [.[] | select(.command == $c) | .command = $s | .mean = .min | .median = .min]' \
Evidence
The workflow documents and implements rewriting Bencher’s mean to min. The integrated-benchmark
harness explicitly preserves hot cache/store across iterations for hot-cache scenarios, meaning
iterations can get faster over time; using the single minimum therefore tends to select a best-case
(often latest/warmest) run rather than a central tendency.

.github/workflows/pacquet-integrated-benchmark.yml[531-540]
.github/workflows/pacquet-integrated-benchmark.yml[554-558]
pnpm/tasks/integrated-benchmark/src/work_env.rs[521-529]
pnpm/tasks/integrated-benchmark/src/work_env.rs[583-589]

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 workflow rewrites performance results so Bencher thresholds on the **minimum** observed iteration by setting `mean`/`median` to `min`. Minimum-of-N is a best-case statistic; with more runs it becomes more extreme and can mask regressions that impact typical performance.

## Issue Context
The harness preserves hot cache/store state across iterations for certain scenarios, and warmup only removes early cold-start effects; timed iterations can still have non-identical conditions, making the minimum especially optimistic.

## Fix Focus Areas
Prefer a more robust estimator that still dampens additive CI contention noise, e.g.:
- Use a low percentile (p10/p20) computed from `.times | sort`, then set Bencher’s signal to that value.
- Or use median (less sensitive to outliers) if it’s acceptable.
- If you continue to derive a new “signal value”, keep all hyperfine fields consistent with that chosen statistic (see the other finding).

- .github/workflows/pacquet-integrated-benchmark.yml[531-540]
- .github/workflows/pacquet-integrated-benchmark.yml[557-557]

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


3. Inconsistent Bencher JSON stats ✓ Resolved 🐞 Bug ☼ Reliability
Description
The jq transform rewrites .mean/.median to .min but leaves other summary fields (stddev,
max, times, etc.) describing the original distribution, creating a self-contradictory
hyperfine-shaped report. Even if Bencher currently keys off mean, any downstream consumer that
uses times/stddev will see mismatched statistics.
Code

.github/workflows/pacquet-integrated-benchmark.yml[557]

+                '.results |= [.[] | select(.command == $c) | .command = $s | .mean = .min | .median = .min]' \
Evidence
The workflow explicitly overwrites mean/median with min for Bencher uploads, but does not
adjust other fields. The repo’s own generator for hyperfine-shaped Bencher inputs emits consistent
stats across fields, indicating the expected shape is self-consistent.

.github/workflows/pacquet-integrated-benchmark.yml[531-540]
.github/workflows/pacquet-integrated-benchmark.yml[554-561]
.github/scripts/bencher-result-from-pnpm-summary.mjs[31-46]

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 workflow mutates per-scenario hyperfine JSON before uploading to Bencher by setting `mean`/`median` equal to `min`, but it does not update related fields (`stddev`, `max`, `times`, etc.). This produces an internally inconsistent “hyperfine-shaped” report.

## Issue Context
The repo already generates hyperfine-shaped JSON elsewhere with consistent fields (mean/median/min/max/times aligned), suggesting consumers may rely on those relationships.

## Fix Focus Areas
Update the jq transform so the derived Bencher JSON is statistically coherent for the chosen signal:
- If you want Bencher to represent *minimum latency* as the only sample, rewrite the full stat set consistently (e.g., set `mean/median/min/max` to the chosen value, `stddev` to `0`, and `times` to `[chosen]`).
- Alternatively, keep the original distribution intact and encode the chosen signal in a separate field only if the downstream adapter supports it.

- .github/workflows/pacquet-integrated-benchmark.yml[557-557]

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


4. #13014 historical reference ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
A workflow comment embeds a specific past incident reference (`spurious regression alert on
pnpm/pnpm#13014`) instead of describing current behavior/rationale generically. This conflicts with
the rule to keep historical context out of inline comments, reducing long-term readability and
increasing staleness risk.
Code

.github/workflows/pacquet-integrated-benchmark.yml[R324-325]

+        # above. This is the scenario whose sequential-arm variance produced the
+        # spurious regression alert on pnpm/pnpm#13014.
Evidence
The checklist rule forbids historical references in inline comments; the added comment explicitly
cites a past regression alert (pnpm/pnpm#13014) as justification, which is historical context
rather than current-behavior documentation.

Rule 772199: Comments must describe current behavior, not historical implementations
.github/workflows/pacquet-integrated-benchmark.yml[322-325]

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

## Issue description
A new comment references a specific historical incident (`pnpm/pnpm#13014`) rather than documenting the current behavior/rationale.

## Issue Context
Inline comments should explain current constraints/intent; historical examples belong in PR description, commit messages, or external docs/issues.

## Fix Focus Areas
- .github/workflows/pacquet-integrated-benchmark.yml[324-325]

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


Grey Divider

Previous review results

Review updated until commit 93ee8f6

Results up to commit 33cef42


🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)


Remediation recommended
1. #13014 historical reference ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
A workflow comment embeds a specific past incident reference (`spurious regression alert on
pnpm/pnpm#13014`) instead of describing current behavior/rationale generically. This conflicts with
the rule to keep historical context out of inline comments, reducing long-term readability and
increasing staleness risk.
Code

.github/workflows/pacquet-integrated-benchmark.yml[R324-325]

+        # above. This is the scenario whose sequential-arm variance produced the
+        # spurious regression alert on pnpm/pnpm#13014.
Evidence
The checklist rule forbids historical references in inline comments; the added comment explicitly
cites a past regression alert (pnpm/pnpm#13014) as justification, which is historical context
rather than current-behavior documentation.

Rule 772199: Comments must describe current behavior, not historical implementations
.github/workflows/pacquet-integrated-benchmark.yml[322-325]

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

## Issue description
A new comment references a specific historical incident (`pnpm/pnpm#13014`) rather than documenting the current behavior/rationale.

## Issue Context
Inline comments should explain current constraints/intent; historical examples belong in PR description, commit messages, or external docs/issues.

## Fix Focus Areas
- .github/workflows/pacquet-integrated-benchmark.yml[324-325]

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


Results up to commit 4c02182


🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)


Remediation recommended
1. Minimum hides slow regressions 🐞 Bug ➹ Performance
Description
By changing the Bencher-uploaded mean/median to the single minimum run, the regression gate
becomes sensitive to the best-case iteration and can miss regressions that affect typical/most runs
(i.e., reduced detection sensitivity). This risk is amplified in hot-cache/hot-store scenarios where
the harness intentionally preserves state across iterations, allowing later timed runs to be
systematically faster than earlier ones.
Code

.github/workflows/pacquet-integrated-benchmark.yml[557]

+                '.results |= [.[] | select(.command == $c) | .command = $s | .mean = .min | .median = .min]' \
Evidence
The workflow documents and implements rewriting Bencher’s mean to min. The integrated-benchmark
harness explicitly preserves hot cache/store across iterations for hot-cache scenarios, meaning
iterations can get faster over time; using the single minimum therefore tends to select a best-case
(often latest/warmest) run rather than a central tendency.

.github/workflows/pacquet-integrated-benchmark.yml[531-540]
.github/workflows/pacquet-integrated-benchmark.yml[554-558]
pnpm/tasks/integrated-benchmark/src/work_env.rs[521-529]
pnpm/tasks/integrated-benchmark/src/work_env.rs[583-589]

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 workflow rewrites performance results so Bencher thresholds on the **minimum** observed iteration by setting `mean`/`median` to `min`. Minimum-of-N is a best-case statistic; with more runs it becomes more extreme and can mask regressions that impact typical performance.

## Issue Context
The harness preserves hot cache/store state across iterations for certain scenarios, and warmup only removes early cold-start effects; timed iterations can still have non-identical conditions, making the minimum especially optimistic.

## Fix Focus Areas
Prefer a more robust estimator that still dampens additive CI contention noise, e.g.:
- Use a low percentile (p10/p20) computed from `.times | sort`, then set Bencher’s signal to that value.
- Or use median (less sensitive to outliers) if it’s acceptable.
- If you continue to derive a new “signal value”, keep all hyperfine fields consistent with that chosen statistic (see the other finding).

- .github/workflows/pacquet-integrated-benchmark.yml[531-540]
- .github/workflows/pacquet-integrated-benchmark.yml[557-557]

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


2. Inconsistent Bencher JSON stats ✓ Resolved 🐞 Bug ☼ Reliability
Description
The jq transform rewrites .mean/.median to .min but leaves other summary fields (stddev,
max, times, etc.) describing the original distribution, creating a self-contradictory
hyperfine-shaped report. Even if Bencher currently keys off mean, any downstream consumer that
uses times/stddev will see mismatched statistics.
Code

.github/workflows/pacquet-integrated-benchmark.yml[557]

+                '.results |= [.[] | select(.command == $c) | .command = $s | .mean = .min | .median = .min]' \
Evidence
The workflow explicitly overwrites mean/median with min for Bencher uploads, but does not
adjust other fields. The repo’s own generator for hyperfine-shaped Bencher inputs emits consistent
stats across fields, indicating the expected shape is self-consistent.

.github/workflows/pacquet-integrated-benchmark.yml[531-540]
.github/workflows/pacquet-integrated-benchmark.yml[554-561]
.github/scripts/bencher-result-from-pnpm-summary.mjs[31-46]

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 workflow mutates per-scenario hyperfine JSON before uploading to Bencher by setting `mean`/`median` equal to `min`, but it does not update related fields (`stddev`, `max`, `times`, etc.). This produces an internally inconsistent “hyperfine-shaped” report.

## Issue Context
The repo already generates hyperfine-shaped JSON elsewhere with consistent fields (mean/median/min/max/times aligned), suggesting consumers may rely on those relationships.

## Fix Focus Areas
Update the jq transform so the derived Bencher JSON is statistically coherent for the chosen signal:
- If you want Bencher to represent *minimum latency* as the only sample, rewrite the full stat set consistently (e.g., set `mean/median/min/max` to the chosen value, `stddev` to `0`, and `times` to `[chosen]`).
- Alternatively, keep the original distribution intact and encode the chosen signal in a separate field only if the downstream adapter supports it.

- .github/workflows/pacquet-integrated-benchmark.yml[557-557]

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


Qodo Logo

@qodo-code-review

qodo-code-review Bot commented Jul 17, 2026 •

Copy link
Copy Markdown

PR Code Suggestions ✨

Latest suggestions up to 52e79b3

Warning

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

CategorySuggestion                                                                                                                                    Impact
General
Keep transformed benchmark statistics consistent

Normalize all distribution fields in the hyperfine JSON results by setting max,
stddev, and times to match the minimum value. This ensures internally consistent
measurements for the shell_hyperfine adapter when using min as the alerting
metric.

.github/workflows/pacquet-integrated-benchmark.yml [543]

-'.results |= [.[] | select(.command == $c) | .command = $s | .mean = .min | .median = .min]' \
+'.results |= [.[] | select(.command == $c) | .command = $s | .mean = .min | .median = .min | .max = .min | .stddev = 0 | .times = [.min]]' \
  • Apply / Chat
Suggestion importance[1-10]: 8

__

Why: Modifying only mean and median without adjusting stddev, max, and times can result in inconsistent uncertainty bounds when parsed by Bencher, potentially skewing regression alerts.

Medium
  • More

Previous suggestions

Suggestions up to commit 33cef42
CategorySuggestion                                                                                                                                    Impact
General
DRY sampling flags with env var

Extract --warmup=3 --min-runs=20 into a shared environment variable to reduce
duplication.

.github/workflows/pacquet-integrated-benchmark.yml [296-297]

+env:
+  HYPERFINE_SAMPLING: "--warmup=3 --min-runs=20"
 run: |
-  just integrated-benchmark --reuse-prebuilt-binaries --warmup=3 --min-runs=20 --scenario=... $BENCHMARK_TARGETS
+  just integrated-benchmark --reuse-prebuilt-binaries $HYPERFINE_SAMPLING --scenario=... $BENCHMARK_TARGETS
Suggestion importance[1-10]: 3

__

Why: Extracting repeated benchmark flags into an environment variable reduces duplication and slightly improves maintainability, though the current repetition is minimal.

Low

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jul 17, 2026
@github-actions

github-actions Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 93ee8f64cd7d

Each scenario reports direct installs and pnpr installs. 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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.552 ± 0.133 2.354 2.728 1.73 ± 0.20
pacquet@main 2.438 ± 0.156 2.330 2.755 1.66 ± 0.20
pnpr@HEAD 1.556 ± 0.139 1.397 1.738 1.06 ± 0.15
pnpr@main 1.472 ± 0.154 1.347 1.795 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.5515067771999997,
      "stddev": 0.13344703118046844,
      "median": 2.5258518913,
      "user": 1.6678345799999998,
      "system": 1.3509383399999997,
      "min": 2.3540543308,
      "max": 2.7283129477999997,
      "times": [
        2.4516716738,
        2.3540543308,
        2.6840927457999997,
        2.4195818148,
        2.5481034277999997,
        2.4618598568,
        2.7009911298,
        2.7283129477999997,
        2.5036003548,
        2.6627994898
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.4375050652999994,
      "stddev": 0.15575744329787325,
      "median": 2.3566747183,
      "user": 1.6760530800000002,
      "system": 1.3213946399999998,
      "min": 2.3299711097999998,
      "max": 2.7554031948,
      "times": [
        2.4614551188,
        2.3382958038,
        2.3608618978,
        2.3440519488,
        2.3428558167999998,
        2.3299711097999998,
        2.7554031948,
        2.4008351418,
        2.6888330818,
        2.3524875387999997
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5559467828000002,
      "stddev": 0.13876821055246555,
      "median": 1.4984522408,
      "user": 1.19698608,
      "system": 1.15140994,
      "min": 1.3972397848,
      "max": 1.7383829728,
      "times": [
        1.3972397848,
        1.7306547438,
        1.4451589108,
        1.7383829728,
        1.4444761098,
        1.4581389448000002,
        1.7239373578000001,
        1.6440893858,
        1.4386240808000001,
        1.5387655368
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.4720161166000003,
      "stddev": 0.15410601098566734,
      "median": 1.4121617158,
      "user": 1.25744348,
      "system": 1.2486652399999998,
      "min": 1.3472985238,
      "max": 1.7948418768,
      "times": [
        1.3512886458000002,
        1.4157081578000001,
        1.7948418768,
        1.4397179618,
        1.3639997048,
        1.6334909368000001,
        1.3472985238,
        1.3537730918000002,
        1.4086152738,
        1.6114269928
      ]
    }
  ]
}

Scenario: Isolated linker: fresh restore, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 252.8 ± 8.5 244.5 272.7 1.00
pacquet@main 257.2 ± 9.8 243.1 275.8 1.02 ± 0.05
pnpr@HEAD 271.8 ± 11.7 260.1 297.8 1.08 ± 0.06
pnpr@main 263.7 ± 6.8 256.3 277.3 1.04 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.2527937030199999,
      "stddev": 0.008509725033745086,
      "median": 0.24981591592,
      "user": 0.19721117999999999,
      "system": 0.51137114,
      "min": 0.24450478592000002,
      "max": 0.27270169092,
      "times": [
        0.24810226292,
        0.27270169092,
        0.24450478592000002,
        0.24653701892000002,
        0.25082369392,
        0.25800875891999997,
        0.25919340692,
        0.24880813792,
        0.24666258092,
        0.25259469292
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.25722324352000003,
      "stddev": 0.009845666689614665,
      "median": 0.25671757842,
      "user": 0.21648207999999997,
      "system": 0.50158874,
      "min": 0.24306689592000003,
      "max": 0.27575136792,
      "times": [
        0.24845205392000003,
        0.26659431192,
        0.25797909492,
        0.27575136792,
        0.26137564192,
        0.25545606192,
        0.26256645091999997,
        0.24703315792000002,
        0.24306689592000003,
        0.25395739792
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.27177495882,
      "stddev": 0.011654090629405648,
      "median": 0.27071295392,
      "user": 0.20855487999999997,
      "system": 0.5315781399999999,
      "min": 0.26010831792,
      "max": 0.29783783892,
      "times": [
        0.27095910992,
        0.26023724391999997,
        0.26698018892,
        0.26132081992,
        0.26010831792,
        0.27123094892,
        0.28287682892,
        0.29783783892,
        0.27573149292,
        0.27046679792
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.26367019352,
      "stddev": 0.006804093982701266,
      "median": 0.26189671092,
      "user": 0.19991328,
      "system": 0.51982924,
      "min": 0.25632396092,
      "max": 0.27725312892,
      "times": [
        0.27725312892,
        0.26086776392,
        0.25767577492,
        0.26332346292,
        0.25841407892,
        0.26596776092,
        0.26292565792,
        0.27325949592,
        0.26069084991999997,
        0.25632396092
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.801 ± 0.045 2.724 2.862 1.79 ± 0.16
pacquet@main 2.774 ± 0.057 2.672 2.877 1.77 ± 0.16
pnpr@HEAD 1.563 ± 0.136 1.433 1.779 1.00
pnpr@main 1.656 ± 0.136 1.448 1.890 1.06 ± 0.13
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.80107425684,
      "stddev": 0.04527705613711315,
      "median": 2.8121235923400003,
      "user": 2.1559036199999997,
      "system": 1.6189268,
      "min": 2.7236561603400005,
      "max": 2.86182288134,
      "times": [
        2.74954574834,
        2.75573829434,
        2.8058005173400002,
        2.8184466673400004,
        2.7236561603400005,
        2.7907783913400004,
        2.83476160434,
        2.82572455934,
        2.86182288134,
        2.84446774434
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.77354863784,
      "stddev": 0.05736690235062669,
      "median": 2.77023411434,
      "user": 2.17627772,
      "system": 1.5963404999999997,
      "min": 2.67226966034,
      "max": 2.8772212883400003,
      "times": [
        2.83241799934,
        2.8772212883400003,
        2.8111366173400003,
        2.73542975434,
        2.74943222534,
        2.73392020734,
        2.67226966034,
        2.7831903973400003,
        2.77294952434,
        2.76751870434
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5626217856399998,
      "stddev": 0.13642615038104403,
      "median": 1.5322700573399999,
      "user": 1.37375752,
      "system": 1.3359583000000002,
      "min": 1.43342868934,
      "max": 1.77884767034,
      "times": [
        1.43342868934,
        1.4366730453399998,
        1.64105372234,
        1.77884767034,
        1.46603879134,
        1.44698152534,
        1.59850132334,
        1.76808641734,
        1.4461747943399998,
        1.61043187734
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.65557536604,
      "stddev": 0.13597720672399088,
      "median": 1.67730253784,
      "user": 1.45399222,
      "system": 1.5007017999999999,
      "min": 1.44812683034,
      "max": 1.8903289303400002,
      "times": [
        1.8903289303400002,
        1.67928809234,
        1.7804052263399999,
        1.44812683034,
        1.52611752934,
        1.73008381534,
        1.67531698334,
        1.56968129134,
        1.5268556143399998,
        1.72954934734
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 703.3 ± 65.1 593.6 814.5 1.91 ± 0.18
pacquet@main 682.0 ± 26.4 651.1 737.4 1.85 ± 0.08
pnpr@HEAD 373.0 ± 8.6 353.5 381.7 1.01 ± 0.03
pnpr@main 368.4 ± 7.2 354.9 377.4 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.70328788586,
      "stddev": 0.06508703066260994,
      "median": 0.71657365096,
      "user": 0.9098095199999998,
      "system": 0.9058491399999999,
      "min": 0.59357838246,
      "max": 0.8144685634600001,
      "times": [
        0.64287996746,
        0.59357838246,
        0.63899635546,
        0.6834502624600001,
        0.8144685634600001,
        0.73436054846,
        0.70790552646,
        0.73122905746,
        0.7607684194600001,
        0.72524177546
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.68200101656,
      "stddev": 0.026367615140536423,
      "median": 0.68195391646,
      "user": 0.89952092,
      "system": 0.84660494,
      "min": 0.65107098046,
      "max": 0.73741529246,
      "times": [
        0.69601803846,
        0.68484378146,
        0.69100505046,
        0.69716512846,
        0.73741529246,
        0.6773347414600001,
        0.6511560724600001,
        0.65493702846,
        0.65107098046,
        0.67906405146
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.37299517106,
      "stddev": 0.008618799922511628,
      "median": 0.37655755946,
      "user": 0.27758112,
      "system": 0.65394074,
      "min": 0.35352850946000003,
      "max": 0.38167638646,
      "times": [
        0.36992835146,
        0.37956106446000004,
        0.37678614546,
        0.37994036446,
        0.36711547546,
        0.35352850946000003,
        0.37769209746000004,
        0.36739434246,
        0.37632897346,
        0.38167638646
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.36840381096,
      "stddev": 0.0072342217108791115,
      "median": 0.36949166546,
      "user": 0.25717742,
      "system": 0.66420164,
      "min": 0.35488655846,
      "max": 0.37744372246,
      "times": [
        0.35488655846,
        0.37590684846,
        0.37744372246,
        0.36394673946,
        0.37397150746,
        0.36398987646000003,
        0.37207388446,
        0.37304146546,
        0.36186806046000003,
        0.36690944646
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + hot store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.032 ± 0.045 1.981 2.092 6.00 ± 0.28
pacquet@main 1.966 ± 0.022 1.927 2.001 5.81 ± 0.25
pnpr@HEAD 0.338 ± 0.014 0.308 0.359 1.00
pnpr@main 0.362 ± 0.013 0.345 0.390 1.07 ± 0.06
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.03153775918,
      "stddev": 0.04546067156299928,
      "median": 2.02493534268,
      "user": 1.31828232,
      "system": 1.0209852799999999,
      "min": 1.98070110368,
      "max": 2.09216683768,
      "times": [
        2.05894770968,
        2.04602558068,
        2.08430916068,
        2.08128509068,
        2.09216683768,
        1.9924273986799999,
        2.00384510468,
        1.98897120868,
        1.98669839668,
        1.98070110368
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.96580274528,
      "stddev": 0.022296113462072137,
      "median": 1.96650615268,
      "user": 1.18265812,
      "system": 0.9783657800000001,
      "min": 1.92730778568,
      "max": 2.00136960068,
      "times": [
        1.9704671626799999,
        1.99746760368,
        1.9589161426800001,
        1.96384317668,
        1.95843514968,
        1.96916912868,
        1.9418390216799999,
        1.92730778568,
        1.96921268068,
        2.00136960068
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.33837836768,
      "stddev": 0.013927209119943943,
      "median": 0.34300371818000003,
      "user": 0.24236491999999998,
      "system": 0.59100648,
      "min": 0.30832379568,
      "max": 0.35915771568000004,
      "times": [
        0.34664864368000003,
        0.34644142768,
        0.34418949668000004,
        0.34181793968,
        0.33159512068,
        0.32964573768000005,
        0.30832379568,
        0.33059779968,
        0.35915771568000004,
        0.34536599968000004
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.36224691668000003,
      "stddev": 0.01316190568973326,
      "median": 0.35929659018000004,
      "user": 0.22721551999999998,
      "system": 0.6395061799999999,
      "min": 0.34473198468000005,
      "max": 0.39006426868000005,
      "times": [
        0.34908288168,
        0.35748983768000003,
        0.35942724168,
        0.35916593868,
        0.34473198468000005,
        0.36303543568,
        0.39006426868000005,
        0.37557454768000004,
        0.36853462668000003,
        0.35536240368000005
      ]
    }
  ]
}

Scenario: Isolated linker: fresh resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 427.7 ± 9.3 414.4 449.2 4.71 ± 0.22
pacquet@main 438.8 ± 16.6 413.6 467.6 4.83 ± 0.27
pnpr@HEAD 90.8 ± 3.7 84.6 102.3 1.00
pnpr@main 91.8 ± 3.4 85.7 98.3 1.01 ± 0.06
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.4277214668000001,
      "stddev": 0.009349697148311844,
      "median": 0.42637861080000006,
      "user": 0.41887374,
      "system": 0.10377815999999998,
      "min": 0.41444694730000003,
      "max": 0.4491864123,
      "times": [
        0.4194791573,
        0.4270052053,
        0.43019508230000003,
        0.4491864123,
        0.42696240830000004,
        0.42475893530000003,
        0.43490772730000005,
        0.41444694730000003,
        0.42447797930000003,
        0.4257948133
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.43880547280000004,
      "stddev": 0.01657905246528889,
      "median": 0.4359058753,
      "user": 0.4347120400000001,
      "system": 0.10249055999999998,
      "min": 0.4135749073,
      "max": 0.46760858130000005,
      "times": [
        0.4377296693,
        0.4135749073,
        0.43308955330000004,
        0.42657545030000005,
        0.43408208130000003,
        0.4262922483,
        0.44370973230000005,
        0.46760858130000005,
        0.4635436323,
        0.44184887230000003
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.09080049961034484,
      "stddev": 0.0037253975968708753,
      "median": 0.0903093043,
      "user": 0.018596646896551723,
      "system": 0.015140815172413795,
      "min": 0.08459480030000001,
      "max": 0.10225094330000001,
      "times": [
        0.09314563930000001,
        0.0900798723,
        0.0905853763,
        0.0933038563,
        0.0903325853,
        0.09117616830000001,
        0.08819871430000001,
        0.08967182530000001,
        0.10225094330000001,
        0.08952459230000001,
        0.09427289330000001,
        0.09229263830000001,
        0.0897145163,
        0.09135258930000001,
        0.1002247663,
        0.08964474430000001,
        0.0874520513,
        0.0905826673,
        0.0939786533,
        0.0903093043,
        0.09257139630000001,
        0.0870605633,
        0.0917365923,
        0.08979275930000001,
        0.0873735233,
        0.08459480030000001,
        0.08704465230000001,
        0.0864530433,
        0.0884927613
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.09184254001874999,
      "stddev": 0.0034485715500837243,
      "median": 0.09173602880000001,
      "user": 0.019715502500000003,
      "system": 0.0149358475,
      "min": 0.0857320493,
      "max": 0.0982853563,
      "times": [
        0.0870016633,
        0.0918964263,
        0.08808392030000001,
        0.0897987903,
        0.0898791253,
        0.09407752130000001,
        0.0981050843,
        0.09781515330000001,
        0.09205291430000001,
        0.0933007723,
        0.0982853563,
        0.0920250853,
        0.09697417030000001,
        0.0949986943,
        0.09591407330000001,
        0.0902328253,
        0.08939584530000001,
        0.09062402530000001,
        0.08916613030000001,
        0.0894784433,
        0.08580976030000001,
        0.0919467513,
        0.0956280503,
        0.0933917883,
        0.09014941430000001,
        0.0915756313,
        0.09296147430000001,
        0.0944273303,
        0.0897012053,
        0.0877525603,
        0.0857320493,
        0.0907792453
      ]
    }
  ]
}

Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.616 ± 0.152 4.500 4.929 1.29 ± 0.06
pacquet@main 4.581 ± 0.148 4.472 4.985 1.28 ± 0.06
pnpr@HEAD 3.588 ± 0.106 3.489 3.831 1.00
pnpr@main 3.620 ± 0.140 3.484 3.904 1.01 ± 0.05
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.61641336058,
      "stddev": 0.15188485254195466,
      "median": 4.548585494879999,
      "user": 2.3716673199999994,
      "system": 1.7671008799999999,
      "min": 4.500368326879999,
      "max": 4.928605697879999,
      "times": [
        4.70025743988,
        4.557684055879999,
        4.500368326879999,
        4.50435662288,
        4.831743952879999,
        4.5585231648799995,
        4.539486933879999,
        4.928605697879999,
        4.518238964879999,
        4.524868445879999
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.58117131658,
      "stddev": 0.14821112828760954,
      "median": 4.55246855288,
      "user": 2.32176602,
      "system": 1.94274398,
      "min": 4.472397905879999,
      "max": 4.98531167188,
      "times": [
        4.56744063688,
        4.5743876088799995,
        4.53749646888,
        4.98531167188,
        4.572244511879999,
        4.530619992879999,
        4.595775852879999,
        4.472397905879999,
        4.49783490788,
        4.478203607879999
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.58845400668,
      "stddev": 0.10572159225544653,
      "median": 3.55221443838,
      "user": 1.5503678200000002,
      "system": 1.5069494799999998,
      "min": 3.48901772088,
      "max": 3.83073050988,
      "times": [
        3.65743531088,
        3.54822059988,
        3.63696485588,
        3.48901772088,
        3.55620827688,
        3.83073050988,
        3.50898755988,
        3.64175611788,
        3.50985661788,
        3.50536249688
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.6199179945800006,
      "stddev": 0.13954708117352627,
      "median": 3.58107085088,
      "user": 1.7525225199999999,
      "system": 1.6706167800000002,
      "min": 3.48386116888,
      "max": 3.90371305288,
      "times": [
        3.54414944788,
        3.4876517648800003,
        3.90371305288,
        3.73847930388,
        3.51938640788,
        3.6179922538800002,
        3.48386116888,
        3.51293278688,
        3.64103724788,
        3.7499765108800003
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13111
Testbedpacquet
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,674.13 ms
(-9.59%)Baseline: 2,957.82 ms
3,549.38 ms
(75.34%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,869.50 ms
(-11.60%)Baseline: 2,114.87 ms
2,537.85 ms
(73.66%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
564.32 ms
(-24.54%)Baseline: 747.86 ms
897.43 ms
(62.88%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
369.45 ms
(-17.34%)Baseline: 446.93 ms
536.32 ms
(68.89%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,365.71 ms
(-12.34%)Baseline: 2,698.80 ms
3,238.56 ms
(73.05%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,564.04 ms
(-4.87%)Baseline: 4,797.47 ms
5,756.96 ms
(79.28%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
252.57 ms
(-15.39%)Baseline: 298.50 ms
358.20 ms
(70.51%)
🐰 View full continuous benchmarking report in Bencher

Copilot AI review requested due to automatic review settings July 17, 2026 21:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 4c02182

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

Auto-approved notes - no code suggestions found
- 'approve_pr_on_self_review' flag enabled

@zkochan
zkochan force-pushed the bench/reduce-hot-scenario-variance branch from 4c02182 to 52e79b3 Compare July 17, 2026 21:25
Copilot AI review requested due to automatic review settings July 17, 2026 21:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@zkochan zkochan changed the title ci(benchmark): raise sampling on the sub-second integrated-benchmark scenarios ci(benchmark): threshold Bencher on minimum latency, not mean Jul 17, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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 @.github/workflows/pacquet-integrated-benchmark.yml:
- Around line 514-526: Update the Hyperfine invocations for
fresh-restore.hot-cache.hot-store, fresh-install.hot-cache.hot-store, and
fresh-resolve.hot-cache.offline to include --warmup 3 and --min-runs 20, and
revise the nearby sampling comment to accurately describe these explicit
settings instead of claiming defaults suffice.
🪄 Autofix (Beta)

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: 8ffc019e-f9f3-4d15-ade0-527798d09787

📥 Commits

Reviewing files that changed from the base of the PR and between 4c02182 and 52e79b3.

📒 Files selected for processing (1)
  • .github/workflows/pacquet-integrated-benchmark.yml

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 52e79b3

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13111
Testbedpnpr

⚠️ 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-thresholds flag.

Click to view all benchmark results
BenchmarkLatencymilliseconds (ms)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,436.01 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
310.42 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
305.83 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
80.54 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,358.93 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,461.16 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
270.28 ms
🐰 View full continuous benchmarking report in Bencher

Copilot AI review requested due to automatic review settings July 17, 2026 21:56
@zkochan
zkochan force-pushed the bench/reduce-hot-scenario-variance branch from 52e79b3 to 8ec9544 Compare July 17, 2026 21:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@zkochan zkochan changed the title ci(benchmark): threshold Bencher on minimum latency, not mean ci(benchmark): threshold Bencher on the minimum latency (via BMF) Jul 17, 2026
@qodo-code-review

Copy link
Copy Markdown

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

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

Auto-approved notes - no code suggestions found
- 'approve_pr_on_self_review' flag enabled

The integrated-benchmark's Bencher alerts compared each run's mean latency
against a rolling baseline. On shared CI runners the timed work is CPU- and
disk-bound: the simulated network latency only adds a deterministic floor, and
the noisiest scenario (fresh-resolve.hot-cache.offline) runs --offline with no
network at all. So the mean drifts run-to-run with host contention — even
byte-identical binaries differed ~30% on the offline scenario and tripped a
spurious regression alert.

Report each scenario's minimum latency to Bencher instead, so the threshold
tracks the min. Contention only ever adds time, so the minimum is the run least
perturbed by a noisy neighbour and the truest signal of a real code regression
(the estimator the robust-benchmarking literature and Julia's CI use). Because
the minimum only needs one uncontended run, hyperfine's default sampling
suffices; no warmup/runs bump is needed.

Emit the result in Bencher Metric Format and upload the integrated benchmark
with --adapter json, reporting the min honestly as the metric value rather than
relabelling hyperfine's mean field. value is in nanoseconds (min seconds x 1e9)
to match the unit the shell_hyperfine adapter established for the latency
measure, so the existing baseline stays comparable. The TypeScript
test-duration and micro-benchmark uploads keep shell_hyperfine (single-sample,
so min equals mean there anyway). The human comment still reports mean +/-
sigma.
Copilot AI review requested due to automatic review settings July 17, 2026 22:19
@zkochan
zkochan force-pushed the bench/reduce-hot-scenario-variance branch from 8ec9544 to 93ee8f6 Compare July 17, 2026 22:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 93ee8f6

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

Auto-approved notes - no code suggestions found
- 'approve_pr_on_self_review' flag enabled

@zkochan
zkochan merged commit e3bd25d into main Jul 18, 2026
26 of 28 checks passed
@zkochan
zkochan deleted the bench/reduce-hot-scenario-variance branch July 18, 2026 07:43
@coderabbitai coderabbitai Bot mentioned this pull request Aug 10, 2026
5 tasks done
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.

2 participants