Skip to content

test(resolver): improve cache race failure diagnostics - #13131

Merged
zkochan merged 2 commits into
mainfrom
fix-13105
Jul 18, 2026
Merged

zkochan merged 2 commits into
mainfrom
fix-13105

Conversation

@zkochan

@zkochan zkochan commented Jul 18, 2026 •

Copy link
Copy Markdown
Member

Summary

Squash Commit Body

Make the metadata cache-race test cleanup tolerate a mirror that was already removed. This lets mockito report duplicate requests through its expectation failure instead of triggering a server-thread panic and SIGABRT.

Closes pnpm/pnpm#13105.

Checklist

  • The change is implemented in both the TypeScript CLI and the Rust
    pnpm/ port, or the description notes what still needs porting.
  • Added or updated tests.

Written by an agent (Codex, GPT-5).


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Bug Fixes
    • Improved cleanup of temporary “raced” mirror files during metadata retry scenarios, tolerating cases where the file was already removed by another process.
    • Maintains strict error reporting for unexpected cleanup failures while avoiding unnecessary crashes.
  • Tests
    • Added a unit test to verify raced mirror cleanup is idempotent (safe to run multiple times on the same path).

Copilot AI review requested due to automatic review settings July 18, 2026 19:46

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

Improve cache-race test cleanup to avoid SIGABRT and show mockito expectation failures

🧪 Tests 🕐 Less than 10 minutes

Grey Divider

AI Description

• Make raced-mirror cleanup idempotent when the file is already missing.
• Preserve fast-fail behavior for unexpected filesystem errors.
• Let mockito .expect(1) report duplicate requests instead of crashing the server thread.
Diagram

