Skip to content

fix(pacquet): tolerate an already-removed cache mirror in metadata-fetch race tests - #13130

Closed
Ayush442842q wants to merge 2 commits into
pnpm:mainfrom
Ayush442842q:fix/13105-cache-race-panic
Closed

Ayush442842q wants to merge 2 commits into
pnpm:mainfrom
Ayush442842q:fix/13105-cache-race-panic

Conversation

@Ayush442842q

@Ayush442842q Ayush442842q commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Closes #13105

Summary

The cache-race tests in fetch_full_metadata_cached/tests.rs simulate a vanishing mirror from inside a mockito response closure, using std::fs::remove_file(&raced_mirror).expect("remove raced mirror"). The mock is declared .expect(1), so on the happy path the closure runs once and this is fine.

But if the code under test regresses and the mock is hit a second time, the second remove_file call fails with NotFound and panics — on mockito's server thread, during ServerGuard cleanup. That panic occurs while unwinding through a RwLock guard drop in Server::reset, poisoning the lock and triggering a second panic — a panic during a panic, which Rust cannot unwind through, so the process aborts (SIGABRT on Linux, stack-buffer-overrun on Windows) instead of the test failing cleanly. cargo nextest then cancels any sibling tests still running.

This is a diagnostics-only issue — the regression is still caught (confirmed by mutating fetch_full_metadata_cached.rs:123 to bypass_cache: false and observing the abort) — but the failure signal is far worse than a clean assertion.

Squash Commit Body

Fix cache-race tests in fetch_full_metadata_cached aborting the test
process (SIGABRT / stack-buffer-overrun) instead of failing cleanly
when the code under test regresses.

Each of the four cache-race tests declared an identical
.with_body_from_request closure that called
std::fs::remove_file(&raced_mirror).expect("remove raced mirror") to
simulate a vanishing mirror. The mock is set to .expect(1), so this is
fine on the happy path. But if the mock is hit a second time (i.e. the
regression the test exists to catch), the second remove_file call
fails with NotFound and the .expect(...) panics on mockito's server
thread, during ServerGuard cleanup. That panic occurs while unwinding
through a RwLock guard drop in Server::reset, poisoning the lock and
triggering a second panic, a panic during a panic, which Rust cannot
unwind through, so the process aborts instead of the test failing.

Extracted a shared remove_raced_mirror_tolerant(path: &Path) helper
that only panics if removal fails for a reason other than the file
already being gone, and replaced all four duplicated closures to use
it. The mock's .expect(1) + assert_async() remains responsible for
actually reporting the unexpected extra request, this change only
removes the panic-during-panic failure mode, it does not change what
behavior is being tested.

Verified by re-simulating the regression (bypass_cache: false at
fetch_full_metadata_cached.rs:123): the previously-aborting test now
fails with a clean mockito expectation error instead of aborting the
process. Reverted that mutation and confirmed all 5 cache_loss tests
pass cleanly.

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.

    Rust-only change (test-file fix in pacquet-resolving-npm-resolver); no TypeScript equivalent exists for this test infrastructure.

  • Added a changeset (pnpm changeset) if this PR changes any published
    package. Keep it short and written for pnpm users — it becomes a release note.

    No changeset — this only touches test code, no published package behavior changes.

  • Added or updated tests.

    No new tests added; existing tests' failure-mode fixed. Verified via cargo nextest run -p pacquet-resolving-npm-resolver cache_loss (5/5 pass) and by re-simulating the original regression to confirm the fix produces a clean failure instead of an abort.

  • Updated the documentation if needed.

    No doc update needed — internal test-infrastructure fix only.


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 reliability of package metadata retry and mirror-fallback handling.
    • Prevented intermittent test failures caused by cleanup attempting to remove a temporary mirror file that may already be gone.

@Ayush442842q
Ayush442842q requested a review from zkochan as a code owner July 18, 2026 18:36
@welcome

welcome Bot commented Jul 18, 2026

Copy link
Copy Markdown

💖 Thanks for opening this pull request! 💖
Please be patient and we will get back to you as soon as we can.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@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: 6b5d67f1-bafd-41cc-b826-4681a6229af9

📥 Commits

Reviewing files that changed from the base of the PR and between 76dfdf7 and 933b078.

