Skip to content

feat(pacquet): implement search command natively in Rust - #12852

Merged
zkochan merged 4 commits into
pnpm:mainfrom
kairosci:paquet-search
Jul 9, 2026
Merged

zkochan merged 4 commits into
pnpm:mainfrom
kairosci:paquet-search

Conversation

@kairosci

@kairosci kairosci commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implements the search command (and its aliases s, se, find) natively in Rust inside pacquet. This is part of the Rustification effort
Related to #11633.

Squash Commit Body

Implement the search / s / se / find command in pacquet. The command resolves the registry URL from config or CLI overrides, executes a GET request against the registry's search endpoint with the search query and limit, and pretty-prints the formatted output. Includes support for `--json` format matching the TypeScript output. Also includes a comprehensive integration test suite.
Related to pnpm/pnpm#11633

Checklist

  • The change is implemented in both the TypeScript CLI and the Rust pacquet/ port, or the description notes what still needs porting. (The command is already present in the TS codebase; this PR implements the Rust equivalent).
  • Added or updated tests.

Written by an agent (Antigravity, gemini-3.5-flash).

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Added pacquet search CLI command (aliases: s, se, find).
    • Supports --json (JSON output), --search-limit, and --registry to control results and the registry source.
  • Bug Fixes

    • Improved validation and messaging for missing queries.
    • Added clear handling for empty results, HTTP failures (with status/body details), and network failures.
    • Enhanced human output with package metadata and an npmx.dev link.
  • Tests

    • Added integration tests covering success, empty results, JSON output, and error cases.

@kairosci
kairosci requested a review from zkochan as a code owner July 8, 2026 10:36
Copilot AI review requested due to automatic review settings July 8, 2026 10:36
@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 →

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 Jul 8, 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: 37cdb8bb-a8e6-4f70-ac9e-852b944680d8

📥 Commits

Reviewing files that changed from the base of the PR and between 2d34071 and 0f396cf.

📒 Files selected for processing (1)
  • pacquet/crates/cli/src/cli_args/search.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • pacquet/crates/cli/src/cli_args/search.rs

📝 Walkthrough

Walkthrough

This PR adds a new pacquet search CLI subcommand. It defines SearchArgs and SearchError, implements registry search request/response handling and output formatting, wires the command into CLI dispatch, and adds integration tests for success and failure cases.

Changes

pacquet search command

Layer / File(s) Summary
SearchArgs contract and models
pacquet/crates/cli/src/cli_args/search.rs
Defines SearchError, SearchArgs, and the registry response data models used by the search command.
Search execution and output formatting
pacquet/crates/cli/src/cli_args/search.rs
Implements SearchArgs::run to validate input, build the registry search request, handle responses and errors, deserialize search results, and format JSON or human-readable output.
CLI wiring and dispatch
pacquet/crates/cli/src/cli_args.rs, pacquet/crates/cli/src/cli_args/cli_command.rs, pacquet/crates/cli/src/cli_args/dispatch.rs, pacquet/crates/cli/src/cli_args/dispatch_query.rs, pacquet/crates/cli/src/cli_args/switch_cli_version.rs
Exports the search module, adds Search(SearchArgs) with aliases, routes it to dispatch_query::search, and maps the command name to search.
Integration tests
pacquet/crates/cli/tests/search.rs
Adds tests for missing query, successful text output, JSON output, empty results, registry HTTP failures, and unreachable registry failures.

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

Sequence Diagram(s)

sequenceDiagram
  participant SearchArgs
  participant Config
  participant RegistrySearchResponse
  participant Stdout
  SearchArgs->>Config: read registry and retry settings
  SearchArgs->>RegistrySearchResponse: deserialize search response
  SearchArgs-->>Stdout: write formatted output
Loading

Possibly related PRs

  • pnpm/pnpm#12497: Both PRs modify the shared CLI wiring by adding new publicly exported submodules and new CliCommand enum variants.

