Skip to content

fix(cli): align dedupe check reporting - #13462

Merged
zkochan merged 2 commits into
mainfrom
fix-13457-2
Jul 28, 2026
Merged

zkochan merged 2 commits into
mainfrom
fix-13457-2

Conversation

@zkochan

@zkochan zkochan commented Jul 28, 2026 •

Copy link
Copy Markdown
Member

Summary

Aligns the Rust pnpm implementation’s dedupe --check reporting with the TypeScript CLI:

  • emits resolution progress for the lockfile-only dedupe pass without an added-packages count;
  • routes the check failure through the reporter so the default output matches pnpm and avoids a second Miette diagnostic;
  • preserves the structured diff in NDJSON output and keeps the silent reporter silent.

The TypeScript CLI already has the desired behavior, so this change only updates the Rust implementation. Related to item 2 of #13457.

Squash Commit Body

The Rust lockfile-only dedupe path bypassed both ordinary resolution progress and pnpm-style error reporting. Attach a lightweight resolution observer to emit resolved-package progress, then report check failures as a structured pnpm event that each reporter can handle appropriately.

This makes default, NDJSON, and silent output match the TypeScript CLI while retaining the existing exit status and leaving the lockfile untouched.

Related to item 2 of pnpm/pnpm#13457.

Checklist

  • The TypeScript CLI already provides the target behavior; the Rust pnpm/ port is aligned by this PR.
  • Added a pacquet patch changeset.
  • Added or updated tests for default, NDJSON, silent, and structured reporter output.
  • Documentation updates are not needed for this output-parity fix.

