Skip to content

fix(pnpr-fixtures): replace a storage tree that lost its completion marker - #13749

Merged
zkochan merged 4 commits into
mainfrom
fix-fixture-marker
Aug 10, 2026
Merged

zkochan merged 4 commits into
mainfrom
fix-fixture-marker

Conversation

@zkochan

@zkochan zkochan commented Aug 10, 2026 •

Copy link
Copy Markdown
Member

Summary

Rust CI / Test is red on every platform for every PR opened since the last main run — see #13748 and #13743, both of which die identically on ubuntu, macOS, and windows before running a single test of their own:

thread '…' panicked at pnpr/crates/pnpr-fixtures/src/lib.rs:99:21:
publish generated registry fixture storage: Directory not empty (os error 39)

The generated registry-fixture storage is published by building a temp tree and renaming it onto target/pnpr-fixtures/storage/<fingerprint>. Renaming onto a non-empty directory fails with ENOTEMPTY, and the publisher forgave that only when the directory carried the .complete marker — the signal that a concurrent publisher already put good content there. Any other ENOTEMPTY aborted the process.

But a marker-less tree at that path is not a lost race, and it happens: a half-finished publish, or — what CI hit here — a build cache that restores target/ without the marker. Nothing is allowed to read such a tree (readers gate on the marker), and nothing could ever repair it, so it wedges every subsequent run until the cache rolls over. main stays green only because it has not run since the cache was written.

This makes the publisher replace an unusable tree instead of dying on it: move it aside with a rename — atomic, so exactly one publisher claims it — and publish over the space that frees. A publisher that loses to a complete tree still yields to it and drops its own copy, unchanged from before.

Reproduced locally by deleting the marker from an existing target/pnpr-fixtures/storage/<fingerprint>/, which turns every pacquet test into the CI panic; with this change the same setup self-heals on the next run and leaves no scratch directories behind.

No changeset: pnpr-fixtures is test infrastructure and is not published.

Squash Commit Body

The generated registry-fixture storage is published by renaming a freshly
built temp tree onto `target/pnpr-fixtures/storage/<fingerprint>`. A rename
onto a non-empty directory fails with ENOTEMPTY, which the publisher treated
as a lost race and forgave only when the target carried the `.complete`
marker; anything else aborted the process.

A marker-less tree at that path is not a lost race, and it does happen: a
half-finished publish, or a CI build cache that restores `target/` without
the marker. Nothing may read such a tree, and nothing could ever repair it,
so every test process that touched the fixtures died with "publish generated
registry fixture storage: Directory not empty" until the cache rolled over.

Move the unusable tree aside instead — atomically, so exactly one publisher
claims it — and publish over the space it frees.

Checklist

  • I checked the referenced issue and verified that none of the PRs
    already linked to it solves it.
  • The change is implemented in both the TypeScript CLI and the Rust
    pnpm/ port, or the description notes what still needs porting.
    (Test infrastructure for the Rust stack only — no TypeScript counterpart exists.)
  • Added or updated tests.

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


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Bug Fixes

    • Improved reliability when storage is published concurrently.
    • Safely replaces incomplete or stale storage and retries publication.
    • Preserves completed storage during competing publication and cleanup operations.
    • Cleans up temporary publishing data, including after a lost publication race.
    • Prevents completed storage from being incorrectly discarded.
    • Handles cleanup safely when storage is already absent.
  • Tests

    • Added coverage for incomplete storage replacement, concurrent publishing, temporary directory cleanup, and race-condition safeguards.

…arker

The generated registry-fixture storage is published by renaming a freshly
built temp tree onto `target/pnpr-fixtures/storage/<fingerprint>`. A rename
onto a non-empty directory fails with ENOTEMPTY, which the publisher treated
as a lost race and forgave only when the target carried the `.complete`
marker; anything else aborted the process.

A marker-less tree at that path is not a lost race, and it does happen: a
half-finished publish, or a CI build cache that restores `target/` without
the marker. Nothing may read such a tree, and nothing could ever repair it,
so every test process that touched the fixtures died with "publish generated
registry fixture storage: Directory not empty" until the cache rolled over.

Move the unusable tree aside instead — atomically, so exactly one publisher
claims it — and publish over the space it frees.
Copilot AI lite review requested due to automatic review settings August 10, 2026 00:02

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.

@coderabbitai

coderabbitai Bot commented Aug 10, 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: ed503974-be85-42af-9872-03c32309d7bc

📥 Commits