Suggested labels: product: pacquet

Suggested reviewers: zkochan, qodo-code-review

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

Copilot AI review requested due to automatic review settings July 8, 2026 10:44

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

🧹 Nitpick comments (3)
pacquet/crates/cli/tests/search.rs (2)

241-243: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Simplify redundant error-body assertions.

Lines 242–243 check "Internal Server" and "Error Details" separately, but both are substrings of the error body "Internal Server Error Details" which is already partially covered by line 241's broader assertion. A single check for the full error body would be clearer and less fragile:

♻️ Proposed refactor
     assert!(stderr.contains("ERR_PNPM_SEARCH_FAILED"));
     assert!(stderr.contains("Search failed with status 500: Internal Server Error"));
-    assert!(stderr.contains("Internal Server"));
-    assert!(stderr.contains("Error Details"));
+    assert!(stderr.contains("Internal Server Error Details"), "STDERR:\n{stderr}");
🤖 Prompt for 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.

In `@pacquet/crates/cli/tests/search.rs` around lines 241 - 243, The stderr
assertions in the search test are redundant because the broader status message
already covers the same error body fragments. Update the test in search.rs
around the stderr checks to use a single assertion for the full error body
instead of separate contains checks for Internal Server and Error Details,
keeping the verification in the same test case that exercises the search failure
path.

63-64: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Log STDOUT/STDERR before non-assert_eq! assertions to aid debugging.

Many assert! calls throughout the test file (e.g., lines 63–64, 112–116, 239–243, 257–259) check stdout.contains(...) or stderr.contains(...) without emitting the actual output on failure. When an assertion fails, the developer sees only the panic message with no visibility into what the command actually produced. The pacquet code style guide requires: "log before non-assert_eq! assertions; if comparing long/multi-line strings, emit STDOUT/STDERR on failure."

Consider adding the actual output as a assertion message, similar to the pattern already used for the success checks (e.g., lines 106–109):

♻️ Proposed refactor for representative cases
     let stderr = String::from_utf8_lossy(&output.stderr);
-    assert!(stderr.contains("ERR_PNPM_MISSING_SEARCH_QUERY"));
-    assert!(stderr.contains("Search query is required"));
+    assert!(
+        stderr.contains("ERR_PNPM_MISSING_SEARCH_QUERY"),
+        "STDERR:\n{stderr}",
+    );
+    assert!(
+        stderr.contains("Search query is required"),
+        "STDERR:\n{stderr}",
+    );
     let stdout = String::from_utf8_lossy(&output.stdout);
-    assert!(stdout.contains("create-touch-file-one-bin"));
-    assert!(stdout.contains("A test description"));
-    assert!(stdout.contains("Version 1.0.0 published 2026-07-08 by John Doe"));
-    assert!(stdout.contains("Keywords  test, touch"));
-    assert!(stdout.contains("https://npmx.dev/package/create-touch-file-one-bin"));
+    assert!(stdout.contains("create-touch-file-one-bin"), "STDOUT:\n{stdout}");
+    assert!(stdout.contains("A test description"), "STDOUT:\n{stdout}");
+    assert!(
+        stdout.contains("Version 1.0.0 published 2026-07-08 by John Doe"),
+        "STDOUT:\n{stdout}",
+    );
+    assert!(stdout.contains("Keywords  test, touch"), "STDOUT:\n{stdout}");
+    assert!(
+        stdout.contains("https://npmx.dev/package/create-touch-file-one-bin"),
+        "STDOUT:\n{stdout}",
+    );

Also applies to: 112-116, 239-243, 257-259

🤖 Prompt for 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.