📒 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 replace direct mirror deletion with a shared tolerant helper. Missing files are ignored, while other deletion failures still panic, allowing repeated mock requests to be reported by mock expectations.

Changes

Cache-race test cleanup

Layer / File(s) Summary
Tolerant mirror removal
pnpm/crates/resolving-npm-resolver/src/fetch_full_metadata_cached/tests.rs
304-retry and fallback test closures use remove_raced_mirror_tolerant, which ignores missing files and panics on other removal errors.

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

Assessment against linked issues

Objective Addressed Explanation
Prevent cache-race tests from aborting when the simulated mirror is removed more than once [#13105] ✅

Possibly related PRs

  • pnpm/pnpm#13014: Adds the cache-race tests whose cleanup behavior is updated here.
  • pnpm/pnpm#12888: Implements the related metadata-fetch recovery flow covered by these tests.

Suggested labels: product: pacquet

Suggested reviewers: zkochan

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

The change is test-only, minimal, and uses the correct idiomatic Rust error-kind matching without a TOCTOU window. It does not touch any production logic.

The helper correctly matches directly on the io::ErrorKind already in hand — no secondary filesystem call, no race window. The four call sites are updated consistently, and the mock's .expect(1) / assert_async() contract is untouched, so the regression-detection capability is preserved.

No files require special attention.

Reviews (2): Last reviewed commit: "test(resolving-npm-resolver): check Erro..." | Re-trigger Greptile

@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 425-429: Update remove_raced_mirror_tolerant to ignore deletion
failures only when the original std::fs::remove_file error has
ErrorKind::NotFound. Remove the path.exists() condition, and keep panicking with
the existing error message for every other error kind.
🪄 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: ecbc59d6-6678-41b1-adbc-2db5adc2e95d

📥 Commits

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

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

@codecov-commenter

codecov-commenter commented Jul 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.65%. Comparing base (2bc4dd5) to head (933b078).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13130      +/-   ##
==========================================
+ Coverage   85.33%   85.65%   +0.32%     
==========================================
  Files         505      505              
  Lines       81225    83565    +2340     
==========================================
+ Hits        69315    71580    +2265     
- Misses      11910    11985      +75     

☔ 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

github-actions Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 933b0780d7dd

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.518 ± 0.156 2.346 2.760 1.66 ± 0.21
pacquet@main 2.503 ± 0.185 2.338 2.796 1.65 ± 0.22
pnpr@HEAD 1.598 ± 0.139 1.421 1.777 1.05 ± 0.15
pnpr@main 1.516 ± 0.168 1.340 1.817 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.51830081992,
      "stddev": 0.15563449339797603,
      "median": 2.5013032976200003,
      "user": 1.52375602,
      "system": 1.2832305000000002,
      "min": 2.34611423812,
      "max": 2.75969438612,
      "times": [
        2.64976539512,
        2.75969438612,
        2.39615047712,
        2.57270633812,
        2.7275630361200003,
        2.54039211112,
        2.36438621412,
        2.34611423812,
        2.4622144841200004,
        2.36402151912
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.5034752116200005,
      "stddev": 0.18513618392394482,
      "median": 2.4186773821200003,
      "user": 1.4809799199999998,
      "system": 1.2943474,
      "min": 2.3382340701200004,
      "max": 2.79639680612,
      "times": [
        2.43630844312,
        2.3668917191200003,
        2.3435447331200003,
        2.77524554412,
        2.3382340701200004,
        2.40104632112,
        2.79639680612,
        2.52663098812,
        2.69957344212,
        2.35088004912
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5982448862200003,
      "stddev": 0.13894819730492847,
      "median": 1.63231351312,
      "user": 1.0642994199999998,
      "system": 1.1017886000000001,
      "min": 1.42098178712,
      "max": 1.7773974021199999,
      "times": [
        1.70096700812,
        1.42098178712,
        1.62405442712,
        1.69618895912,
        1.75541888412,
        1.4300798641199999,
        1.44679215212,
        1.48999577912,
        1.7773974021199999,
        1.64057259912
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.51639913562,
      "stddev": 0.16822562524107937,
      "median": 1.49270839312,
      "user": 1.04917812,
      "system": 1.1394078999999997,
      "min": 1.34001091012,
      "max": 1.8170684961199999,
      "times": [
        1.34001091012,
        1.8170684961199999,
        1.5585285971199998,
        1.53338685912,
        1.34220973012,
        1.40953519112,
        1.78456154612,
        1.3932732401199999,
        1.46857350712,
        1.51684327912
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 257.3 ± 6.3 248.5 266.9 1.01 ± 0.03
pacquet@main 253.6 ± 4.5 248.1 260.5 1.00
pnpr@HEAD 270.3 ± 3.3 265.1 276.8 1.07 ± 0.02
pnpr@main 257.3 ± 8.9 244.6 275.6 1.01 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.25726546364,
      "stddev": 0.00625743773571962,
      "median": 0.25837084564000007,
      "user": 0.20135012,
      "system": 0.5493049400000001,
      "min": 0.24848785414000002,
      "max": 0.26693316614000007,
      "times": [
        0.26104153114000006,
        0.26693316614000007,
        0.24848785414000002,
        0.26172183914,
        0.25034334914000006,
        0.26316242414,
        0.25660078114000007,
        0.25083818014000003,
        0.25338460114000005,
        0.26014091014000007
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.25358711144,
      "stddev": 0.004460055130797203,
      "median": 0.25355074814000006,
      "user": 0.20570511999999996,
      "system": 0.53870274,
      "min": 0.24811154814000003,
      "max": 0.26054077114,
      "times": [
        0.25662371414000007,
        0.25462701414000005,
        0.25000480414000004,
        0.25247448214000007,
        0.24811154814000003,
        0.26054077114,
        0.25063419614000004,
        0.25479394714000003,
        0.25976405214000003,
        0.24829658514000003
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.27030878474000003,
      "stddev": 0.0033287830787659795,
      "median": 0.26978563064000005,
      "user": 0.22215832,
      "system": 0.53413184,
      "min": 0.26505073514000005,
      "max": 0.27679535214000006,
      "times": [
        0.27093390014,
        0.27195513714,
        0.26761160414000007,
        0.26505073514000005,
        0.26981154914000005,
        0.27679535214000006,
        0.26916641614000003,
        0.27390124214000006,
        0.26810219914000005,
        0.26975971214000005
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.25730291494000007,
      "stddev": 0.008884477780426673,
      "median": 0.25766174564,
      "user": 0.18904131999999998,
      "system": 0.52613724,
      "min": 0.24458365914000002,
      "max": 0.27556164014000006,
      "times": [
        0.24803928814,
        0.25111958714000004,
        0.25329076914000004,
        0.27556164014000006,
        0.24458365914000002,
        0.25604396614,
        0.26126013014000005,
        0.25955726314000005,
        0.26429332114000004,
        0.25927952514
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.696 ± 0.013 2.673 2.714 1.72 ± 0.19
pacquet@main 2.702 ± 0.025 2.657 2.745 1.73 ± 0.19
pnpr@HEAD 1.597 ± 0.179 1.388 1.826 1.02 ± 0.16
pnpr@main 1.564 ± 0.172 1.392 1.799 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.6958864002199996,
      "stddev": 0.013247407590249657,
      "median": 2.6935587013199997,
      "user": 1.6275630599999995,
      "system": 1.2544947800000001,
      "min": 2.6731345003199998,
      "max": 2.71414698732,
      "times": [
        2.68247011332,
        2.71071047532,
        2.6932896343199997,
        2.69853651632,
        2.6880513373199997,
        2.71145027532,
        2.69382776832,
        2.71414698732,
        2.69324639432,
        2.6731345003199998
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.70203898002,
      "stddev": 0.024943714471177172,
      "median": 2.70186059432,
      "user": 1.61181636,
      "system": 1.27393138,
      "min": 2.6568213583199998,
      "max": 2.7453489323199998,
      "times": [
        2.70302194632,
        2.70069924232,
        2.69265340832,
        2.6568213583199998,
        2.7043553493199997,
        2.7123785583199997,
        2.6813430343199998,
        2.69121974332,
        2.7453489323199998,
        2.73254822732
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.59676917312,
      "stddev": 0.17915515763000678,
      "median": 1.5432832588200003,
      "user": 1.00541566,
      "system": 1.13714098,
      "min": 1.38837954832,
      "max": 1.8260354493200002,
      "times": [
        1.38837954832,
        1.8260354493200002,
        1.81007360932,
        1.5364516863200002,
        1.7239366523200002,
        1.40525790832,
        1.5176767263200002,
        1.80777531532,
        1.5501148313200002,
        1.4019900043200002
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5642673665200002,
      "stddev": 0.17196010238520737,
      "median": 1.5006901158200001,
      "user": 0.9863325599999999,
      "system": 1.13312438,
      "min": 1.3921076003200001,
      "max": 1.7994097933200002,
      "times": [
        1.7994097933200002,
        1.3973595923200002,
        1.7991270123200003,
        1.4844254143200002,
        1.40003888232,
        1.6649801313200001,
        1.51695481732,
        1.3921076003200001,
        1.4349610293200001,
        1.75330939232
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 550.5 ± 11.4 528.9 564.6 1.89 ± 0.05
pacquet@main 544.0 ± 11.9 531.3 565.4 1.87 ± 0.05
pnpr@HEAD 299.2 ± 6.8 291.1 308.8 1.03 ± 0.03
pnpr@main 290.8 ± 5.5 279.1 297.3 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.5504992400000002,
      "stddev": 0.011413730272498942,
      "median": 0.5489210905,
      "user": 0.67680136,
      "system": 0.6710590999999999,
      "min": 0.5288601770000001,
      "max": 0.5646138330000001,
      "times": [
        0.546437939,
        0.5288601770000001,
        0.5429718720000001,
        0.56034022,
        0.559485415,
        0.5447052990000001,
        0.551404242,
        0.5646138330000001,
        0.5632468690000001,
        0.5429265340000001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.5440418175,
      "stddev": 0.01192032360532279,
      "median": 0.5414323470000001,
      "user": 0.67391926,
      "system": 0.6233690000000001,
      "min": 0.531340428,
      "max": 0.5654376770000001,
      "times": [
        0.5654376770000001,
        0.5338025450000001,
        0.5438151200000001,
        0.5529714000000001,
        0.5552478590000001,
        0.5328767890000001,
        0.533000671,
        0.5528761120000001,
        0.5390495740000001,
        0.531340428
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.29920402030000004,
      "stddev": 0.0068199957778497175,
      "median": 0.2990018375,
      "user": 0.18944816,
      "system": 0.5272523,
      "min": 0.29106116200000004,
      "max": 0.30876663400000004,
      "times": [
        0.302575293,
        0.291377765,
        0.29320771700000003,
        0.304870366,
        0.302505743,
        0.29443893600000004,
        0.307738655,
        0.295497932,
        0.30876663400000004,
        0.29106116200000004
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.29080814190000004,
      "stddev": 0.005484627931241069,
      "median": 0.29084769600000004,
      "user": 0.19958005999999998,
      "system": 0.5054282000000001,
      "min": 0.279139486,
      "max": 0.297251449,
      "times": [
        0.289092349,
        0.292603043,
        0.28841757500000004,
        0.297251449,
        0.294510019,
        0.296879241,
        0.294454755,
        0.287787242,
        0.279139486,
        0.28794626
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.845 ± 0.015 1.823 1.865 6.29 ± 0.11
pacquet@main 1.846 ± 0.007 1.834 1.855 6.30 ± 0.10
pnpr@HEAD 0.293 ± 0.005 0.286 0.300 1.00
pnpr@main 0.294 ± 0.005 0.285 0.299 1.00 ± 0.02
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.8452829445799999,
      "stddev": 0.01501342526152376,
      "median": 1.84772933668,
      "user": 0.8736952199999999,
      "system": 0.74373616,
      "min": 1.82260293218,
      "max": 1.86513021218,
      "times": [
        1.84688860518,
        1.86513021218,
        1.82757573318,
        1.83561525718,
        1.8315731851800001,
        1.85706067418,
        1.8578896041800002,
        1.8485700681800001,
        1.85992317418,
        1.82260293218
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.84641329448,
      "stddev": 0.007097160343547886,
      "median": 1.84828042218,
      "user": 0.9040929199999999,
      "system": 0.7147424599999999,
      "min": 1.83448370418,
      "max": 1.85537577518,
      "times": [
        1.83842554018,
        1.85108995718,
        1.8472244741800001,
        1.83946045418,
        1.8511264251800001,
        1.85399217018,
        1.85537577518,
        1.8493363701799999,
        1.84361807418,
        1.83448370418
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.29316882198000005,
      "stddev": 0.0045413592549800146,
      "median": 0.29368257868000003,
      "user": 0.17570272,
      "system": 0.52627666,
      "min": 0.28565176218000005,
      "max": 0.29986728718000005,
      "times": [
        0.29725005518000003,
        0.29166605118000005,
        0.29986728718000005,
        0.28565176218000005,
        0.29410426718000005,
        0.29542651818000004,
        0.28826701718000003,
        0.29326089018,
        0.28889561418000004,
        0.29729875718000004
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.29370237798,
      "stddev": 0.004669445826725195,
      "median": 0.29392129468000006,
      "user": 0.18163792,
      "system": 0.54919636,
      "min": 0.28547923918,
      "max": 0.29933293718000004,
      "times": [
        0.29417991718000003,
        0.29087130618,
        0.29834159618000006,
        0.29366267218000003,
        0.29124528418,
        0.29933293718000004,
        0.29926038218,
        0.28869056018000006,
        0.29595988518000005,
        0.28547923918
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 324.7 ± 10.1 310.0 341.0 3.88 ± 0.16
pacquet@main 327.7 ± 11.7 313.4 344.0 3.92 ± 0.17
pnpr@HEAD 84.7 ± 2.2 81.4 88.8 1.01 ± 0.04
pnpr@main 83.6 ± 2.2 80.5 88.6 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.32468227214,
      "stddev": 0.010145271758531844,
      "median": 0.32223263044000006,
      "user": 0.32202874,
      "system": 0.05138676000000001,
      "min": 0.31001277144000006,
      "max": 0.34099949244000005,
      "times": [
        0.33670122144000003,
        0.31866617144000003,
        0.33410323444000006,
        0.32151274244000005,
        0.34099949244000005,
        0.31361074244000003,
        0.31970092844000003,
        0.32856289844000003,
        0.32295251844000006,
        0.31001277144000006
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.3276684393400001,
      "stddev": 0.011702650888147577,
      "median": 0.32918063444000006,
      "user": 0.32117193999999993,
      "system": 0.05541545999999999,
      "min": 0.31335515344000003,
      "max": 0.34404787244000007,
      "times": [
        0.31743378144000006,
        0.31335515344000003,
        0.31751841044000007,
        0.34135776444000004,
        0.33518888844000005,
        0.34404787244000007,
        0.33348691044000006,
        0.32487435844000007,
        0.31356326244000005,
        0.33585799144000006
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.08466750917529411,
      "stddev": 0.0022143137137166416,
      "median": 0.08487385744,
      "user": 0.020253681176470584,
      "system": 0.00822489176470588,
      "min": 0.08135845344,
      "max": 0.08875771344,
      "times": [
        0.08237086944000001,
        0.08333352244,
        0.08677249544,
        0.08390261844,
        0.08630901644,
        0.08594517444000001,
        0.08364793244,
        0.08798727944,
        0.08682913044,
        0.08139624444,
        0.08285230044,
        0.08135845344,
        0.08416688344,
        0.08729116544,
        0.08875771344,
        0.08493579344,
        0.08184611744,
        0.08430809744000001,
        0.08543349644,
        0.08163154444,
        0.08507060644,
        0.08764346644,
        0.08481192144000001,
        0.08238330344,
        0.08736618644000001,
        0.08633221944,
        0.08259155344,
        0.08161667744000001,
        0.08503077244,
        0.08729623444,
        0.08668986044,
        0.08606666244,
        0.08201913044,
        0.08270086844
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.08358421234909091,
      "stddev": 0.0021547606669308334,
      "median": 0.08269225144,
      "user": 0.01977884606060606,
      "system": 0.008143077575757576,
      "min": 0.08053523244,
      "max": 0.08864413044,
      "times": [
        0.08562597744,
        0.08237686044,
        0.08448215444,
        0.08715139444,
        0.08632203044,
        0.08053523244,
        0.08352796644,
        0.08799796044000001,
        0.08602930144,
        0.08296036344,
        0.08864413044,
        0.08643207644,
        0.08267371744,
        0.08609245944,
        0.08253616844,
        0.08217626644,
        0.08156619144,
        0.08187940944,
        0.08265623344,
        0.08216629744000001,
        0.08299925644,
        0.08153669644,
        0.08292804444,
        0.08269225144,
        0.08161658744,
        0.08218626344,
        0.08169151644,
        0.08260190244,
        0.08144262044,
        0.08293944544,
        0.08343330944,
        0.08654727144,
        0.08183165044
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.485 ± 0.132 4.396 4.808 1.29 ± 0.04
pacquet@main 4.523 ± 0.131 4.426 4.830 1.30 ± 0.04
pnpr@HEAD 3.472 ± 0.034 3.430 3.543 1.00 ± 0.02
pnpr@main 3.471 ± 0.055 3.427 3.618 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.485398917820001,
      "stddev": 0.13196650756404427,
      "median": 4.4277525861200004,
      "user": 1.7011720799999999,
      "system": 1.3825740599999998,
      "min": 4.39642077462,
      "max": 4.807990327620001,
      "times": [
        4.39642077462,
        4.432318474620001,
        4.43361872962,
        4.41192554662,
        4.63104645762,
        4.417090330620001,
        4.421657214620001,
        4.807990327620001,
        4.42318669762,
        4.47873462462
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.522797278920001,
      "stddev": 0.13115826200199132,
      "median": 4.45658759062,
      "user": 1.72009148,
      "system": 1.36803826,
      "min": 4.42642900362,
      "max": 4.82985240162,
      "times": [
        4.45091120862,
        4.42642900362,
        4.67694705162,
        4.44340540562,
        4.53006823862,
        4.82985240162,
        4.43824852862,
        4.4523349236200005,
        4.46084025762,
        4.5189357696200005
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.4719169295200003,
      "stddev": 0.03397079952081103,
      "median": 3.47129310512,
      "user": 1.1803004799999999,
      "system": 1.2233330599999999,
      "min": 3.42973043562,
      "max": 3.54342522562,
      "times": [
        3.4749041686199997,
        3.42973043562,
        3.44897385962,
        3.44844866762,
        3.43516307162,
        3.49161159662,
        3.54342522562,
        3.48616394062,
        3.49306628762,
        3.46768204162
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.4710989008199995,
      "stddev": 0.05473701225442561,
      "median": 3.4563921886199998,
      "user": 1.1811484799999998,
      "system": 1.22555186,
      "min": 3.42715930362,
      "max": 3.61845359062,
      "times": [
        3.47245510562,
        3.45687525862,
        3.43749901362,
        3.42715930362,
        3.45573397162,
        3.61845359062,
        3.45590911862,
        3.47709768362,
        3.47681937362,
        3.43298658862
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13130
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,673.13 ms
(-6.81%)Baseline: 2,868.58 ms
3,442.30 ms
(77.66%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,822.60 ms
(-9.78%)Baseline: 2,020.16 ms
2,424.19 ms
(75.18%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
528.86 ms
(-19.82%)Baseline: 659.61 ms
791.53 ms
(66.81%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
310.01 ms
(-22.73%)Baseline: 401.23 ms
481.47 ms
(64.39%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,346.11 ms
(-8.38%)Baseline: 2,560.77 ms
3,072.92 ms
(76.35%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,396.42 ms
(-5.59%)Baseline: 4,656.84 ms
5,588.21 ms
(78.67%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
248.49 ms
(-14.08%)Baseline: 289.23 ms
347.07 ms
(71.60%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13130
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,388.38 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
285.65 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
291.06 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
81.36 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,420.98 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,429.73 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
265.05 ms
🐰 View full continuous benchmarking report in Bencher

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

zkochan commented Jul 18, 2026

Copy link
Copy Markdown
Member

Thanks for working on this and for noting the existing assignment. I am closing this as a duplicate of #13131. The core ErrorKind::NotFound approach is equivalent, while #13131 now also includes direct idempotency regression coverage and the failing mirror path in unexpected I/O diagnostics. The issue was already assigned before this PR was opened.


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

@zkochan zkochan closed this Jul 18, 2026
@Ayush442842q
Ayush442842q deleted the fix/13105-cache-race-panic branch July 19, 2026 21:20
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