Written by an agent (Codex, GPT-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
    • Aligned pnpm dedupe --check progress and error reporting with the TypeScript CLI.
    • Improved output stream handling for lockfile-diff results (and ensured stderr is empty where applicable).
    • Standardized the failure exit code and reduced duplicate error text for dedupe-check issues.
  • New Features
    • Added structured NDJSON reporting for pnpm dedupe --check, including machine-readable error details and diff payloads.
    • Added/strengthened “silent” reporting mode behavior.
    • Improved resolution progress events during deduplication.
    • Added an option to hide “added packages” progress materialization counts in the default reporter.

Copilot AI review requested due to automatic review settings July 28, 2026 08:41

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

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

Copy link
Copy Markdown

PR Summary by Qodo

Fix Rust CLI dedupe --check progress and error reporting parity

🐞 Bug fix 🧪 Tests 🕐 40+ Minutes

Grey Divider

AI Description

• Emit resolved-package progress during lockfile-only dedupe to match pnpm TypeScript output.
• Report dedupe --check failures via reporter events, avoiding duplicate Miette diagnostics.
• Add coverage for default, NDJSON, and silent reporter behavior and payload shape.
Diagram

graph TD
  A["pnpm CLI"] --> B["DedupeArgs"] --> C["Install (lockfile-only)"] --> D["ResolutionObserver"] --> E["Reporter"]
  B --> F["diff_lockfiles"] --> G["DedupeCheck event"] --> E
  E --> H["Default/NDJSON/Silent output"]
  subgraph Legend
    direction LR
    _cli(["CLI/module"]) ~~~ _pkg["Package manager"] ~~~ _rep["Reporter"]
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Encode dedupe-check as a generic PnpmLog with extra fields
  • ➕ Avoids adding a new LogEvent variant and default-reporter handler
  • ➕ Keeps all pnpm errors going through a single event type
  • ➖ Blurs semantics and makes typed handling harder in default reporter
  • ➖ Risk of inconsistent NDJSON shape across different error kinds
2. Keep Miette diagnostic, teach report handler/reporters to suppress duplicates
  • ➕ Preserves existing error plumbing and diagnostic metadata
  • ➕ Avoids adding new structured payload types for this one case
  • ➖ More brittle: requires coordination between diagnostic rendering and reporter output
  • ➖ Harder to guarantee silent/ndjson parity and avoid double-rendering
3. Move dedupe-check rendering/payload generation into pacquet_reporter crate
  • ➕ Centralizes wire-shape and rendering logic near event definitions
  • ➕ Reduces duplicated formatting responsibilities in CLI
  • ➖ Increases coupling between CLI-specific diff computation and reporter crate APIs
  • ➖ May require additional abstractions for lockfile diff types

Recommendation: Current approach (new DedupeCheck event + lightweight ResolutionObserver) is the cleanest for output parity: it gives reporters a single structured source of truth (including NDJSON payload) while letting the default reporter render terminal-friendly text and keeping the silent reporter silent. The added main() ExitCode handling complements this by preventing a second, redundant Miette diagnostic for the same reported error.

Files changed (12) +357 / -33

Enhancement (4) +46 / -1
reporter.rsAdd default-reporter option to hide added-pkgs progress +2/-0

Add default-reporter option to hide added-pkgs progress

• Extends default reporter configuration to accept a hide_added_pkgs_progress flag and forwards it into pacquet_default_reporter before initialization.

pnpm/crates/cli/src/cli_args/reporter.rs

lib.rsPlumb hide_added_pkgs_progress into default reporter options +10/-0

Plumb hide_added_pkgs_progress into default reporter options

• Adds a OnceLock-backed configuration for hiding the added-packages count in dependency progress output and passes it into ReporterOptions at sink initialization.

pnpm/crates/default-reporter/src/lib.rs

state.rsRender DedupeCheck events in default reporter +6/-1

Render DedupeCheck events in default reporter

• Extends the default reporter state machine to handle LogEvent::DedupeCheck by pushing the provided terminal rendering as a block, matching pnpm’s default output expectations.

pnpm/crates/default-reporter/src/state.rs

lib.rsAdd structured DedupeCheck log event and error payload type +28/-0

Add structured DedupeCheck log event and error payload type

• Introduces LogEvent::DedupeCheck (serialized as name: "pnpm") plus PnpmErrorLog and DedupeCheckLog to carry the ERR_PNPM_DEDUPE_CHECK_ISSUES payload and structured dedupe diff for NDJSON consumers while keeping terminal-only rendering off the wire.

pnpm/crates/reporter/src/lib.rs

Bug fix (3) +108 / -14
main.rsSwitch binary entrypoint to return ExitCode +1/-1

Switch binary entrypoint to return ExitCode

• Adjusts the CLI binary main signature to return std::process::ExitCode, delegating to pacquet_cli::main(). This supports consistent process exit behavior without relying on miette::Result in the bin wrapper.

pnpm/crates/cli/src/bin/main.rs

dedupe.rsEmit dedupe progress and reporter-driven check failures +92/-10

Emit dedupe progress and reporter-driven check failures

• Attaches a ResolutionObserver for lockfile-only dedupe to emit resolved-package progress events. Reworks dedupe --check failure to emit a structured DedupeCheck reporter event (with rendered text + JSON diff payload) instead of printing directly, and adjusts the diagnostic to avoid extra help text/duplicate rendering.

pnpm/crates/cli/src/cli_args/dedupe.rs

lib.rsReturn ExitCode and suppress already-reported dedupe errors +15/-3

Return ExitCode and suppress already-reported dedupe errors

• Changes pacquet_cli::main() to return ExitCode and prints a fallback error only when the failure wasn’t already reported. Adds detection for ERR_PNPM_DEDUPE_CHECK_ISSUES to avoid double output when the reporter emitted the dedupe-check failure.

pnpm/crates/cli/src/lib.rs

Tests (3) +197 / -18
tests.rsUnit tests for dedupe check event shape and progress emission +93/-1

Unit tests for dedupe check event shape and progress emission

• Adds tests verifying the rendered dedupe --check error matches pnpm formatting, that emit_dedupe_check_error produces the structured LogEvent::DedupeCheck payload, and that the resolution observer emits ProgressMessage::Resolved.

pnpm/crates/cli/src/cli_args/dedupe/tests.rs

dedupe.rsIntegration tests for default/ndjson/silent dedupe --check output +60/-10

Integration tests for default/ndjson/silent dedupe --check output

• Updates the dedupe --check integration test to assert default reporter output goes to stdout (stderr empty), includes progress, and renders pnpm-style ERR_PNPM_DEDUPE_CHECK_ISSUES text. Adds NDJSON assertions for progress and structured dedupeCheckIssues payload, and verifies the silent reporter produces no output while still exiting 1.

pnpm/crates/cli/tests/dedupe.rs

tests.rsTest DedupeCheck NDJSON wire shape +44/-7

Test DedupeCheck NDJSON wire shape

• Adds a serialization test ensuring DedupeCheck emits the correct pnpm-shaped JSON (including err.code and dedupeCheckIssues) and does not include the terminal-only rendered string.

pnpm/crates/reporter/src/tests.rs

Documentation (1) +5 / -0
friendly-dedupes-report.mdAdd patch changeset for dedupe --check output parity +5/-0

Add patch changeset for dedupe --check output parity

• Introduces a pacquet patch changeset noting aligned dedupe --check progress and error output with the TypeScript CLI.

.changeset/friendly-dedupes-report.md

Other (1) +1 / -0
dispatch.rsHide added-packages progress count for dedupe command +1/-0

Hide added-packages progress count for dedupe command

• Passes a dedupe-specific flag into reporter configuration so default progress output omits the added-packages materialization count during lockfile-only dedupe.

pnpm/crates/cli/src/cli_args/dispatch.rs

@coderabbitai

coderabbitai Bot commented Jul 28, 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: 2ca54679-f6bb-45b3-8cce-36c48c1adf89

📥 Commits

Reviewing files that changed from the base of the PR and between 2c2cf66 and 46e94ea.

📒 Files selected for processing (3)
  • pnpm/crates/cli/src/cli_args/dedupe/tests.rs
  • pnpm/crates/default-reporter/src/lib.rs
  • pnpm/crates/reporter/src/lib.rs
🚧 Files skipped from review as they are similar to previous changes (3)
  • pnpm/crates/default-reporter/src/lib.rs
  • pnpm/crates/reporter/src/lib.rs
  • pnpm/crates/cli/src/cli_args/dedupe/tests.rs

📝 Walkthrough

Walkthrough

pnpm dedupe --check now emits structured error and resolution-progress events, supports dedupe-specific reporter configuration, renders through the default reporter, and returns explicit success or failure exit codes. Tests cover rendered, NDJSON, silent, serialization, and observer behavior.

Changes

Dedupe reporter parity

Layer / File(s) Summary
Dedupe reporter event contract
pnpm/crates/reporter/src/lib.rs, pnpm/crates/reporter/src/tests.rs
Adds structured dedupe-check payloads, a DedupeCheck event, and wire-format serialization coverage.
Dedupe event production
pnpm/crates/cli/src/cli_args/dedupe.rs, pnpm/crates/cli/src/cli_args/dedupe/tests.rs
Emits resolution progress and structured lockfile-diff errors, with rendering, JSON conversion, and unit tests.
Reporter configuration and rendering
pnpm/crates/cli/src/cli_args/dispatch.rs, pnpm/crates/cli/src/cli_args/reporter.rs, pnpm/crates/default-reporter/src/*
Adds dedupe-specific progress configuration and renders DedupeCheck events through the default reporter.
CLI exit behavior and integration validation
pnpm/crates/cli/src/lib.rs, pnpm/crates/cli/src/bin/main.rs, pnpm/crates/cli/tests/dedupe.rs, .changeset/friendly-dedupes-report.md
Maps command results to process exit codes and validates default, NDJSON, and silent reporter output.

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

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant DedupeArgs
  participant Reporter
  participant Process
  CLI->>DedupeArgs: run dedupe --check
  DedupeArgs->>Reporter: emit resolved progress
  DedupeArgs->>Reporter: emit structured dedupe-check error
  Reporter-->>CLI: render output for selected reporter
  CLI->>Process: return failure exit code
Loading

Possibly related issues

Possibly related PRs

  • pnpm/pnpm#13155 — Introduces related default-reporter progress configuration used by this dedupe wiring.
  • pnpm/pnpm#13395 — Modifies the same dedupe-check pipeline and error rendering behavior.
  • pnpm/pnpm#13431 — Modifies the same pnpm dedupe execution path.

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-13457-2

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

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (2): Last reviewed commit: "chore: address dedupe reporter review" | 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: 3

🤖 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/cli/src/cli_args/dedupe/tests.rs`:
- Around line 20-31: Update the test check_error_matches_pnpm_reporter_format to
print the rendered report immediately before the multiline assert_eq! assertion,
so CI output includes the actual value when the reporter-format comparison
fails.

In `@pnpm/crates/default-reporter/src/lib.rs`:
- Around line 85-88: Update the documentation for set_hide_added_pkgs_progress
to state that it must be called before the reporter is first initialized because
the underlying OnceLock accepts only the first value and ignores subsequent
updates; preserve the existing function behavior.

In `@pnpm/crates/reporter/src/lib.rs`:
- Line 808: Update the rustdoc for the pnpm dedupe check failure payload to
document its non-obvious terminal-versus-wire representation invariant, or
remove the comment if that contract cannot be stated accurately; do not leave
documentation that merely repeats the type name.
🪄 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: 631b02c3-ea2d-41fd-9b5f-32fe36e23692

📥 Commits

Reviewing files that changed from the base of the PR and between 3563b13 and 2c2cf66.

📒 Files selected for processing (12)
  • .changeset/friendly-dedupes-report.md
  • pnpm/crates/cli/src/bin/main.rs
  • pnpm/crates/cli/src/cli_args/dedupe.rs
  • pnpm/crates/cli/src/cli_args/dedupe/tests.rs
  • pnpm/crates/cli/src/cli_args/dispatch.rs
  • pnpm/crates/cli/src/cli_args/reporter.rs
  • pnpm/crates/cli/src/lib.rs
  • pnpm/crates/cli/tests/dedupe.rs
  • pnpm/crates/default-reporter/src/lib.rs
  • pnpm/crates/default-reporter/src/state.rs
  • pnpm/crates/reporter/src/lib.rs
  • pnpm/crates/reporter/src/tests.rs

Comment thread pnpm/crates/default-reporter/src/lib.rs Resolved
Comment thread pnpm/crates/reporter/src/lib.rs Resolved
@github-actions

github-actions Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                                            main                                   pr
-----                                            ----                                   --
lockfile/parse_pnpm_lock                         1.19     13.5±2.15ms    27.7 MB/sec    1.00     11.4±0.15ms    33.0 MB/sec
packument/parse                                  1.00     38.1±1.46µs  1739.4 MB/sec    1.06     40.5±0.16µs  1637.5 MB/sec
tarball/download_dependency                      1.00      2.5±0.14ms  1761.2 KB/sec    1.01      2.5±0.15ms  1744.6 KB/sec
tarball_batch/cold_store_many_medium_tarballs    1.02   207.2±17.48ms 77.2 KElem/sec    1.00    203.2±8.50ms 78.7 KElem/sec

Copilot AI review requested due to automatic review settings July 28, 2026 08:49

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.

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

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.67442% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.68%. Comparing base (43e6a4a) to head (46e94ea).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pnpm/crates/cli/src/cli_args/dedupe.rs 96.82% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13462      +/-   ##
==========================================
+ Coverage   87.66%   87.68%   +0.02%     
==========================================
  Files         546      546              
  Lines       94260    94379     +119     
==========================================
+ Hits        82630    82759     +129     
+ Misses      11630    11620      -10     

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

@qodo-code-review

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

Copy link
Copy Markdown

Code Review by Qodo

Grey Divider

Sorry, something went wrong

We weren't able to complete the code review on our side. Please try again manually by commenting /agentic_review on this PR.

Grey Divider

Qodo Logo

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

1 similar comment
@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: 46e94ea0d468

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.589 ± 0.165 2.386 2.789 1.69 ± 0.15
pacquet@main 2.663 ± 0.199 2.380 2.878 1.73 ± 0.17
pnpr@HEAD 1.536 ± 0.092 1.426 1.709 1.00
pnpr@main 1.664 ± 0.128 1.468 1.869 1.08 ± 0.11
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.58881150976,
      "stddev": 0.16536290259192313,
      "median": 2.6402863094600004,
      "user": 1.8899191600000003,
      "system": 1.4968759,
      "min": 2.38639631346,
      "max": 2.78932192146,
      "times": [
        2.6580681964600004,
        2.40890067046,
        2.3975604514600004,
        2.76192516046,
        2.38639631346,
        2.4263543744600002,
        2.71463405846,
        2.7224495284600003,
        2.78932192146,
        2.62250442246
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.6631779458600002,
      "stddev": 0.19893347545472445,
      "median": 2.74892420946,
      "user": 1.99793546,
      "system": 1.4625761000000002,
      "min": 2.3802501194600003,
      "max": 2.87847625746,
      "times": [
        2.84986459446,
        2.74643470046,
        2.3802501194600003,
        2.87847625746,
        2.4762767824600003,
        2.42506343846,
        2.8354637414600004,
        2.7514137184600003,
        2.81481417646,
        2.4737219294600004
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5360756693600002,
      "stddev": 0.09163904767179029,
      "median": 1.5285133059599998,
      "user": 1.3942420599999994,
      "system": 1.4750324,
      "min": 1.42592576646,
      "max": 1.7092896284599999,
      "times": [
        1.61886841546,
        1.7092896284599999,
        1.59566644246,
        1.44251432346,
        1.50544880246,
        1.42592576646,
        1.4353940004599999,
        1.5765138674599999,
        1.55157780946,
        1.49955763746
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.66415965586,
      "stddev": 0.1276469670343267,
      "median": 1.70592320796,
      "user": 1.4259308599999998,
      "system": 1.4835335,
      "min": 1.4681583944599998,
      "max": 1.86891515146,
      "times": [
        1.70179478146,
        1.71779997846,
        1.72073178046,
        1.78757403246,
        1.53157601546,
        1.7100516344599999,
        1.51648002046,
        1.61851476946,
        1.4681583944599998,
        1.86891515146
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 311.7 ± 10.9 293.6 326.9 1.01 ± 0.05
pacquet@main 307.4 ± 11.8 289.2 328.1 1.00
pnpr@HEAD 311.0 ± 13.8 291.5 334.5 1.01 ± 0.06
pnpr@main 315.5 ± 11.8 295.4 331.0 1.03 ± 0.06
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.31172678154000005,
      "stddev": 0.010865333191824984,
      "median": 0.31471454304,
      "user": 0.25900534,
      "system": 0.62568172,
      "min": 0.29363825504,
      "max": 0.32688233104000003,
      "times": [
        0.31757119404,
        0.32087319304,
        0.29363825504,
        0.31716841504000004,
        0.32688233104000003,
        0.31390228304,
        0.31552680304,
        0.31368951304000003,
        0.29659711804000005,
        0.30141871004000004
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.30739634464000004,
      "stddev": 0.011795485218774585,
      "median": 0.30996366404000003,
      "user": 0.26348344,
      "system": 0.6166925199999999,
      "min": 0.28922040404000005,
      "max": 0.32806982804,
      "times": [
        0.30116329704,
        0.29075311104,
        0.30992099404,
        0.32806982804,
        0.31451437604000004,
        0.31654097304,
        0.28922040404000005,
        0.31000633404000005,
        0.30297553204000005,
        0.31079859704
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.31096269404,
      "stddev": 0.013787014244142285,
      "median": 0.31279481204000004,
      "user": 0.2515212399999999,
      "system": 0.58845282,
      "min": 0.29150385404,
      "max": 0.33451051004000004,
      "times": [
        0.29150385404,
        0.29826727404000003,
        0.33451051004000004,
        0.32643746304000004,
        0.31578455804000005,
        0.31234889704,
        0.31862776304,
        0.30283557904,
        0.31324072704000006,
        0.29607031504000003
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.3154773169400001,
      "stddev": 0.011829440429823491,
      "median": 0.31594110004000003,
      "user": 0.27144203999999994,
      "system": 0.5837241199999998,
      "min": 0.29537025704000003,
      "max": 0.33095779804000003,
      "times": [
        0.33095779804000003,
        0.31916749004,
        0.29816400904,
        0.29537025704000003,
        0.31663060104,
        0.32247846704000005,
        0.33072269504,
        0.31525159904000005,
        0.31490858304,
        0.31112167004
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.990 ± 0.053 2.918 3.081 1.90 ± 0.17
pacquet@main 2.885 ± 0.055 2.817 2.978 1.83 ± 0.16
pnpr@HEAD 1.625 ± 0.141 1.440 1.845 1.03 ± 0.13
pnpr@main 1.573 ± 0.134 1.475 1.861 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.9900217806,
      "stddev": 0.05349776775883602,
      "median": 2.9824873092999997,
      "user": 2.31927884,
      "system": 1.6495267200000001,
      "min": 2.9175557853,
      "max": 3.0808834393,
      "times": [
        3.0481753593,
        3.0808834393,
        2.9567913613,
        2.9482053483,
        3.0144346523,
        2.9349818893,
        3.0342153523,
        2.9952199283,
        2.9175557853,
        2.9697546903
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.8848492380000006,
      "stddev": 0.05488286343917539,
      "median": 2.8792120253,
      "user": 2.07891224,
      "system": 1.48900822,
      "min": 2.8173009183,
      "max": 2.9775269403,
      "times": [
        2.9775269403,
        2.9633492543,
        2.8298809643,
        2.9004488373000004,
        2.8368704503,
        2.8593664033,
        2.8562269093,
        2.8173009183,
        2.9084640553,
        2.8990576473
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.6246870309,
      "stddev": 0.14106248881195013,
      "median": 1.6485844383000001,
      "user": 1.1956174400000001,
      "system": 1.33843432,
      "min": 1.4395764963,
      "max": 1.8445529293,
      "times": [
        1.6725563923000002,
        1.6840029343,
        1.4395764963,
        1.8026933313,
        1.4602197813000002,
        1.4660546123,
        1.6246124843,
        1.5681384883,
        1.8445529293,
        1.6844628593
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5728538266999998,
      "stddev": 0.13421558459295405,
      "median": 1.5175926993000002,
      "user": 1.24292814,
      "system": 1.32744362,
      "min": 1.4745453653,
      "max": 1.8612127503,
      "times": [
        1.4986886913,
        1.8612127503,
        1.4745453653,
        1.5306141373000002,
        1.4845529453,
        1.7743514653,
        1.5820302663,
        1.5097019863,
        1.5254834123,
        1.4873572473
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 659.4 ± 15.9 637.1 690.9 1.98 ± 0.10
pacquet@main 677.4 ± 38.4 624.9 742.2 2.04 ± 0.15
pnpr@HEAD 332.6 ± 14.5 305.6 348.6 1.00
pnpr@main 336.9 ± 15.2 320.1 362.0 1.01 ± 0.06
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.65936521474,
      "stddev": 0.015921538362045976,
      "median": 0.65562763654,
      "user": 0.8033749199999999,
      "system": 0.7184752999999999,
      "min": 0.63714117054,
      "max": 0.69090499054,
      "times": [
        0.64755947454,
        0.65745972254,
        0.65379555054,
        0.64517889954,
        0.69090499054,
        0.66918415654,
        0.65241734454,
        0.66518871154,
        0.63714117054,
        0.67482212654
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.67737161874,
      "stddev": 0.03839313467034798,
      "median": 0.67500381354,
      "user": 0.8338220199999998,
      "system": 0.7404799000000002,
      "min": 0.62494423554,
      "max": 0.74224718954,
      "times": [
        0.69974044254,
        0.62494423554,
        0.65022206954,
        0.69230671154,
        0.74224718954,
        0.72677489554,
        0.6821563215399999,
        0.63977098354,
        0.66785130554,
        0.64770203254
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.33258139044,
      "stddev": 0.01450152417454618,
      "median": 0.33578507354,
      "user": 0.23963652,
      "system": 0.5597115,
      "min": 0.30559228754,
      "max": 0.34855560354000004,
      "times": [
        0.34835849354000004,
        0.32401086154000003,
        0.31497703454000003,
        0.30559228754,
        0.33872180054,
        0.33994030554000004,
        0.34522539054,
        0.32758378054000004,
        0.34855560354000004,
        0.33284834654
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.3368958778400001,
      "stddev": 0.015163754902722112,
      "median": 0.33809115804,
      "user": 0.22269921999999998,
      "system": 0.5727423,
      "min": 0.32007667054000005,
      "max": 0.36203758954000004,
      "times": [
        0.35272923554,
        0.34644254454,
        0.36203758954000004,
        0.34685872854000005,
        0.33715617154000005,
        0.33902614454,
        0.32213904554,
        0.32201585354,
        0.32007667054000005,
        0.32047679454000005
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.094 ± 0.053 1.994 2.168 6.51 ± 0.26
pacquet@main 1.971 ± 0.045 1.919 2.045 6.13 ± 0.23
pnpr@HEAD 0.333 ± 0.015 0.319 0.367 1.04 ± 0.06
pnpr@main 0.322 ± 0.010 0.303 0.338 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.0941690571399993,
      "stddev": 0.053218509488016,
      "median": 2.10755582524,
      "user": 1.2837151400000002,
      "system": 0.8937500400000001,
      "min": 1.9939426027399998,
      "max": 2.1677931787399998,
      "times": [
        2.08561247274,
        2.06081039474,
        2.1328335097399997,
        2.1677931787399998,
        2.09414455374,
        2.13473374874,
        2.12096709674,
        2.12166979174,
        2.02918322174,
        1.9939426027399998
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.97083100154,
      "stddev": 0.04456522789130468,
      "median": 1.94602308074,
      "user": 1.0598603399999997,
      "system": 0.80730974,
      "min": 1.91915666574,
      "max": 2.04521830674,
      "times": [
        2.04521830674,
        2.01289769674,
        2.02433498074,
        1.99716155574,
        1.93094902674,
        1.91915666574,
        1.94422504474,
        1.94478051974,
        1.94726564174,
        1.9423205767399998
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.33344597194,
      "stddev": 0.014960415246278416,
      "median": 0.33032989424000003,
      "user": 0.22848613999999995,
      "system": 0.58725614,
      "min": 0.31936665374,
      "max": 0.36714498974000004,
      "times": [
        0.34217155974,
        0.32004117474000005,
        0.33374194174000005,
        0.36714498974000004,
        0.31943785874,
        0.34585721074000003,
        0.33038973674,
        0.31936665374,
        0.32603854174,
        0.33027005174
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.32151036404,
      "stddev": 0.00986705323831751,
      "median": 0.32114307474000003,
      "user": 0.22120843999999998,
      "system": 0.55398754,
      "min": 0.30285967174,
      "max": 0.33752364474,
      "times": [
        0.32147664874000004,
        0.32108809574,
        0.32085810374,
        0.33752364474,
        0.31735648774,
        0.32367913674000004,
        0.30285967174,
        0.31378398874,
        0.32119805374000004,
        0.33527980874
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 451.1 ± 37.8 417.3 548.1 4.56 ± 0.45
pacquet@main 533.2 ± 27.3 492.0 574.4 5.40 ± 0.39
pnpr@HEAD 98.8 ± 5.0 89.9 110.2 1.00
pnpr@main 106.8 ± 10.4 95.3 138.2 1.08 ± 0.12
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.45109385902000004,
      "stddev": 0.03776201503723699,
      "median": 0.44516285002,
      "user": 0.43897558,
      "system": 0.0752997,
      "min": 0.41733413152000004,
      "max": 0.5481303915200001,
      "times": [
        0.45948448752000004,
        0.43920136152,
        0.44407465052,
        0.44625104952,
        0.41733413152000004,
        0.41765136952000004,
        0.42310565252000004,
        0.45821259052,
        0.5481303915200001,
        0.45749290552000005
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.53324987812,
      "stddev": 0.027275219557096157,
      "median": 0.53151065602,
      "user": 0.52594378,
      "system": 0.080327,
      "min": 0.49200641552,
      "max": 0.57441795652,
      "times": [
        0.5375308255200001,
        0.5254904865200001,
        0.54007678152,
        0.52145679852,
        0.49738554752,
        0.5252781365200001,
        0.5468778515200001,
        0.57441795652,
        0.5719779815200001,
        0.49200641552
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.09883860882000002,
      "stddev": 0.004966257267564379,
      "median": 0.09843330702,
      "user": 0.025353413333333335,
      "system": 0.015218333333333334,
      "min": 0.08987592852000001,
      "max": 0.11015740052,
      "times": [
        0.09422965952000001,
        0.10240569952,
        0.10415425352,
        0.11015740052,
        0.10281025152,
        0.09844157252,
        0.10091926952000001,
        0.10585445652,
        0.09616883152,
        0.10119736252,
        0.10014114452,
        0.10547099352,
        0.10564163452,
        0.09842504152,
        0.10662593852,
        0.09755738752000001,
        0.09564659752,
        0.09456678452,
        0.09895055152,
        0.09055450552000001,
        0.09449997852,
        0.09490038252,
        0.09816120452,
        0.09983704152,
        0.09853329452000001,
        0.09456834652,
        0.09226675152000001,
        0.09688631352,
        0.09570968652,
        0.08987592852000001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.10683633814068966,
      "stddev": 0.01036562489884631,
      "median": 0.10438781352000001,
      "user": 0.03148869724137931,
      "system": 0.014756027586206899,
      "min": 0.09532528252,
      "max": 0.13820697452,
      "times": [
        0.09813775052000001,
        0.09553995652000001,
        0.09749201352,
        0.09629419752,
        0.09630299452,
        0.10584396652,
        0.10840778452000001,
        0.10040569252,
        0.10538779552000001,
        0.10712219252,
        0.10096398352000001,
        0.09991041952,
        0.11450184352000001,
        0.10165746052,
        0.09636869752,
        0.09744329252,
        0.10408908952000001,
        0.09532528252,
        0.10920737152,
        0.12175873352000001,
        0.11990166552,
        0.13820697452,
        0.10438781352000001,
        0.10998229152000001,
        0.10404350452000001,
        0.11441001152000001,
        0.11911383152,
        0.12425748952,
        0.11178970552
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.834 ± 0.098 4.702 5.001 1.35 ± 0.04
pacquet@main 4.943 ± 0.184 4.726 5.197 1.38 ± 0.06
pnpr@HEAD 3.628 ± 0.173 3.468 3.973 1.01 ± 0.05
pnpr@main 3.582 ± 0.083 3.466 3.731 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.834241967820001,
      "stddev": 0.09752548800484581,
      "median": 4.8359306140200005,
      "user": 2.9400950000000003,
      "system": 2.113148099999999,
      "min": 4.70231906252,
      "max": 5.00061554752,
      "times": [
        4.824571848520001,
        5.00061554752,
        4.88217033252,
        4.74296801952,
        4.70231906252,
        4.8525229775200005,
        4.84728937952,
        4.773072845520001,
        4.74804115452,
        4.96884851052
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.94348517032,
      "stddev": 0.1840424385361702,
      "median": 4.91528221652,
      "user": 2.9565457000000004,
      "system": 2.1468881,
      "min": 4.72562585352,
      "max": 5.19704790852,
      "times": [
        5.12390124852,
        4.79424907252,
        5.03813704252,
        4.85390744552,
        5.19704790852,
        4.72562585352,
        4.79980831352,
        4.74050124352,
        4.97665698752,
        5.18501658752
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.62818718782,
      "stddev": 0.17309629646636265,
      "median": 3.5899772045200002,
      "user": 1.3241182999999999,
      "system": 1.3482692999999997,
      "min": 3.46782283252,
      "max": 3.97263749352,
      "times": [
        3.84005801852,
        3.48477239852,
        3.46782283252,
        3.49858881352,
        3.75519927952,
        3.97263749352,
        3.5950989465200003,
        3.6080659715200003,
        3.58485546252,
        3.4747726615200003
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.58248267352,
      "stddev": 0.08289941237431692,
      "median": 3.55717314502,
      "user": 1.2866597,
      "system": 1.3532162,
      "min": 3.46612382152,
      "max": 3.73132935752,
      "times": [
        3.46612382152,
        3.73132935752,
        3.51034072652,
        3.5530462165200003,
        3.6339129955200002,
        3.56130007352,
        3.54466358652,
        3.5914105595200003,
        3.5351480735200003,
        3.69755132452
      ]
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13462
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,917.56 ms
(+3.68%)Baseline: 2,813.89 ms
3,376.67 ms
(86.40%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,993.94 ms
(+0.58%)Baseline: 1,982.35 ms
2,378.82 ms
(83.82%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
637.14 ms
(-1.84%)Baseline: 649.05 ms
778.87 ms
(81.80%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
417.33 ms
(+4.06%)Baseline: 401.06 ms
481.28 ms
(86.71%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,386.40 ms
(-1.42%)Baseline: 2,420.78 ms
2,904.93 ms
(82.15%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,702.32 ms
(+4.22%)Baseline: 4,511.73 ms
5,414.07 ms
(86.85%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
293.64 ms
(+5.25%)Baseline: 278.99 ms
334.79 ms
(87.71%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13462
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,439.58 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
319.37 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
305.59 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
89.88 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,425.93 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,467.82 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
291.50 ms
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit 7fd2197 into main Jul 28, 2026
40 checks passed
@zkochan
zkochan deleted the fix-13457-2 branch July 28, 2026 10:01
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.

3 participants