In `@pacquet/crates/cli/tests/search.rs` around lines 63 - 64, Several `assert!`
checks in `search.rs` verify `stdout.contains(...)` or `stderr.contains(...)`
without printing the captured output, which makes failures hard to debug. Update
the affected assertions in the test cases around
`stderr.contains`/`stdout.contains` to include the actual `STDOUT`/`STDERR`
content in the assertion message, following the existing success-check pattern
used nearby in the same test file. Use the test helpers and variables already in
scope in each case so the failure output clearly shows what the command
produced.

Source: Path instructions

pacquet/crates/cli/src/cli_args/search.rs (1)

110-110: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Non-network errors are misclassified as NetworkError.

URL parsing errors (lines 110, 113), JSON serialization errors (line 168), and per-package deserialization errors (line 178) are all mapped to SearchError::NetworkError. This is misleading — a user seeing "Network request failed: ..." for a JSON parse error would debug the wrong layer. Consider a dedicated ParseError or ResponseError variant.

Also applies to: 113-113, 168-168, 178-178

🤖 Prompt for 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.

In `@pacquet/crates/cli/src/cli_args/search.rs` at line 110, The error handling in
Search-related code is classifying multiple non-network failures as
SearchError::NetworkError, which obscures the real source of the problem. Update
the affected map_err calls in the search flow (including the URL parsing, JSON
serialization, and per-package deserialization paths in the relevant search
helpers) to use a more accurate error variant such as a dedicated ParseError or
ResponseError, and keep NetworkError only for actual transport failures. Use the
existing SearchError type and the surrounding search methods to locate and
refactor these mappings consistently.

Source: Path instructions

🤖 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 `@pacquet/crates/cli/src/cli_args/search.rs`:
- Around line 211-230: Sanitize every registry-derived field before printing it
in the human-readable search output: in the code that builds the `version_line`
and appends `Maintainers:` / `Keywords:`, make sure `pkg.version`, `author`,
each maintainer username, and each keyword are passed through the same
terminal-sanitizing helper used for `pkg.name` and `pkg.description` (for
example in the search rendering path around `version_line`, `maintainers`, and
`keywords`). Update the formatting logic so `format!` only receives sanitized
strings, preserving the existing display structure while preventing
ANSI/control-character injection.
- Around line 145-147: The SearchFailed.detail construction in search.rs is
formatting attacker-controlled error_body directly into the diagnostic, so
update the error handling around the response.text() path to sanitize the
registry message before it is appended. Use the existing sanitize() helper on
error_body before building detail in the SearchFailed flow, and keep the rest of
the message assembly in SearchFailed.detail unchanged.

---

Nitpick comments:
In `@pacquet/crates/cli/src/cli_args/search.rs`:
- Line 110: The error handling in Search-related code is classifying multiple
non-network failures as SearchError::NetworkError, which obscures the real
source of the problem. Update the affected map_err calls in the search flow
(including the URL parsing, JSON serialization, and per-package deserialization
paths in the relevant search helpers) to use a more accurate error variant such
as a dedicated ParseError or ResponseError, and keep NetworkError only for
actual transport failures. Use the existing SearchError type and the surrounding
search methods to locate and refactor these mappings consistently.

In `@pacquet/crates/cli/tests/search.rs`:
- Around line 241-243: The stderr assertions in the search test are redundant
because the broader status message already covers the same error body fragments.
Update the test in search.rs around the stderr checks to use a single assertion
for the full error body instead of separate contains checks for Internal Server
and Error Details, keeping the verification in the same test case that exercises
the search failure path.
- Around line 63-64: Several `assert!` checks in `search.rs` verify
`stdout.contains(...)` or `stderr.contains(...)` without printing the captured
output, which makes failures hard to debug. Update the affected assertions in
the test cases around `stderr.contains`/`stdout.contains` to include the actual
`STDOUT`/`STDERR` content in the assertion message, following the existing
success-check pattern used nearby in the same test file. Use the test helpers
and variables already in scope in each case so the failure output clearly shows
what the command produced.
🪄 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: 11577290-69d7-47c6-833a-e38f6cf31b27

📥 Commits