Reviewing files that changed from the base of the PR and between 7f7d543 and 8a9c717.

📒 Files selected for processing (1)
  • pnpr/crates/pnpr-fixtures/src/tests.rs

📝 Walkthrough

Walkthrough

Storage creation now uses unique scratch directories and atomic publication. Incomplete destinations move aside before retry. Completed competing publications remain unchanged, and redundant temporary trees are removed. Tests cover stale-tree replacement and concurrent publication behavior.

Changes

Storage publication

Layer / File(s) Summary
Temporary storage publication and recovery
pnpr/crates/pnpr-fixtures/src/lib.rs
ensure_storage_for_fingerprint builds in a unique temporary directory. publish_storage publishes completed storage, replaces incomplete destinations, and discards redundant temporary trees.
Publication race validation
pnpr/crates/pnpr-fixtures/src/tests.rs
Tests cover stale destination replacement, cleanup of temporary trees, preservation of completed competing publications, restoration races, and no-op discard behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ensure_storage_for_fingerprint
  participant publish_storage
  participant Filesystem
  ensure_storage_for_fingerprint->>Filesystem: Build storage in scratch directory
  ensure_storage_for_fingerprint->>Filesystem: Write completion marker
  ensure_storage_for_fingerprint->>publish_storage: Publish scratch directory
  publish_storage->>Filesystem: Move incomplete destination aside
  publish_storage->>Filesystem: Atomically publish completed storage
  publish_storage->>Filesystem: Remove redundant scratch directory
Loading

Possibly related PRs

  • pnpm/pnpm#13648: Both PRs modify concurrent storage publication behavior to preserve completed directories while replacing incomplete ones.

Suggested labels: product: pnpr

✨ 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-fixture-marker

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.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix pnpr-fixtures: recover from markerless storage directories

🐞 Bug fix 🧪 Tests 🕐 20-40 Minutes

Grey Divider

AI Description

• Make fixture storage publishing self-heal when an incomplete cached tree exists.
• Preserve race safety: yield to existing storage only when .complete is present.
• Add tests covering replacement and race-yield behavior.
Diagram

graph TD
  A["ensure_storage_for_fingerprint()"] --> B["build_storage()"] --> C[("temp storage tree")] --> D["publish_storage()"] --> F[("storage/<fingerprint>")]
  D --> E["try_publish_storage()"] --> F
  D --> H[("storage.stale")]
  H --> I["remove_dir_all()"];
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Advisory locking (lockfile) around publish
  • ➕ Avoids rename races entirely; simpler error handling paths
  • ➕ Makes behavior deterministic across publishers
  • ➖ Needs robust stale-lock handling and platform nuances (Windows semantics, orphaned locks)
  • ➖ Introduces new failure mode (deadlock/wedged lock) instead of self-healing
2. Always delete existing storage on ENOTEMPTY
  • ➕ Simpler logic than quarantine-then-retry
  • ➕ Guaranteed to clear the wedge
  • ➖ Risky if deletion races with a valid publisher or a reader (even if readers gate on marker, timing bugs are costlier)
  • ➖ Less conservative than atomic rename-as-claim approach

Recommendation: Keep the PR’s approach: atomically renaming the markerless directory aside is a safe “claim” mechanism that preserves concurrent publisher correctness (still yields to .complete) while reliably unwedging cached/incomplete state. The quarantine-and-delete step also minimizes risk compared to direct deletion of the target path.

Files changed (2) +95 / -11

Bug fix (1) +36 / -9
lib.rsSelf-healing publish for markerless fixture storage trees +36/-9

Self-healing publish for markerless fixture storage trees

• Extracts publish logic into 'publish_storage'/'try_publish_storage' and introduces 'scratch_name' for collision-free scratch directories. On ENOTEMPTY without '.complete', the existing storage is atomically moved aside and removed, then publishing is retried; if '.complete' exists, the publisher yields and deletes its temp tree.

pnpr/crates/pnpr-fixtures/src/lib.rs

Tests (1) +59 / -2
tests.rsAdd regression tests for storage publish recovery and race-yield +59/-2

Add regression tests for storage publish recovery and race-yield

• Adds TempDir-based tests verifying that markerless existing storage gets replaced and that an existing '.complete' storage causes the publisher to yield. Updates imports to access 'publish_storage' and 'COMPLETE_FILE' and uses fs helpers for setup/assertions.

pnpr/crates/pnpr-fixtures/src/tests.rs

@greptile-apps

greptile-apps Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (4): Last reviewed commit: "test(pnpr-fixtures): cover the claim tha..." | Re-trigger Greptile