graph TD
  A["Cache-race tests"] --> B["mockito Server"] --> C["304 handler callback"] --> D["remove_raced_mirror()"] --> E["FS remove_file"] --> F["mockito expect(1) assertion"]
  E --> G["Ignore NotFound"]
  E --> H["Panic on other I/O"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Use `let _ = remove_file(...)` (ignore all errors)
  • ➕ Even simpler change (one-liner) with minimal code.
  • ➕ Avoids any panic in the handler thread.
  • ➖ Masks real filesystem failures (permissions, path issues), making failures harder to diagnose.
  • ➖ Could hide regressions where the test setup is broken.
2. Move mirror deletion out of the mock handler (explicit test step)
  • ➕ Avoids filesystem side effects on the mock server thread.
  • ➕ More deterministic control over timing in the test body.
  • ➖ Harder to simulate the exact 'race during request handling' timing.
  • ➖ May weaken coverage of the problematic interleaving being tested.

Recommendation: Current approach is the best tradeoff: ignore only ErrorKind::NotFound to make cleanup idempotent (preventing handler-thread panics/SIGABRT), while still panicking on unexpected I/O errors to keep the test signal strong. Alternatives either hide real failures or reduce fidelity of the race simulation.

Files changed (1) +12 / -4

Tests (1) +12 / -4
tests.rsMake raced-mirror removal tolerant of already-missing files +12/-4

Make raced-mirror removal tolerant of already-missing files

• Replaces 'remove_file(...).expect(...)' in several mock 304 handlers with a shared 'remove_raced_mirror()' helper. The helper ignores 'NotFound' (mirror already removed) but panics on any other filesystem error to preserve early failure and improve diagnostics via mockito expectations.

pnpm/crates/resolving-npm-resolver/src/fetch_full_metadata_cached/tests.rs

@coderabbitai

coderabbitai Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

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: b9d88ae0-b30c-4520-bbbf-cf7265c18ba2

📥 Commits

Reviewing files that changed from the base of the PR and between f95a261 and 20b0d7b.

📒 Files selected for processing (1)
  • pnpm/crates/resolving-npm-resolver/src/fetch_full_metadata_cached/tests.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • pnpm/crates/resolving-npm-resolver/src/fetch_full_metadata_cached/tests.rs

📝 Walkthrough

Walkthrough

The cache-race tests centralize raced-mirror deletion in remove_raced_mirror, which ignores NotFound errors while preserving failures for other deletion errors. Four cleanup sites now use the helper, with a test covering repeated removal.

Changes

Cache-race test cleanup

Layer / File(s) Summary
Shared raced-mirror cleanup and coverage
pnpm/crates/resolving-npm-resolver/src/fetch_full_metadata_cached/tests.rs
Adds remove_raced_mirror, replaces four direct file-removal calls, and verifies the helper can remove the same path twice.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Assessment against linked issues

Objective Addressed Explanation
Prevent cache-race tests from aborting when the raced mirror is already absent [#13105] ✅

Possibly related PRs

  • pnpm/pnpm#13014: Introduced the related cached full-metadata cache-loss tests.
  • pnpm/pnpm#13130: Makes the same raced-mirror cleanup changes in the same test module.

Suggested labels: product: pacquet

Suggested reviewers: copilot

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-13105

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 18, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Test-only Rust change that makes cleanup idempotent and improves failure diagnostics; no production code paths are touched.

The change is confined entirely to the test module, replaces an unsafe panic-on-server-thread pattern with a well-structured helper, adds a targeted unit test for the new behavior, and does not alter any observable production behavior.

No files require special attention.

Reviews (2): Last reviewed commit: "test(resolver): cover idempotent mirror ..." | Re-trigger Greptile

@qodo-code-review

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

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 18 rules

Grey Divider


Informational

1. Panic omits mirror path ✓ Resolved 🐞 Bug ◔ Observability
Description
In remove_raced_mirror, the panic for non-NotFound I/O errors prints only the error, not the
mirror_path, which makes diagnosing unexpected filesystem failures harder than necessary in these
cache-race tests.
Code

pnpm/crates/resolving-npm-resolver/src/fetch_full_metadata_cached/tests.rs[R430-435]

+fn remove_raced_mirror(mirror_path: &std::path::Path) {
+    match std::fs::remove_file(mirror_path) {
+        Ok(()) => {}
+        Err(error) if error.kind() == std::io::ErrorKind::NotFound => {}
+        Err(error) => panic!("remove raced mirror: {error}"),
+    }
Evidence
The helper’s panic path is the only explicit diagnostic for unexpected filesystem failures, but it
does not identify which mirror file failed to remove; this helper is called from the mockito request
handler closures that simulate mirror disappearance.

pnpm/crates/resolving-npm-resolver/src/fetch_full_metadata_cached/tests.rs[193-240]
pnpm/crates/resolving-npm-resolver/src/fetch_full_metadata_cached/tests.rs[419-436]

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

### Issue description
`remove_raced_mirror` panics with `"remove raced mirror: {error}"` and does not include the mirror path. When a non-`NotFound` filesystem error occurs (e.g., PermissionDenied), the failing path is the most useful context for debugging.

### Issue Context
This helper is invoked inside mockito response closures for cache-race tests; improving the error message aligns with the PR’s goal of better failure diagnostics.

### Fix Focus Areas
- pnpm/crates/resolving-npm-resolver/src/fetch_full_metadata_cached/tests.rs[430-435]

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


Grey Divider

Qodo Logo

@qodo-code-review

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

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
✅ Include file path in panic message
Suggestion Impact:The panic message now includes the path of the mirror file that failed to be removed.

code diff:

-        Err(error) => panic!("remove raced mirror: {error}"),
+        Err(error) => panic!("remove raced mirror at {}: {error}", mirror_path.display()),

Add mirror_path.display() to the panic message in remove_raced_mirror.

pnpm/crates/resolving-npm-resolver/src/fetch_full_metadata_cached/tests.rs [430-436]

 fn remove_raced_mirror(mirror_path: &std::path::Path) {
     match std::fs::remove_file(mirror_path) {
         Ok(()) => {}
         Err(error) if error.kind() == std::io::ErrorKind::NotFound => {}
-        Err(error) => panic!("remove raced mirror: {error}"),
+        Err(error) => panic!("remove raced mirror at {}: {error}", mirror_path.display()),
     }
 }

[Suggestion processed]

Suggestion importance[1-10]: 4

__

Why: Including the file path in the panic message is a minor but useful improvement for debugging test failures.

Low
  • More

coderabbitai[bot]
coderabbitai Bot previously requested changes Jul 18, 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 `@pnpm/crates/resolving-npm-resolver/src/fetch_full_metadata_cached/tests.rs`:
- Around line 430-435: Add a focused regression test near remove_raced_mirror
that calls it with an already-missing file and verifies cleanup succeeds without
panicking. Retain the existing duplicate-request reporting assertions, including
expect(1) and assert_async(), so the test proves both idempotent removal and
duplicate-request handling.
🪄 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: 5e218aa1-d3b1-4734-b3cd-cbb3fa783420

📥 Commits

Reviewing files that changed from the base of the PR and between bfb1b13 and f95a261.

📒 Files selected for processing (1)
  • pnpm/crates/resolving-npm-resolver/src/fetch_full_metadata_cached/tests.rs

@github-actions

github-actions Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                          main                                   pr
-----                          ----                                   --
lockfile/parse_pnpm_lock       1.00     11.7±0.08ms    32.0 MB/sec    1.00     11.7±0.03ms    32.0 MB/sec
packument/parse                1.00     38.9±0.05µs  1703.8 MB/sec    1.04     40.6±0.07µs  1635.3 MB/sec
tarball/download_dependency    1.01      2.3±0.08ms  1872.5 KB/sec    1.00      2.3±0.08ms  1891.1 KB/sec

Copilot AI review requested due to automatic review settings July 18, 2026 19:54

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 commented Jul 18, 2026

Copy link
Copy Markdown
Member Author

The follow-up in commit 20b0d7b19e also includes the raced mirror path in the panic for unexpected removal errors, addressing the Qodo diagnostic finding.


Written by an agent (Codex, GPT-5).

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 20b0d7b

@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 dismissed coderabbitai[bot]’s stale review July 18, 2026 19:56

Addressed by commit 20b0d7b19e; CodeRabbit verified the regression test and the review thread is resolved.


Written by an agent (Codex, GPT-5).

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

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.65%. Comparing base (32a30c4) to head (20b0d7b).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13131   +/-   ##
=======================================
  Coverage   85.65%   85.65%           
=======================================
  Files         505      505           
  Lines       83565    83565           
=======================================
  Hits        71580    71580           
  Misses      11985    11985           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 20b0d7b19e50

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.457 ± 0.110 2.346 2.657 1.56 ± 0.16
pacquet@main 2.548 ± 0.169 2.335 2.787 1.62 ± 0.18
pnpr@HEAD 1.593 ± 0.130 1.346 1.758 1.01 ± 0.12
pnpr@main 1.576 ± 0.142 1.372 1.751 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.45710408056,
      "stddev": 0.11035918044042572,
      "median": 2.4137692904600003,
      "user": 1.6181397399999997,
      "system": 1.3109582999999998,
      "min": 2.34578903246,
      "max": 2.65685250046,
      "times": [
        2.5079224724599998,
        2.34578903246,
        2.44716333746,
        2.37178006446,
        2.37790315546,
        2.5961293464599997,
        2.35551313746,
        2.65685250046,
        2.38037524346,
        2.53161251546
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.54783265856,
      "stddev": 0.16856114077284873,
      "median": 2.5559609319599996,
      "user": 1.6328159399999997,
      "system": 1.2938452,
      "min": 2.33500456546,
      "max": 2.78707149746,
      "times": [
        2.35721559046,
        2.50387245146,
        2.6080494124599998,
        2.62905890046,
        2.33500456546,
        2.3959342494599998,
        2.41251129446,
        2.78707149746,
        2.74311616046,
        2.70649246346
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5931727290599997,
      "stddev": 0.13036084965454647,
      "median": 1.6231437714599999,
      "user": 1.1795743399999998,
      "system": 1.1465198,
      "min": 1.34628468846,
      "max": 1.75758666946,
      "times": [
        1.59684914246,
        1.43981808246,
        1.67412555146,
        1.34628468846,
        1.61267762546,
        1.70465887646,
        1.75758666946,
        1.48249490646,
        1.68362183046,
        1.6336099174599998
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.57645987926,
      "stddev": 0.1419179863331845,
      "median": 1.62309839696,
      "user": 1.18187534,
      "system": 1.1343028,
      "min": 1.3717504384599999,
      "max": 1.75071794546,
      "times": [
        1.6603637244599998,
        1.68629343346,
        1.64737193646,
        1.5783807324599999,
        1.38604516346,
        1.3717504384599999,
        1.3911234854599999,
        1.75071794546,
        1.69372707546,
        1.59882485746
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 247.0 ± 6.0 239.9 259.0 1.01 ± 0.03
pacquet@main 245.4 ± 5.9 237.5 252.0 1.00
pnpr@HEAD 257.6 ± 6.8 247.1 270.9 1.05 ± 0.04
pnpr@main 263.5 ± 5.5 255.2 272.9 1.07 ± 0.03
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.24704451966000002,
      "stddev": 0.00604899244930203,
      "median": 0.24663335096000003,
      "user": 0.20479816,
      "system": 0.49774298000000006,
      "min": 0.23993485896000002,
      "max": 0.25895372996,
      "times": [
        0.24908079196000002,
        0.23993485896000002,
        0.24109756696,
        0.24350503396000003,
        0.25193212196,
        0.24561542796000002,
        0.24097082396000002,
        0.24765127396000003,
        0.25895372996,
        0.25170356696
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.24539647416000002,
      "stddev": 0.005939666209792577,
      "median": 0.24641973146,
      "user": 0.18981836,
      "system": 0.50909528,
      "min": 0.23752069396000003,
      "max": 0.25200521196,
      "times": [
        0.25200521196,
        0.23752069396000003,
        0.23977230796000001,
        0.23877681196000003,
        0.25121840896,
        0.24367076896000003,
        0.25035158896,
        0.24916869396000002,
        0.24024148096000003,
        0.25123877396
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.25755704226000004,
      "stddev": 0.006842075136104812,
      "median": 0.25663242696,
      "user": 0.20339946000000003,
      "system": 0.50123908,
      "min": 0.24706235796000003,
      "max": 0.27094900196,
      "times": [
        0.26480618095999997,
        0.24706235796000003,
        0.25516926096,
        0.25110096896,
        0.27094900196,
        0.25955590096,
        0.25480811795999997,
        0.25389115896,
        0.25809559296,
        0.26013188096
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.26353814636000006,
      "stddev": 0.0055469145087969985,
      "median": 0.26371374446,
      "user": 0.20089466000000003,
      "system": 0.51502848,
      "min": 0.25521241996,
      "max": 0.27293184596,
      "times": [
        0.26549969196,
        0.25521241996,
        0.25754264696,
        0.26766195296,
        0.26884077895999997,
        0.26192779696,
        0.25934351095999997,
        0.26056138596,
        0.27293184596,
        0.26585943296
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.674 ± 0.018 2.647 2.706 1.74 ± 0.18
pacquet@main 2.667 ± 0.016 2.641 2.689 1.73 ± 0.18
pnpr@HEAD 1.544 ± 0.116 1.383 1.799 1.00 ± 0.13
pnpr@main 1.539 ± 0.159 1.391 1.796 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.67364207366,
      "stddev": 0.017570557393472377,
      "median": 2.67555366366,
      "user": 1.7617386199999998,
      "system": 1.2531513200000002,
      "min": 2.64706885866,
      "max": 2.70580002666,
      "times": [
        2.67554067466,
        2.67716832966,
        2.64706885866,
        2.66553281366,
        2.70580002666,
        2.65176306266,
        2.69259836266,
        2.66517744866,
        2.68020450666,
        2.67556665266
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.6673436443600003,
      "stddev": 0.0164611348444295,
      "median": 2.66889444116,
      "user": 1.7405592200000002,
      "system": 1.2704193199999998,
      "min": 2.64070733066,
      "max": 2.6891513866600003,
      "times": [
        2.64436234766,
        2.6891513866600003,
        2.6765702566600003,
        2.67041456466,
        2.6643285326600004,
        2.64070733066,
        2.65707864266,
        2.66737431766,
        2.68889624466,
        2.67455281966
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5443442683600002,
      "stddev": 0.11633842513543671,
      "median": 1.50936074616,
      "user": 1.1358657199999997,
      "system": 1.1273599200000002,
      "min": 1.38284790266,
      "max": 1.7993584026600002,
      "times": [
        1.4644335476600001,
        1.5894071036600002,
        1.4950335026600001,
        1.7993584026600002,
        1.38284790266,
        1.6159892446600002,
        1.4776862856600002,
        1.4774009806600001,
        1.61759772366,
        1.52368798966
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5389281903599998,
      "stddev": 0.15883882374627173,
      "median": 1.4802986421600002,
      "user": 1.1611363200000002,
      "system": 1.0983795200000002,
      "min": 1.3908076506600002,
      "max": 1.7956564146600003,
      "times": [
        1.7295632516600001,
        1.4698834666600002,
        1.39946221566,
        1.51371567766,
        1.7956564146600003,
        1.42880756266,
        1.49071381766,
        1.3908076506600002,
        1.7574768666600002,
        1.41319497966
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 540.8 ± 7.6 531.8 554.0 1.89 ± 0.06
pacquet@main 528.1 ± 10.7 512.4 545.2 1.85 ± 0.06
pnpr@HEAD 290.8 ± 6.4 281.8 300.9 1.02 ± 0.03
pnpr@main 286.1 ± 7.4 275.7 296.0 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.5408250634000001,
      "stddev": 0.007590161248313111,
      "median": 0.5384592043,
      "user": 0.6421789600000001,
      "system": 0.6656913799999999,
      "min": 0.5317695053000001,
      "max": 0.5540323473000001,
      "times": [
        0.5380800623,
        0.5475517783000001,
        0.5317695053000001,
        0.5374323633000001,
        0.5322315313000001,
        0.5494603453000001,
        0.5540323473000001,
        0.5348723333000001,
        0.5439820213000001,
        0.5388383463
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.5281157097,
      "stddev": 0.01068813120000328,
      "median": 0.5274304788000002,
      "user": 0.63397426,
      "system": 0.66171428,
      "min": 0.5124456603,
      "max": 0.5451733573,
      "times": [
        0.5252022703000001,
        0.5124456603,
        0.5296586873000001,
        0.5167756133000001,
        0.5191557643000001,
        0.5451733573,
        0.5403820783000001,
        0.5361803623000001,
        0.5227831373,
        0.5334001663000001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.29075003639999997,
      "stddev": 0.006372413053124424,
      "median": 0.29140423930000003,
      "user": 0.16630546000000002,
      "system": 0.50626758,
      "min": 0.2817633483,
      "max": 0.3009087633,
      "times": [
        0.2925887593,
        0.29460278830000003,
        0.28641798230000004,
        0.2817633483,
        0.2980914263,
        0.2902197193,
        0.2847954943,
        0.3009087633,
        0.2840990163,
        0.2940130663
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.28613371590000003,
      "stddev": 0.00739540847528356,
      "median": 0.2871593128,
      "user": 0.18177766,
      "system": 0.48890038000000013,
      "min": 0.2757246423,
      "max": 0.2959565333,
      "times": [
        0.2850204893,
        0.2776028963,
        0.2959565333,
        0.29537818930000004,
        0.2911332783,
        0.2892981363,
        0.2905787403,
        0.2786486513,
        0.2757246423,
        0.28199560230000004
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.841 ± 0.011 1.832 1.866 6.44 ± 0.11
pacquet@main 1.834 ± 0.009 1.820 1.845 6.41 ± 0.11
pnpr@HEAD 0.286 ± 0.005 0.279 0.296 1.00
pnpr@main 0.290 ± 0.006 0.281 0.303 1.01 ± 0.03
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.8414850106400003,
      "stddev": 0.010940096677161905,
      "median": 1.83896309084,
      "user": 0.88750228,
      "system": 0.7414741,
      "min": 1.8315671663400002,
      "max": 1.86562239634,
      "times": [
        1.8333057033400002,
        1.8520966203400002,
        1.84301786834,
        1.83388325434,
        1.8444767803400002,
        1.8315671663400002,
        1.8316669443400002,
        1.8349083133400002,
        1.86562239634,
        1.84430505934
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.8341626787399998,
      "stddev": 0.008567113267583684,
      "median": 1.8337815003400002,
      "user": 0.88277138,
      "system": 0.721547,
      "min": 1.8199790663400002,
      "max": 1.8454439093400001,
      "times": [
        1.8199790663400002,
        1.8235977413400002,
        1.83345698234,
        1.82948846234,
        1.8341060183400002,
        1.8389009773400002,
        1.8454439093400001,
        1.8305122873400002,
        1.84442509534,
        1.8417162473400002
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.28607405063999997,
      "stddev": 0.004774306390332034,
      "median": 0.28562933784,
      "user": 0.18844268,
      "system": 0.48551790000000006,
      "min": 0.27937926034,
      "max": 0.29622684934,
      "times": [
        0.29622684934,
        0.28306154734,
        0.28805616434,
        0.28061932634000003,
        0.28554334134,
        0.28853000934,
        0.28493620834,
        0.27937926034,
        0.28867246534,
        0.28571533434
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.29020919693999997,
      "stddev": 0.0056430016263674335,
      "median": 0.29018983684,
      "user": 0.16505328000000002,
      "system": 0.5148568,
      "min": 0.28114229534,
      "max": 0.30272510434,
      "times": [
        0.29446647134,
        0.28691707034,
        0.28787300234,
        0.30272510434,
        0.29000057534,
        0.29037909834000003,
        0.28114229534,
        0.29073851134,
        0.29112298534000003,
        0.28672685534000003
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 328.5 ± 4.2 321.7 335.7 3.77 ± 0.12
pacquet@main 334.1 ± 7.5 325.0 346.4 3.83 ± 0.14
pnpr@HEAD 87.2 ± 2.5 83.1 92.8 1.00
pnpr@main 89.1 ± 3.4 84.9 99.2 1.02 ± 0.05
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.3284746668,
      "stddev": 0.0042455548441346705,
      "median": 0.32880310860000006,
      "user": 0.32419842,
      "system": 0.06208173999999998,
      "min": 0.3217125516,
      "max": 0.33574799860000004,
      "times": [
        0.3294156126,
        0.32630777060000005,
        0.3270539786,
        0.3217125516,
        0.32957061760000006,
        0.3287205146,
        0.3234461806,
        0.33574799860000004,
        0.32888570260000005,
        0.33388574060000004
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.33409803610000005,
      "stddev": 0.007494547766743555,
      "median": 0.33336002210000004,
      "user": 0.32366101999999997,
      "system": 0.06457063999999998,
      "min": 0.32502199060000003,
      "max": 0.3464012986,
      "times": [
        0.3464012986,
        0.33656725860000003,
        0.32502199060000003,
        0.3357771346,
        0.32806035060000005,
        0.33618557460000004,
        0.34588539360000004,
        0.33094290960000006,
        0.32759398460000005,
        0.32854446560000006
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.08719408681212121,
      "stddev": 0.002520342894769713,
      "median": 0.0865554776,
      "user": 0.02029343212121212,
      "system": 0.00974097212121212,
      "min": 0.0830583426,
      "max": 0.09284486460000001,
      "times": [
        0.0849543536,
        0.0870873166,
        0.09036074960000001,
        0.0890276816,
        0.0842532166,
        0.09132652760000001,
        0.08590783260000001,
        0.0868987046,
        0.08614842360000001,
        0.0863347316,
        0.08785026060000001,
        0.0859983676,
        0.0861378346,
        0.0870031416,
        0.0865966516,
        0.08557823660000001,
        0.08570610960000001,
        0.09284486460000001,
        0.08387047060000001,
        0.0887553246,
        0.0839387456,
        0.0863006746,
        0.0886994366,
        0.0830583426,
        0.0889834956,
        0.08421204160000001,
        0.0879571876,
        0.08495561060000001,
        0.0865554776,
        0.0917603886,
        0.0860832926,
        0.0910367906,
        0.0912225806
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.08910198634193549,
      "stddev": 0.0034430402771975428,
      "median": 0.0885200876,
      "user": 0.02154776838709678,
      "system": 0.010477024516129032,
      "min": 0.08493330460000001,
      "max": 0.09918796060000001,
      "times": [
        0.0893170286,
        0.09183629360000001,
        0.08561887160000001,
        0.0910705826,
        0.08596178360000001,
        0.0895867736,
        0.0875330356,
        0.08950660260000001,
        0.09199835260000001,
        0.0861734366,
        0.08493330460000001,
        0.0951775636,
        0.0900405516,
        0.0885200876,
        0.08610903660000001,
        0.08739251460000001,
        0.0872008766,
        0.0955153536,
        0.08666709660000001,
        0.09918796060000001,
        0.0874663246,
        0.08533873460000001,
        0.08576417360000001,
        0.08593151360000001,
        0.09223855460000001,
        0.0913079536,
        0.09212128060000001,
        0.08901108460000001,
        0.0865256976,
        0.08595339760000001,
        0.09115575460000001
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.536 ± 0.143 4.419 4.828 1.29 ± 0.05
pacquet@main 4.546 ± 0.167 4.414 4.853 1.30 ± 0.05
pnpr@HEAD 3.573 ± 0.147 3.448 3.836 1.02 ± 0.05
pnpr@main 3.510 ± 0.071 3.430 3.656 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.53621844026,
      "stddev": 0.14260998709179804,
      "median": 4.4568074729600005,
      "user": 1.78741336,
      "system": 1.4028431399999999,
      "min": 4.41926541946,
      "max": 4.82783673446,
      "times": [
        4.466554775460001,
        4.66459825746,
        4.44706017046,
        4.41926541946,
        4.57691055646,
        4.82783673446,
        4.42037042546,
        4.67268433846,
        4.44379945146,
        4.42310427346
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.54637558956,
      "stddev": 0.16733904546808415,
      "median": 4.4481119624600005,
      "user": 1.7965807599999999,
      "system": 1.4171887399999998,
      "min": 4.41419435546,
      "max": 4.8525697264600005,
      "times": [
        4.8525697264600005,
        4.41419435546,
        4.42853205146,
        4.54423535946,
        4.45566131246,
        4.44056261246,
        4.65370872846,
        4.43608669646,
        4.42777182646,
        4.81043322646
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.57311188546,
      "stddev": 0.14668311921683683,
      "median": 3.52322397396,
      "user": 1.23347566,
      "system": 1.31769944,
      "min": 3.4480780704600003,
      "max": 3.83585109646,
      "times": [
        3.83585109646,
        3.56767224746,
        3.46402800846,
        3.8307813954600003,
        3.4480780704600003,
        3.57838860446,
        3.46810606746,
        3.58860998346,
        3.47877570046,
        3.4708276804600002
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.510084177259999,
      "stddev": 0.07072656385798434,
      "median": 3.49095857946,
      "user": 1.25125066,
      "system": 1.2547503399999997,
      "min": 3.4296412804600003,
      "max": 3.6556230334600004,
      "times": [
        3.49944006746,
        3.46743484446,
        3.6058037144600004,
        3.4824770914600003,
        3.4296412804600003,
        3.46082291046,
        3.52841385546,
        3.6556230334600004,
        3.45776602246,
        3.5134189524600004
      ]
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13131
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,647.07 ms
(-7.72%)Baseline: 2,868.58 ms
3,442.30 ms
(76.90%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,831.57 ms
(-9.34%)Baseline: 2,020.16 ms
2,424.19 ms
(75.55%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
531.77 ms
(-19.38%)Baseline: 659.61 ms
791.53 ms
(67.18%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
321.71 ms
(-19.82%)Baseline: 401.23 ms
481.47 ms
(66.82%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,345.79 ms
(-8.40%)Baseline: 2,560.77 ms
3,072.92 ms
(76.34%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,419.27 ms
(-5.10%)Baseline: 4,656.84 ms
5,588.21 ms
(79.08%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
239.93 ms
(-17.04%)Baseline: 289.23 ms
347.07 ms
(69.13%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13131
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,382.85 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
279.38 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
281.76 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
83.06 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,346.28 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,448.08 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
247.06 ms
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit d056209 into main Jul 18, 2026
37 checks passed
@zkochan
zkochan deleted the fix-13105 branch July 18, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pacquet reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Metadata cache-race tests abort with SIGABRT instead of failing cleanly when the code under test regresses

3 participants