Reviewing files that changed from the base of the PR and between eb12194 and 4fdeddf.

📒 Files selected for processing (7)
  • pacquet/crates/cli/src/cli_args.rs
  • pacquet/crates/cli/src/cli_args/cli_command.rs
  • pacquet/crates/cli/src/cli_args/dispatch.rs
  • pacquet/crates/cli/src/cli_args/dispatch_query.rs
  • pacquet/crates/cli/src/cli_args/search.rs
  • pacquet/crates/cli/src/cli_args/switch_cli_version.rs
  • pacquet/crates/cli/tests/search.rs

Copilot AI review requested due to automatic review settings July 8, 2026 10:52

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.

@codecov-commenter

codecov-commenter commented Jul 8, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.80597% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.62%. Comparing base (692c449) to head (0f396cf).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pacquet/crates/cli/src/cli_args/search.rs 87.70% 15 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main   #12852    +/-   ##
========================================
  Coverage   85.61%   85.62%            
========================================
  Files         449      450     +1     
  Lines       69986    70120   +134     
========================================
+ Hits        59922    60040   +118     
- Misses      10064    10080    +16     

☔ 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 8, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 0f396cff1fed

Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD.

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 3.766 ± 0.202 3.547 4.138 1.77 ± 0.15
pacquet@main 3.670 ± 0.111 3.540 3.948 1.73 ± 0.13
pnpr@HEAD 2.132 ± 0.129 1.989 2.378 1.00 ± 0.09
pnpr@main 2.122 ± 0.142 1.941 2.329 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 3.76562955618,
      "stddev": 0.20222463989515532,
      "median": 3.69828240108,
      "user": 3.54519058,
      "system": 3.3122713999999993,
      "min": 3.54715669958,
      "max": 4.13848931758,
      "times": [
        3.83453968958,
        4.13848931758,
        4.012265509580001,
        3.56091360258,
        3.91918236958,
        3.61167409858,
        3.63550947258,
        3.68202404558,
        3.54715669958,
        3.71454075658
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 3.6703990471799997,
      "stddev": 0.11099325521082706,
      "median": 3.6545964280799996,
      "user": 3.48359058,
      "system": 3.3036680999999994,
      "min": 3.54048814558,
      "max": 3.94782953158,
      "times": [
        3.60382329158,
        3.70261367058,
        3.71676801558,
        3.65475843658,
        3.65443441958,
        3.54048814558,
        3.67323532758,
        3.94782953158,
        3.61833116058,
        3.59170847258
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 2.13248403778,
      "stddev": 0.12895221284003808,
      "median": 2.09960520808,
      "user": 2.6793846800000005,
      "system": 2.9025051,
      "min": 1.98942324858,
      "max": 2.37773093858,
      "times": [
        2.37773093858,
        2.02148337158,
        2.16468282658,
        2.03692531858,
        2.13050674358,
        2.26936147158,
        1.98942324858,
        2.24198023158,
        2.06870367258,
        2.02404255458
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 2.12189719618,
      "stddev": 0.14161578785180856,
      "median": 2.1159242370799998,
      "user": 2.59833898,
      "system": 2.921309,
      "min": 1.94074975458,
      "max": 2.32935266458,
      "times": [
        2.12069434158,
        2.24016958258,
        2.16300231158,
        2.03031402458,
        2.32935266458,
        2.32221035658,
        1.96581499958,
        1.94074975458,
        2.11115413258,
        1.9955097935800001
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 624.4 ± 17.0 603.9 646.1 1.00
pacquet@main 628.0 ± 12.1 612.8 647.2 1.01 ± 0.03
pnpr@HEAD 673.1 ± 18.1 651.9 707.1 1.08 ± 0.04
pnpr@main 684.2 ± 15.0 662.7 716.1 1.10 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.6243759583399999,
      "stddev": 0.017044677001549796,
      "median": 0.62558161794,
      "user": 0.36437652,
      "system": 1.3029943000000002,
      "min": 0.60394303044,
      "max": 0.64608840544,
      "times": [
        0.60930835244,
        0.63741672244,
        0.60737094544,
        0.63752034344,
        0.60674948044,
        0.63453033344,
        0.64608840544,
        0.61663290244,
        0.64419906744,
        0.60394303044
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.6279856804399999,
      "stddev": 0.012118319972775618,
      "median": 0.62368730194,
      "user": 0.36472292000000006,
      "system": 1.309422,
      "min": 0.61277012044,
      "max": 0.64719603644,
      "times": [
        0.61277012044,
        0.63328436344,
        0.62099275444,
        0.62380951244,
        0.63580840244,
        0.64719603644,
        0.61828467044,
        0.62356509144,
        0.64653766444,
        0.61760818844
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.67311256414,
      "stddev": 0.018125535526952907,
      "median": 0.67415800394,
      "user": 0.37445782,
      "system": 1.3363438,
      "min": 0.65194847844,
      "max": 0.70712673644,
      "times": [
        0.70712673644,
        0.68944854044,
        0.65194847844,
        0.68434290444,
        0.65726091144,
        0.6744681154400001,
        0.68160411744,
        0.6527527214400001,
        0.67384789244,
        0.65832522344
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.68423832694,
      "stddev": 0.015000947392357227,
      "median": 0.68361339044,
      "user": 0.37661112,
      "system": 1.3387782,
      "min": 0.6627396064400001,
      "max": 0.7161352144400001,
      "times": [
        0.7161352144400001,
        0.6627396064400001,
        0.67106733644,
        0.69196740044,
        0.67573772544,
        0.68846134744,
        0.69318403344,
        0.6787654334400001,
        0.67496029244,
        0.68936487944
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.164 ± 0.030 4.112 4.213 1.90 ± 0.12
pacquet@main 4.145 ± 0.042 4.107 4.254 1.89 ± 0.12
pnpr@HEAD 2.192 ± 0.139 2.041 2.469 1.00
pnpr@main 2.213 ± 0.143 2.021 2.378 1.01 ± 0.09
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.163995956880001,
      "stddev": 0.03048817970792612,
      "median": 4.16074398628,
      "user": 3.66903834,
      "system": 3.29545538,
      "min": 4.11198065678,
      "max": 4.2125263547800005,
      "times": [
        4.20092127178,
        4.16799725378,
        4.17018038378,
        4.1461857137800004,
        4.11198065678,
        4.144969055780001,
        4.1534907187800005,
        4.2125263547800005,
        4.18920725478,
        4.14250090478
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.14544545528,
      "stddev": 0.04191709897311186,
      "median": 4.14246276678,
      "user": 3.6095687400000003,
      "system": 3.2796150799999992,
      "min": 4.10650413078,
      "max": 4.25406969778,
      "times": [
        4.25406969778,
        4.10650413078,
        4.122055784780001,
        4.12138239378,
        4.1498564167800005,
        4.14932102678,
        4.11163197578,
        4.13574636278,
        4.14917917078,
        4.15470759278
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 2.19249901528,
      "stddev": 0.13875695201048424,
      "median": 2.18584927178,
      "user": 2.49146394,
      "system": 2.8361947799999996,
      "min": 2.04140841578,
      "max": 2.46943780278,
      "times": [
        2.46943780278,
        2.17402982278,
        2.05741959178,
        2.04140841578,
        2.19766872078,
        2.32389365078,
        2.04629015478,
        2.2352513847799997,
        2.10418073078,
        2.27540987778
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 2.2131235150800004,
      "stddev": 0.14284571875372393,
      "median": 2.2622129097799997,
      "user": 2.4394878400000004,
      "system": 2.82087168,
      "min": 2.02100723378,
      "max": 2.37809214178,
      "times": [
        2.37588518078,
        2.02100723378,
        2.1210913317799998,
        2.32067420578,
        2.02368957778,
        2.29664441078,
        2.06460176378,
        2.37809214178,
        2.30176789578,
        2.22778140878
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.300 ± 0.012 1.285 1.324 2.01 ± 0.05
pacquet@main 1.303 ± 0.026 1.282 1.370 2.01 ± 0.06
pnpr@HEAD 0.653 ± 0.024 0.630 0.712 1.01 ± 0.04
pnpr@main 0.647 ± 0.015 0.630 0.682 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.3001875232000002,
      "stddev": 0.012188246530548763,
      "median": 1.299762292,
      "user": 1.2603460000000002,
      "system": 1.6531713799999999,
      "min": 1.285455307,
      "max": 1.323970147,
      "times": [
        1.285455307,
        1.290405241,
        1.296180257,
        1.309935257,
        1.323970147,
        1.2867246120000002,
        1.308929491,
        1.3033443270000002,
        1.304547637,
        1.2923829560000002
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.3025897992000002,
      "stddev": 0.02590396081607902,
      "median": 1.2955798625000001,
      "user": 1.2433078,
      "system": 1.6626253800000002,
      "min": 1.282041575,
      "max": 1.3703612230000002,
      "times": [
        1.297998371,
        1.2927066980000002,
        1.3703612230000002,
        1.2866334460000002,
        1.282041575,
        1.3106180490000001,
        1.29913256,
        1.2931613540000002,
        1.3110108530000002,
        1.282233863
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.6529448622,
      "stddev": 0.02426467606077827,
      "median": 0.645183786,
      "user": 0.33535109999999996,
      "system": 1.2743520799999997,
      "min": 0.630437982,
      "max": 0.712412142,
      "times": [
        0.646209108,
        0.630437982,
        0.64434786,
        0.641743211,
        0.676186439,
        0.634863752,
        0.712412142,
        0.646019712,
        0.6431951020000001,
        0.654033314
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.6467211812,
      "stddev": 0.015234019879215615,
      "median": 0.641991941,
      "user": 0.32098319999999997,
      "system": 1.27024328,
      "min": 0.630166183,
      "max": 0.681694551,
      "times": [
        0.639381895,
        0.630166183,
        0.644601987,
        0.639248463,
        0.634359417,
        0.654281086,
        0.6553785400000001,
        0.653486178,
        0.634613512,
        0.681694551
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.946 ± 0.021 2.929 2.993 4.64 ± 0.06
pacquet@main 2.962 ± 0.081 2.895 3.183 4.66 ± 0.14
pnpr@HEAD 0.644 ± 0.012 0.630 0.674 1.01 ± 0.02
pnpr@main 0.635 ± 0.006 0.627 0.646 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.94568673922,
      "stddev": 0.02065234922434172,
      "median": 2.9383174827200005,
      "user": 1.6720535600000002,
      "system": 1.9237307000000001,
      "min": 2.92872014222,
      "max": 2.99295722522,
      "times": [
        2.9351335882200003,
        2.94367726322,
        2.96936286022,
        2.9305763702200003,
        2.92872014222,
        2.92906095322,
        2.9391594372200003,
        2.95074402422,
        2.9374755282200002,
        2.99295722522
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.96178240352,
      "stddev": 0.08146754011864704,
      "median": 2.94535559422,
      "user": 1.6722874600000004,
      "system": 1.9165610999999998,
      "min": 2.89525930022,
      "max": 3.1831465422200003,
      "times": [
        2.92213653722,
        2.94328500022,
        2.89525930022,
        2.9237918142200003,
        2.94742618822,
        2.9812846522200003,
        2.94997438022,
        3.1831465422200003,
        2.91492974322,
        2.9565898772200003
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.6442739938200001,
      "stddev": 0.01227371114725909,
      "median": 0.6437591077200001,
      "user": 0.33684936000000004,
      "system": 1.268087,
      "min": 0.6300846092200001,
      "max": 0.6743100002200001,
      "times": [
        0.6300846092200001,
        0.6345410792200001,
        0.6459311622200001,
        0.64700972322,
        0.6415870532200001,
        0.6464462282200001,
        0.6380995392200001,
        0.6490729882200001,
        0.6743100002200001,
        0.6356575552200001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.6350805601200001,
      "stddev": 0.006221718977087342,
      "median": 0.6334857517200001,
      "user": 0.31669625999999995,
      "system": 1.2699094,
      "min": 0.62746034122,
      "max": 0.6458523642200001,
      "times": [
        0.6458523642200001,
        0.6342214162200001,
        0.6338100312200001,
        0.64412396122,
        0.6331049002200001,
        0.6321589582200001,
        0.6393192402200001,
        0.6275929162200001,
        0.62746034122,
        0.6331614722200001
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 625.8 ± 56.1 589.8 757.4 6.07 ± 0.54
pacquet@main 594.6 ± 6.4 584.2 605.9 5.76 ± 0.06
pnpr@HEAD 103.5 ± 1.2 102.7 108.2 1.00 ± 0.01
pnpr@main 103.2 ± 0.3 102.4 103.9 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.62584163258,
      "stddev": 0.056084887700813026,
      "median": 0.59929910978,
      "user": 0.5738804399999999,
      "system": 0.14706429999999998,
      "min": 0.58983668678,
      "max": 0.7573588537800001,
      "times": [
        0.59617518278,
        0.7573588537800001,
        0.68692985878,
        0.64767233978,
        0.5913835247800001,
        0.6024230367800001,
        0.5906990737800001,
        0.60516176978,
        0.58983668678,
        0.5907759987800001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.5946368337800001,
      "stddev": 0.006389202316841125,
      "median": 0.59586254628,
      "user": 0.55901324,
      "system": 0.14850770000000005,
      "min": 0.58418316378,
      "max": 0.60594232278,
      "times": [
        0.5963442077800001,
        0.58418316378,
        0.5918097197800001,
        0.5956965097800001,
        0.5893818997800001,
        0.60037516278,
        0.5984140277800001,
        0.59602858278,
        0.5881927407800001,
        0.60594232278
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.10353034974153849,
      "stddev": 0.0012214911415400602,
      "median": 0.10320769028000001,
      "user": 0.026314632307692307,
      "system": 0.01896403076923077,
      "min": 0.10269640978,
      "max": 0.10818717578,
      "times": [
        0.10344886778000001,
        0.10279493378,
        0.10338355478,
        0.10818717578,
        0.10269640978,
        0.10328641578,
        0.10320804578000001,
        0.10334252978,
        0.10310479678000001,
        0.10320733478,
        0.10288655578,
        0.10352827778,
        0.10278167778,
        0.10323763278,
        0.10287041378,
        0.10350389978,
        0.10296556178,
        0.10310788078000001,
        0.10329619078,
        0.10319415178,
        0.10287422278,
        0.10342329978,
        0.10306720178,
        0.10293938678,
        0.10500046678,
        0.10645220778
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.10316866744666668,
      "stddev": 0.0003449270906104662,
      "median": 0.10316466878,
      "user": 0.025483773333333334,
      "system": 0.01910457777777777,
      "min": 0.10238094778000001,
      "max": 0.10393950878000001,
      "times": [
        0.10238094778000001,
        0.10343260078000001,
        0.10285890578,
        0.10373916478,
        0.10246873378,
        0.10302344078,
        0.10349625878,
        0.10339197178000001,
        0.10393950878000001,
        0.10328735878,
        0.10300950678,
        0.10316466878,
        0.10298512178000001,
        0.10309390478000001,
        0.10342490478000001,
        0.10296883178,
        0.10329680378,
        0.10342261178,
        0.10305576078,
        0.10334222978,
        0.10316864578,
        0.10314023978,
        0.10303607578,
        0.10277297278,
        0.10341203178,
        0.10282676578,
        0.10341405278
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 6.596 ± 0.136 6.426 6.823 1.35 ± 0.03
pacquet@main 6.584 ± 0.149 6.385 6.807 1.35 ± 0.04
pnpr@HEAD 4.880 ± 0.069 4.777 5.022 1.00
pnpr@main 4.883 ± 0.092 4.768 5.003 1.00 ± 0.02
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 6.5964721669,
      "stddev": 0.13578198958776275,
      "median": 6.5545645674,
      "user": 3.7092700799999996,
      "system": 3.56534658,
      "min": 6.4255442329,
      "max": 6.8228950529,
      "times": [
        6.4255442329,
        6.5432369159,
        6.5202413569,
        6.6647583409,
        6.6057716749,
        6.8228950529,
        6.4648820079,
        6.5658922189,
        6.8193316419,
        6.5321682259
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 6.5841477271,
      "stddev": 0.1487844718440573,
      "median": 6.5567474289,
      "user": 3.6218322799999996,
      "system": 3.5887545800000007,
      "min": 6.3853123388999995,
      "max": 6.8066738329,
      "times": [
        6.4302407689,
        6.3853123388999995,
        6.4854369979,
        6.5930378579,
        6.6789265569,
        6.4708285489,
        6.8066738329,
        6.5204569999,
        6.7857994059,
        6.6847639629
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 4.8796641451,
      "stddev": 0.06894652357039162,
      "median": 4.8669455284000005,
      "user": 2.7528588800000002,
      "system": 3.14427468,
      "min": 4.7767618329,
      "max": 5.0221331839,
      "times": [
        4.9585081009,
        4.8442175579,
        4.8951699579,
        4.8593774069,
        4.8745136499,
        4.8859315309,
        4.7767618329,
        4.8567686029,
        4.8232596269,
        5.0221331839
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 4.883003990600001,
      "stddev": 0.09181071290714245,
      "median": 4.8813371989,
      "user": 2.71291218,
      "system": 3.12261188,
      "min": 4.7683565609,
      "max": 5.0027586879,
      "times": [
        4.9577789028999995,
        4.9195727209,
        4.8059853899,
        4.9566044129,
        4.7890621899,
        4.8431016769,
        4.7683565609,
        4.9920666189,
        5.0027586879,
        4.7947527449
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/12852
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
4,164.00 ms
(-1.82%)Baseline: 4,240.98 ms
5,089.17 ms
(81.82%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
2,945.69 ms
(-2.81%)Baseline: 3,030.72 ms
3,636.86 ms
(81.00%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
1,300.19 ms
(-3.61%)Baseline: 1,348.82 ms
1,618.58 ms
(80.33%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
625.84 ms
(-1.98%)Baseline: 638.51 ms
766.21 ms
(81.68%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
3,765.63 ms
(-5.84%)Baseline: 3,999.28 ms
4,799.14 ms
(78.46%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
6,596.47 ms
(-3.42%)Baseline: 6,830.41 ms
8,196.49 ms
(80.48%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
624.38 ms
(-2.40%)Baseline: 639.74 ms
767.69 ms
(81.33%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/12852
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
2,192.50 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
644.27 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
652.94 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
103.53 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
2,132.48 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
4,879.66 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
673.11 ms
🐰 View full continuous benchmarking report in Bencher

Sanitized registry-derived fields (version, author, maintainers, keywords)
in the human-readable output and sanitized the error message body in the
diagnostic detail.
Copilot AI review requested due to automatic review settings July 8, 2026 19:53

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 8, 2026
@zkochan
zkochan merged commit abb6f41 into pnpm:main Jul 9, 2026
36 checks passed
@kairosci
kairosci deleted the paquet-search branch July 19, 2026 13:48
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.

4 participants