Comment thread pnpr/crates/pnpr-fixtures/src/tests.rs Resolved

@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 `@pnpr/crates/pnpr-fixtures/src/lib.rs`:
- Around line 106-108: Prevent completed competing publications from being
relocated and deleted by serializing stale-tree claiming or adopting a recovery
protocol that cannot remove a completed tree; update the stale-tree handling
around generated, scratch_name, fs::rename, and fs::remove_dir_all in
pnpr/crates/pnpr-fixtures/src/lib.rs (lines 106-108). Add a deterministic
interleaving test in pnpr/crates/pnpr-fixtures/src/tests.rs (lines 150-173)
where completion occurs after the first publish attempt fails but before
stale-tree relocation, and assert the completed tree wins the race.
🪄 Autofix

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: c268c5f0-fcd6-41bf-a3ce-5ea0329230b8

📥 Commits

Reviewing files that changed from the base of the PR and between 478aee6 and c521e8e.

📒 Files selected for processing (2)
  • pnpr/crates/pnpr-fixtures/src/lib.rs
  • pnpr/crates/pnpr-fixtures/src/tests.rs

Comment thread pnpr/crates/pnpr-fixtures/src/lib.rs Resolved
…cided

Claiming the unusable tree with a rename orders concurrent publishers, but
the claim is decided before the marker can be read: a competing publisher
can complete the tree in between, and readers already hold that path.
Deleting it then would pull content out from under them.

Re-check the marker after the claim and put a completed tree straight back.
Copilot AI review requested due to automatic review settings August 10, 2026 00:07

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 Code Suggestions ✨

Warning

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

No code suggestions found for the PR.

@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 `@pnpr/crates/pnpr-fixtures/src/tests.rs`:
- Around line 169-182: Update
discarding_leaves_a_tree_that_completed_after_the_claim_was_decided to
coordinate with discard_unusable_storage using a deterministic test-only hook or
barrier immediately after the storage rename/claim and before the
completion-marker check. Create COMPLETE_FILE only after that boundary, then
assert both the original content and completion marker are restored; avoid
sleep-based timing and preserve cross-platform behavior.
🪄 Autofix

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: f42a4d72-13a6-44cb-91be-6447cb2d4ca7

📥 Commits

Reviewing files that changed from the base of the PR and between c521e8e and 7a0aff6.

📒 Files selected for processing (2)
  • pnpr/crates/pnpr-fixtures/src/lib.rs
  • pnpr/crates/pnpr-fixtures/src/tests.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • pnpr/crates/pnpr-fixtures/src/lib.rs

Comment thread pnpr/crates/pnpr-fixtures/src/tests.rs Resolved
@qodo-code-review

qodo-code-review Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Action required

1. Restore rename can panic ✓ Resolved 🐞 Bug ☼ Reliability
Description
In discard_unusable_storage(), a claimed directory that turns out to be complete is restored with
fs::rename(...).expect(...); if another concurrent publisher recreates storage while it is
temporarily absent, the restore rename can fail (destination exists) and panic even though a valid
completed tree now exists at storage. This can reintroduce CI/test flakiness under cross-process
fixture publishing (multiple binaries call pnpr_fixtures::ensure_storage()).
Code

pnpr/crates/pnpr-fixtures/src/lib.rs[R126-128]

+    if claimed.join(COMPLETE_FILE).exists() {
+        fs::rename(&claimed, storage).expect("restore completed registry fixture storage");
+        return;
Relevance

●●● Strong

Team often hardens race/conflict paths to avoid panics; this prevents flaky concurrent fixture
publishing.

PR-#12832

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The code currently panics on restore if storage is repopulated before the restore rename runs, and
there are multiple call sites that can execute fixture publishing in separate processes sharing the
same target directory.

pnpr/crates/pnpr-fixtures/src/lib.rs[101-107]
pnpr/crates/pnpr-fixtures/src/lib.rs[121-130]
pnpm/crates/testing-utils/src/registry.rs[46-52]
pnpm/tasks/registry-mock/src/dirs.rs[39-42]

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

### Issue description
`discard_unusable_storage()` claims `storage` by renaming it to a scratch path. If the claimed tree has `.complete`, it tries to restore it back to `storage` via `fs::rename(...).expect(...)`. While `storage` is absent, another publisher can successfully publish into `storage`, making the restore rename fail with “destination exists” and panic.

### Issue Context
This crate is invoked from multiple test/bench binaries (and therefore multiple processes) that share the same generated fixture storage directory, so cross-process publish races are plausible.

### Fix Focus Areas
- pnpr/crates/pnpr-fixtures/src/lib.rs[121-131]

### How to fix
- Replace the unconditional `expect` restore with error-aware logic:
 - Attempt `fs::rename(&claimed, storage)`.
 - If it fails because the destination exists, treat it as a benign race **when** `storage/.complete` exists (meaning another publisher has already placed a good tree); remove `claimed` and return.
 - Otherwise (unexpected error or destination exists but `storage/.complete` missing), either retry/loop with a fresh claim name or return an error up to `publish_storage` so it can retry/abort cleanly without panicking.
- Consider adding a regression test that simulates: claim complete tree → create new `storage` before restore → ensure no panic and no leftover scratch dirs.

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


Grey Divider

Context used
✅ Compliance rules (platform): 26 rules

Grey Divider

Tip of the day
💡 Did you know, you can reply 'qodo' on any finding to push back, ask questions, or dig deeper

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread pnpr/crates/pnpr-fixtures/src/lib.rs Resolved
@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.

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

codecov-commenter commented Aug 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.11%. Comparing base (86a7fcd) to head (8a9c717).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13749   +/-   ##
=======================================
  Coverage   88.11%   88.11%           
=======================================
  Files         622      622           
  Lines      101098   101125   +27     
=======================================
+ Hits        89079    89110   +31     
+ Misses      12019    12015    -4     

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

The claim leaves `storage` free, so a publisher can land its own tree there
before the restore runs and the restoring rename fails on it. That content
is the same — the path is keyed by a fingerprint of the fixtures — so the
claim is redundant rather than lost. Drop it instead of aborting.
Copilot AI review requested due to automatic review settings August 10, 2026 00:14

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 7f7d543

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

Copilot AI review requested due to automatic review settings August 10, 2026 00:22

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 8a9c717

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

@github-actions

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 8a9c7176c06a

Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm. 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.511 ± 0.169 2.335 2.800 1.72 ± 0.19
pacquet@main 2.482 ± 0.139 2.333 2.750 1.70 ± 0.17
pnpr@HEAD 1.470 ± 0.133 1.345 1.678 1.01 ± 0.12
pnpr@main 1.461 ± 0.124 1.348 1.733 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.5105783845799996,
      "stddev": 0.16859786326825507,
      "median": 2.48156457448,
      "user": 1.6840514199999999,
      "system": 1.32123174,
      "min": 2.33539663398,
      "max": 2.79980626298,
      "times": [
        2.4263511209799997,
        2.35693875098,
        2.53677802798,
        2.6246443349799997,
        2.6181484659799996,
        2.34975964498,
        2.70070342498,
        2.35725717798,
        2.33539663398,
        2.79980626298
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.4822616365799997,
      "stddev": 0.13948270087684822,
      "median": 2.47860442248,
      "user": 1.6649314199999998,
      "system": 1.31945624,
      "min": 2.33262737398,
      "max": 2.74980931098,
      "times": [
        2.36618914098,
        2.48269013698,
        2.4745187079799997,
        2.59589771298,
        2.3613910259799997,
        2.74980931098,
        2.61680636998,
        2.5066264869799997,
        2.33606009898,
        2.33262737398
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.4704062479800002,
      "stddev": 0.1332783387351843,
      "median": 1.40329705448,
      "user": 1.2058428199999998,
      "system": 1.11842494,
      "min": 1.34461951498,
      "max": 1.6784910369800001,
      "times": [
        1.3729325299800001,
        1.4337780719800002,
        1.40184575498,
        1.6370436939800002,
        1.6784910369800001,
        1.34461951498,
        1.6648084089800002,
        1.40474835398,
        1.3857636289800002,
        1.3800314849800002
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.46108827538,
      "stddev": 0.12407981152495638,
      "median": 1.42505343898,
      "user": 1.20946152,
      "system": 1.12367384,
      "min": 1.34830370798,
      "max": 1.73278020098,
      "times": [
        1.4523004209800001,
        1.4404002049800002,
        1.58784260098,
        1.35605183898,
        1.73278020098,
        1.36280852498,
        1.40970667298,
        1.38249599098,
        1.5381925899800002,
        1.34830370798
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 248.0 ± 5.3 241.0 256.7 1.00
pacquet@main 251.0 ± 10.4 235.8 269.4 1.01 ± 0.05
pnpr@HEAD 263.5 ± 11.4 251.1 288.2 1.06 ± 0.05
pnpr@main 263.5 ± 8.7 254.1 284.8 1.06 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.24795588208000002,
      "stddev": 0.005344500921318115,
      "median": 0.24764411568,
      "user": 0.21940394000000002,
      "system": 0.48454476,
      "min": 0.24096335918,
      "max": 0.25670416018000003,
      "times": [
        0.24273017618,
        0.24096335918,
        0.24853971718,
        0.24928166418,
        0.24674851418000002,
        0.25293650418,
        0.25670416018000003,
        0.25419004818,
        0.24288584518,
        0.24457883218
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.25104263308,
      "stddev": 0.010430700349538791,
      "median": 0.25041448818,
      "user": 0.21400864,
      "system": 0.48814696,
      "min": 0.23583647718,
      "max": 0.26938725218000004,
      "times": [
        0.25429299718000004,
        0.25851372118,
        0.26938725218000004,
        0.24032800818000002,
        0.24906383218000003,
        0.25176514418,
        0.26238317918000004,
        0.24222535718000002,
        0.23583647718,
        0.24663036218
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.26354211148,
      "stddev": 0.011381242515343276,
      "median": 0.25978210168000004,
      "user": 0.22898414000000003,
      "system": 0.49066356000000005,
      "min": 0.25111637818,
      "max": 0.28817485618,
      "times": [
        0.28817485618,
        0.25830079418,
        0.26068331518000004,
        0.26029675618000003,
        0.25752008718,
        0.27328364318000004,
        0.25926744718,
        0.25111637818,
        0.27361058218,
        0.25316725518
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.26347871128,
      "stddev": 0.008742983742214223,
      "median": 0.26169059718,
      "user": 0.21585654,
      "system": 0.5129580600000001,
      "min": 0.25409846618000004,
      "max": 0.28483961118,
      "times": [
        0.25645356518,
        0.26249580018,
        0.28483961118,
        0.26088539418,
        0.25409846618000004,
        0.25820276918,
        0.26395178018000004,
        0.25970146318000004,
        0.27011094118,
        0.26404732218
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.584 ± 0.015 2.565 2.604 1.64 ± 0.14
pacquet@main 2.566 ± 0.013 2.539 2.584 1.63 ± 0.14
pnpr@HEAD 1.572 ± 0.135 1.435 1.776 1.00
pnpr@main 1.582 ± 0.142 1.440 1.835 1.01 ± 0.13
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.5842173055600006,
      "stddev": 0.014619297115902503,
      "median": 2.58971262746,
      "user": 1.6929876199999998,
      "system": 1.3399181199999999,
      "min": 2.5646012329600003,
      "max": 2.6038325219600003,
      "times": [
        2.5649926839600004,
        2.58690649696,
        2.6038325219600003,
        2.5751067629600004,
        2.59653573896,
        2.59582312796,
        2.5646012329600003,
        2.56833513096,
        2.59251875796,
        2.5935206009600003
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.5655789470600006,
      "stddev": 0.012883090970010617,
      "median": 2.5649386114600006,
      "user": 1.6412351199999997,
      "system": 1.35808682,
      "min": 2.5391494159600003,
      "max": 2.5844146299600004,
      "times": [
        2.5844146299600004,
        2.5725503519600004,
        2.5589727859600004,
        2.5592898929600003,
        2.5694515489600005,
        2.5391494159600003,
        2.5660636689600005,
        2.56381355396,
        2.5817804049600004,
        2.56030321696
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5721894702600003,
      "stddev": 0.13497025480448946,
      "median": 1.54278681646,
      "user": 1.16326482,
      "system": 1.17940112,
      "min": 1.43527837196,
      "max": 1.77647927496,
      "times": [
        1.47593420396,
        1.44823145396,
        1.60963942896,
        1.43954271396,
        1.77647927496,
        1.71627165396,
        1.43527837196,
        1.68900380796,
        1.67835664196,
        1.45315715096
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.58165694146,
      "stddev": 0.1420817952434536,
      "median": 1.52383345646,
      "user": 1.2053801199999996,
      "system": 1.15369342,
      "min": 1.43977109296,
      "max": 1.83533731196,
      "times": [
        1.83533731196,
        1.43977109296,
        1.44895647796,
        1.8042869729600002,
        1.50322361196,
        1.5052670749600001,
        1.47638098696,
        1.6124605949600002,
        1.54239983796,
        1.64848545196
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 417.1 ± 22.5 383.3 446.5 1.43 ± 0.08
pacquet@main 395.7 ± 13.7 379.5 418.7 1.36 ± 0.05
pnpr@HEAD 298.0 ± 3.6 290.6 302.5 1.02 ± 0.02
pnpr@main 292.0 ± 4.8 283.5 297.3 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.41710087126000006,
      "stddev": 0.022507401243522362,
      "median": 0.41866881436000003,
      "user": 0.5479866,
      "system": 0.63882064,
      "min": 0.38327948186000005,
      "max": 0.44654617086000004,
      "times": [
        0.44654617086000004,
        0.41351601986000003,
        0.44458120386000005,
        0.43323971486,
        0.39245261986,
        0.43370125686000005,
        0.42382160886000003,
        0.40099926686000004,
        0.39887136886,
        0.38327948186000005
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.39566200476,
      "stddev": 0.0136535262904825,
      "median": 0.39285099786000005,
      "user": 0.5053059,
      "system": 0.6783895399999998,
      "min": 0.37951147486000003,
      "max": 0.41874331886000005,
      "times": [
        0.38271124586000005,
        0.38568447686,
        0.39624737286000006,
        0.38945462286000004,
        0.41331435186000004,
        0.40357686186,
        0.40358746486,
        0.41874331886000005,
        0.37951147486000003,
        0.38378885686
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.29797573066000005,
      "stddev": 0.0035943834194740467,
      "median": 0.29827947886000006,
      "user": 0.2014328,
      "system": 0.49581194,
      "min": 0.29057506286,
      "max": 0.30248921886,
      "times": [
        0.29887236686,
        0.30230604686,
        0.29453302286000005,
        0.30022476186,
        0.29935259686000004,
        0.29654692786000003,
        0.30248921886,
        0.29717071086,
        0.29768659086000004,
        0.29057506286
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.29199049476,
      "stddev": 0.004809084301534806,
      "median": 0.29246660436000005,
      "user": 0.18906610000000001,
      "system": 0.50084474,
      "min": 0.28347887186000004,
      "max": 0.29728347186000004,
      "times": [
        0.28787720486,
        0.28347887186000004,
        0.29585706086,
        0.29109163886,
        0.28989747986000003,
        0.29717127886,
        0.29384156986000004,
        0.28722032586,
        0.29618604486,
        0.29728347186000004
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.711 ± 0.009 1.699 1.728 5.89 ± 0.12
pacquet@main 1.708 ± 0.009 1.691 1.724 5.87 ± 0.12
pnpr@HEAD 0.291 ± 0.006 0.282 0.304 1.00
pnpr@main 0.296 ± 0.008 0.278 0.306 1.02 ± 0.03
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.7107325169799998,
      "stddev": 0.009101795162433405,
      "median": 1.70672650778,
      "user": 0.7637770599999999,
      "system": 0.740171,
      "min": 1.69943110678,
      "max": 1.72818498078,
      "times": [
        1.71974278078,
        1.69943110678,
        1.72818498078,
        1.7051837137799999,
        1.71572375278,
        1.70772751578,
        1.7023480427800002,
        1.70569674778,
        1.7057254997800002,
        1.71756102878
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.70764276158,
      "stddev": 0.009367183058652672,
      "median": 1.70972867578,
      "user": 0.7621032600000001,
      "system": 0.7460243000000001,
      "min": 1.69055510378,
      "max": 1.7238954447800001,
      "times": [
        1.69055510378,
        1.70882788278,
        1.69655461778,
        1.71138727778,
        1.71062946878,
        1.70239831378,
        1.70630412878,
        1.71360752478,
        1.7122678527800002,
        1.7238954447800001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.29068793828,
      "stddev": 0.005872590499675863,
      "median": 0.28983392628000004,
      "user": 0.21505816000000003,
      "system": 0.47203540000000005,
      "min": 0.28204354478000004,
      "max": 0.30365626778000004,
      "times": [
        0.29356773778,
        0.28828531578,
        0.28749203478,
        0.28204354478000004,
        0.29123023178,
        0.29232803578000005,
        0.29404079978000003,
        0.28843762078,
        0.30365626778000004,
        0.28579779378000003
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.29600408427999997,
      "stddev": 0.007554718259001829,
      "median": 0.29682212578,
      "user": 0.17942196,
      "system": 0.5072303,
      "min": 0.27848628178,
      "max": 0.30642682278,
      "times": [
        0.30205743778000005,
        0.27848628178,
        0.29539645078000004,
        0.30089167278,
        0.29415139178000005,
        0.29379020278,
        0.29824780078,
        0.29191360078,
        0.29867918078,
        0.30642682278
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 209.1 ± 17.2 183.0 240.3 2.30 ± 0.21
pacquet@main 204.0 ± 10.5 181.4 214.4 2.24 ± 0.14
pnpr@HEAD 91.3 ± 3.7 85.6 102.5 1.00 ± 0.05
pnpr@main 90.9 ± 3.2 85.5 98.0 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.20905843584000003,
      "stddev": 0.017166430470537116,
      "median": 0.20766702734000003,
      "user": 0.16370502333333334,
      "system": 0.06823116333333333,
      "min": 0.18300178184000002,
      "max": 0.24034040384000002,
      "times": [
        0.23319949484000002,
        0.24034040384000002,
        0.21018209884,
        0.20618706484000002,
        0.20406056584,
        0.21686751284,
        0.20914698984000002,
        0.19396250884000002,
        0.19059581084000002,
        0.18300178184000002,
        0.19768672084,
        0.22347027684
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.2040167395275,
      "stddev": 0.010483923216621852,
      "median": 0.20823977534000002,
      "user": 0.16656469,
      "system": 0.06766570499999999,
      "min": 0.18136787184,
      "max": 0.21440834784,
      "times": [
        0.18136787184,
        0.21193471484,
        0.18520512084000001,
        0.19437009484,
        0.20749855284000002,
        0.21178395184,
        0.21268555384,
        0.21063959084,
        0.21158642384,
        0.21176407284,
        0.20001024184000002,
        0.20898099784000002,
        0.20488019484,
        0.21440834784,
        0.20594747684,
        0.19120462484
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.09130909473999997,
      "stddev": 0.003697191267029938,
      "median": 0.09102939984,
      "user": 0.02417097333333333,
      "system": 0.009286807999999999,
      "min": 0.08564719984000001,
      "max": 0.10248505584,
      "times": [
        0.09200538684000001,
        0.09682681384,
        0.09377235784,
        0.10248505584,
        0.08984412984000001,
        0.09227678484,
        0.09540397484,
        0.09042795584,
        0.09090021584,
        0.09250803184,
        0.08967161884000001,
        0.09077688684,
        0.09500967984,
        0.08873453984,
        0.08668367284,
        0.08564719984000001,
        0.08629233284,
        0.09197914084,
        0.08870564784,
        0.09179754384000001,
        0.08837425184,
        0.09475696184,
        0.08797073784000001,
        0.09624319384,
        0.09405057484,
        0.08959228884,
        0.08765884984,
        0.09115858384,
        0.09121493884000001,
        0.08650348984
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.09089829216258064,
      "stddev": 0.003186234568123229,
      "median": 0.09080503084000001,
      "user": 0.020882714193548386,
      "system": 0.01286381935483871,
      "min": 0.08546105684000001,
      "max": 0.09795289084,
      "times": [
        0.09080503084000001,
        0.09024707684000001,
        0.08831447284,
        0.09097890084,
        0.09101368084,
        0.09590700784,
        0.09715382384,
        0.09092334184,
        0.09188843184,
        0.08956068484,
        0.08656452284,
        0.09270757784,
        0.09120922084000001,
        0.08996779684,
        0.09024028684,
        0.09054705584,
        0.09299018884,
        0.09771548884,
        0.08826521784000001,
        0.09242303584,
        0.09251749984,
        0.08869096284,
        0.08546105684000001,
        0.09175033684,
        0.09795289084,
        0.09026375984,
        0.08667979884,
        0.09004194384,
        0.08617473584,
        0.08682381284,
        0.09206741384
      ]
    }
  ]
}

Scenario: Isolated linker: peer-heavy resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 852.1 ± 186.0 585.3 1104.0 1.19 ± 0.42
pacquet@main 716.5 ± 196.2 561.4 1010.4 1.00
pnpm@HEAD 2928.4 ± 60.2 2868.7 3011.5 4.09 ± 1.12
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.8521381836177776,
      "stddev": 0.1860100686707141,
      "median": 0.83100778584,
      "user": 0.7962351022222222,
      "system": 0.16002172666666664,
      "min": 0.58525066884,
      "max": 1.10401125284,
      "times": [
        1.0153604968399998,
        1.10401125284,
        0.60226857784,
        0.83100778584,
        0.58525066884,
        0.81780475484,
        1.00807018684,
        0.96916488584,
        0.7363050428400001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.7165038991733333,
      "stddev": 0.1962240865266779,
      "median": 0.59906891484,
      "user": 0.6709892133333333,
      "system": 0.1426952822222222,
      "min": 0.56139479384,
      "max": 1.0104019468399998,
      "times": [
        0.5819121218400001,
        1.0104019468399998,
        0.63960924584,
        0.9346425918400001,
        0.5721814028400001,
        0.56139479384,
        0.59906891484,
        0.9803308488400001,
        0.56899322584
      ]
    },
    {
      "command": "pnpm@HEAD",
      "mean": 2.9284079748400003,
      "stddev": 0.06023704892978519,
      "median": 2.90028690484,
      "user": 4.201581324444445,
      "system": 0.2955779488888888,
      "min": 2.8686964978400002,
      "max": 3.0115068648400003,
      "times": [
        3.00204490484,
        2.88720389084,
        2.90028690484,
        3.00131852584,
        2.87943316084,
        2.87431863284,
        3.0115068648400003,
        2.8686964978400002,
        2.93086239084
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.544 ± 0.148 4.421 4.846 1.29 ± 0.05
pacquet@main 4.478 ± 0.107 4.413 4.762 1.27 ± 0.04
pnpr@HEAD 3.519 ± 0.063 3.452 3.662 1.00
pnpr@main 3.555 ± 0.122 3.448 3.833 1.01 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.543943046560001,
      "stddev": 0.1479029132491325,
      "median": 4.46664496416,
      "user": 1.83453038,
      "system": 1.43852438,
      "min": 4.42114162816,
      "max": 4.8458981881600005,
      "times": [
        4.5852963011600005,
        4.70330412116,
        4.43065915816,
        4.42114162816,
        4.49200176516,
        4.42369638516,
        4.65519796416,
        4.44128816316,
        4.44094679116,
        4.8458981881600005
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.47846568266,
      "stddev": 0.10723767603893727,
      "median": 4.42882775566,
      "user": 1.8477393799999997,
      "system": 1.4305298799999997,
      "min": 4.413182278160001,
      "max": 4.76154172916,
      "times": [
        4.41669248116,
        4.42676767816,
        4.76154172916,
        4.413182278160001,
        4.42411610116,
        4.445122712160001,
        4.4257739461600005,
        4.51772631716,
        4.52284575016,
        4.43088783316
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.5187521427600004,
      "stddev": 0.06344149901360074,
      "median": 3.5008186971599997,
      "user": 1.30994308,
      "system": 1.2275875799999998,
      "min": 3.45150404516,
      "max": 3.66153789116,
      "times": [
        3.48849001816,
        3.52375053816,
        3.45150404516,
        3.50588414516,
        3.58705700216,
        3.66153789116,
        3.53368449316,
        3.49575324916,
        3.46659121616,
        3.47326882916
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.5549675358600004,
      "stddev": 0.12202253343340992,
      "median": 3.51820157716,
      "user": 1.31391368,
      "system": 1.2191001799999999,
      "min": 3.44842093516,
      "max": 3.8330208141599997,
      "times": [
        3.46675224716,
        3.53150907316,
        3.44842093516,
        3.56859094616,
        3.57987380416,
        3.4499075761599998,
        3.8330208141599997,
        3.50489408116,
        3.68593247016,
        3.48077341116
      ]
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13749
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,564.60 ms
(-2.18%)Baseline: 2,621.70 ms
3,146.05 ms
(81.52%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,699.43 ms
(-2.29%)Baseline: 1,739.21 ms
2,087.05 ms
(81.43%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
383.28 ms
(-10.93%)Baseline: 430.30 ms
516.35 ms
(74.23%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
183.00 ms
(-14.46%)Baseline: 213.94 ms
256.73 ms
(71.28%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,335.40 ms
(-2.80%)Baseline: 2,402.63 ms
2,883.15 ms
(81.00%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,421.14 ms
(-1.71%)Baseline: 4,498.02 ms
5,397.62 ms
(81.91%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
240.96 ms
(-8.81%)Baseline: 264.25 ms
317.10 ms
(75.99%)
isolated-linker.peer-heavy-resolve.hot-cache.offline📈 view plot
🚷 view threshold
585.25 ms
(-13.62%)Baseline: 677.55 ms
813.06 ms
(71.98%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13749
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,435.28 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
282.04 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
290.58 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
85.65 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,344.62 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,451.50 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
251.12 ms
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit 9463e98 into main Aug 10, 2026
31 checks passed
@zkochan
zkochan deleted the fix-fixture-marker branch August 10, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pnpr reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants