Skip to content

refactor(pacquet): ship the CLI under its final pnpm name - #12923

Merged
zkochan merged 2 commits into
mainfrom
refactor/pnpm-bin-and-error-codes
Jul 11, 2026
Merged

zkochan merged 2 commits into
mainfrom
refactor/pnpm-bin-and-error-codes

Conversation

@zkochan

@zkochan zkochan commented Jul 10, 2026 •

Copy link
Copy Markdown
Member

What

Stage 2a of retiring the pacquet codename — the user-facing surfaces, kept separate from the internal crate renames (stage 2b):

  • Cargo bin pacquet → pnpm. Every build now outputs the binary under its shipped name; the release workflow's archive steps no longer rename, so the released artifact is byte-for-byte what cargo produced. Build invocations stay -p pacquet-cli --bin pnpm until stage 2b renames the crates.
  • Error codes ERR_PACQUET_* → ERR_PNPM_*. The port already emits 302 codes as ERR_PNPM_*; these were the 16 port-original stragglers (ERR_PACQUET_NO_OFFLINE_TARBALL, ERR_PACQUET_PATH_TRAVERSAL, …) that users would otherwise see, script against, and document before v12 stabilizes. PACQUET_VERSION rides along as PNPM_VERSION.
  • Shell completions register for pnpm. They were broken for v12 — the scripts registered completion for a command named pacquet, but v12 installs the binary as pnpm. All four shells' scripts now register and invoke pnpm; the completion-server still accepts pacquet as the completed command's argv[0], so completion scripts installed by earlier alphas keep working until the user re-runs setup.
  • SBOM tool identity is pnpm (CycloneDX tool component + SPDX Tool: creator), matching v11's output.

Benchmark harness

The integrated-benchmark builds and runs arbitrary revisions, which now disagree on the bin name. Rather than breaking either side:

  • cli_bin_name() reads the revision clone's CLI crate manifest (whitespace-tolerant, under either directory layout) to pick the right --bin= flag — this also covers the window of revisions between the directory rename (refactor: rename the pacquet/ directory to pnpm/ #12913) and this PR.
  • The install command resolves the produced binary at script runtime by existence, the same trick the pnpm target already uses for its pnpm.mjs/pnpm.cjs bundle.
  • The prebuilt-binary helpers prefer whichever name exists, and the CI binary-cache paths list both names, so old cache entries stay restorable.

Deliberately unchanged

pnpm11's @pacquet/<platform>-<arch> package references and its PACQUET_VERSION = '0.11.7' test constants (those name the old published npm packages, which still exist under those names), the .pacquet virtual-store dir, the harness clone dir, crate names, and prose.

Verification

  • cargo check --workspace --all-targets passes.
  • All 77 tests in the touched suites pass (completion, sbom, version, pnpx_alias), including the completion integration tests that spawn the renamed binary.
  • cargo fmt --check and typos (CI's pinned version) clean; all workflow YAML parses.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • The CLI build and distributed archives are now pnpm, with updated dev commands and release artifacts.
    • Shell completions are consistently branded as pnpm and generate pnpm completion-server wiring.
  • Bug Fixes
    • Version output/user-agent reporting now aligns with pnpm.
    • Diagnostics and retry-related error codes are updated to ERR_PNPM_*.
  • Documentation
    • Updated E2E and integrated-benchmark guides to reference pnpm build outputs.
    • SBOM metadata now identifies the tool as pnpm.
  • Chores
    • Updated CI E2E/benchmark workflows and test suites to run the pnpm binary.

Copilot AI review requested due to automatic review settings July 10, 2026 21:37

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

Copy link
Copy Markdown
Contributor

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d14ea688-e3a8-4359-82c9-8405d5e3aa0c

📥 Commits

Reviewing files that changed from the base of the PR and between a68e679 and 9eb1c7e.

📒 Files selected for processing (84)
  • .github/workflows/ecosystem-e2e.yml
  • .github/workflows/pacquet-integrated-benchmark.yml
  • .github/workflows/pacquet-release-to-npm.yml
  • justfile
  • package.json
  • pnpm/crates/cli/Cargo.toml
  • pnpm/crates/cli/README.md
  • pnpm/crates/cli/src/cli_args/cli_command.rs
  • pnpm/crates/cli/src/cli_args/completion.rs
  • pnpm/crates/cli/src/cli_args/completion/tests.rs
  • pnpm/crates/cli/src/cli_args/install.rs
  • pnpm/crates/cli/src/cli_args/sbom.rs
  • pnpm/crates/cli/src/cli_args/self_update.rs
  • pnpm/crates/cli/src/cli_args/setup.rs
  • pnpm/crates/cli/src/cli_args/switch_cli_version.rs
  • pnpm/crates/cli/src/lib.rs
  • pnpm/crates/cli/tests/add.rs
  • pnpm/crates/cli/tests/approve_builds.rs
  • pnpm/crates/cli/tests/audit.rs
  • pnpm/crates/cli/tests/bin.rs
  • pnpm/crates/cli/tests/bugs.rs
  • pnpm/crates/cli/tests/cat_index.rs
  • pnpm/crates/cli/tests/catalog.rs
  • pnpm/crates/cli/tests/completion.rs
  • pnpm/crates/cli/tests/config_dependencies.rs
  • pnpm/crates/cli/tests/custom_fetchers.rs
  • pnpm/crates/cli/tests/custom_resolvers.rs
  • pnpm/crates/cli/tests/dedupe.rs
  • pnpm/crates/cli/tests/dedupe_direct_deps.rs
  • pnpm/crates/cli/tests/dedupe_injected_deps.rs
  • pnpm/crates/cli/tests/deploy.rs
  • pnpm/crates/cli/tests/dist_tag.rs
  • pnpm/crates/cli/tests/docs.rs
  • pnpm/crates/cli/tests/dry_run.rs
  • pnpm/crates/cli/tests/fetch.rs
  • pnpm/crates/cli/tests/find_hash.rs
  • pnpm/crates/cli/tests/global.rs
  • pnpm/crates/cli/tests/hoisted_node_linker.rs
  • pnpm/crates/cli/tests/install.rs
  • pnpm/crates/cli/tests/lifecycle_scripts.rs
  • pnpm/crates/cli/tests/list.rs
  • pnpm/crates/cli/tests/lockfile_only.rs
  • pnpm/crates/cli/tests/lockfile_resolution_reuse.rs
  • pnpm/crates/cli/tests/outdated.rs
  • pnpm/crates/cli/tests/patch.rs
  • pnpm/crates/cli/tests/ping.rs
  • pnpm/crates/cli/tests/pnpr_install.rs
  • pnpm/crates/cli/tests/pnpx_alias.rs
  • pnpm/crates/cli/tests/prefix.rs
  • pnpm/crates/cli/tests/publish.rs
  • pnpm/crates/cli/tests/remove.rs
  • pnpm/crates/cli/tests/repo.rs
  • pnpm/crates/cli/tests/root.rs
  • pnpm/crates/cli/tests/run.rs
  • pnpm/crates/cli/tests/run_recursive.rs
  • pnpm/crates/cli/tests/sbom.rs
  • pnpm/crates/cli/tests/search.rs
  • pnpm/crates/cli/tests/set_script.rs
  • pnpm/crates/cli/tests/side_effects_cache.rs
  • pnpm/crates/cli/tests/stage.rs
  • pnpm/crates/cli/tests/stale_pin_dedupe.rs
  • pnpm/crates/cli/tests/store.rs
  • pnpm/crates/cli/tests/tarball_url_dependency.rs
  • pnpm/crates/cli/tests/unlink.rs
  • pnpm/crates/cli/tests/update.rs
  • pnpm/crates/cli/tests/verify_deps_before_run.rs
  • pnpm/crates/cli/tests/version.rs
  • pnpm/crates/cli/tests/whoami.rs
  • pnpm/crates/cli/tests/why.rs
  • pnpm/crates/cli/tests/with.rs
  • pnpm/crates/config/src/defaults.rs
  • pnpm/crates/config/src/defaults/tests.rs
  • pnpm/crates/config/src/lib.rs
  • pnpm/crates/napi/src/lib.rs
  • pnpm/crates/napi/src/pack.rs
  • pnpm/crates/package-manager/src/build_modules.rs
  • pnpm/crates/package-manager/src/hoisted_dep_graph.rs
  • pnpm/crates/package-manager/src/link_hoisted_modules.rs
  • pnpm/crates/tarball/src/lib.rs
  • pnpm/crates/tarball/src/tests.rs
  • pnpm/crates/testing-utils/src/bin.rs
  • pnpm/tasks/ecosystem-e2e/README.md
  • pnpm/tasks/integrated-benchmark/src/work_env.rs
  • pnpm/tasks/integrated-benchmark/src/work_env/tests.rs
✅ Files skipped from review due to trivial changes (13)
  • pnpm/crates/package-manager/src/hoisted_dep_graph.rs
  • pnpm/crates/cli/src/cli_args/install.rs
  • pnpm/tasks/ecosystem-e2e/README.md
  • pnpm/crates/cli/tests/dedupe_direct_deps.rs
  • pnpm/crates/package-manager/src/link_hoisted_modules.rs
  • pnpm/crates/cli/tests/run_recursive.rs
  • pnpm/crates/cli/README.md
  • pnpm/crates/cli/tests/dist_tag.rs
  • pnpm/crates/cli/tests/with.rs
  • pnpm/crates/cli/tests/config_dependencies.rs
  • pnpm/crates/cli/src/cli_args/sbom.rs
  • pnpm/crates/cli/tests/run.rs
  • pnpm/crates/config/src/defaults.rs
🚧 Files skipped from review as they are similar to previous changes (70)
  • pnpm/crates/cli/tests/pnpx_alias.rs
  • pnpm/crates/cli/tests/custom_fetchers.rs
  • pnpm/crates/cli/tests/ping.rs
  • pnpm/crates/cli/tests/dry_run.rs
  • pnpm/crates/cli/tests/lockfile_only.rs
  • pnpm/crates/cli/Cargo.toml
  • pnpm/crates/cli/tests/pnpr_install.rs
  • pnpm/crates/cli/tests/deploy.rs
  • pnpm/crates/napi/src/lib.rs
  • pnpm/crates/cli/tests/verify_deps_before_run.rs
  • pnpm/crates/cli/tests/cat_index.rs
  • pnpm/crates/cli/tests/audit.rs
  • pnpm/crates/cli/tests/dedupe_injected_deps.rs
  • pnpm/crates/cli/tests/outdated.rs
  • pnpm/crates/cli/src/lib.rs
  • pnpm/crates/cli/tests/find_hash.rs
  • pnpm/crates/cli/tests/list.rs
  • package.json
  • pnpm/crates/cli/src/cli_args/cli_command.rs
  • pnpm/crates/cli/tests/patch.rs
  • pnpm/crates/cli/tests/approve_builds.rs
  • pnpm/crates/cli/tests/whoami.rs
  • pnpm/crates/package-manager/src/build_modules.rs
  • pnpm/crates/napi/src/pack.rs
  • pnpm/crates/cli/tests/tarball_url_dependency.rs
  • pnpm/crates/cli/tests/remove.rs
  • pnpm/crates/cli/tests/why.rs
  • pnpm/crates/cli/src/cli_args/setup.rs
  • pnpm/crates/cli/tests/bin.rs
  • pnpm/crates/cli/tests/prefix.rs
  • pnpm/crates/cli/tests/add.rs
  • .github/workflows/pacquet-integrated-benchmark.yml
  • pnpm/crates/cli/tests/global.rs
  • pnpm/crates/cli/tests/side_effects_cache.rs
  • pnpm/crates/cli/tests/update.rs
  • pnpm/crates/cli/tests/fetch.rs
  • pnpm/crates/cli/tests/bugs.rs
  • pnpm/crates/cli/tests/lifecycle_scripts.rs
  • pnpm/crates/cli/tests/lockfile_resolution_reuse.rs
  • pnpm/crates/cli/tests/publish.rs
  • pnpm/crates/cli/tests/sbom.rs
  • pnpm/crates/config/src/defaults/tests.rs
  • pnpm/crates/config/src/lib.rs
  • justfile
  • pnpm/crates/cli/tests/catalog.rs
  • pnpm/crates/cli/tests/root.rs
  • pnpm/crates/cli/tests/set_script.rs
  • pnpm/crates/cli/tests/stale_pin_dedupe.rs
  • pnpm/crates/cli/tests/unlink.rs
  • pnpm/crates/cli/tests/search.rs
  • pnpm/crates/tarball/src/tests.rs
  • pnpm/crates/cli/src/cli_args/self_update.rs
  • pnpm/crates/testing-utils/src/bin.rs
  • pnpm/crates/cli/tests/repo.rs
  • pnpm/crates/cli/tests/docs.rs
  • .github/workflows/pacquet-release-to-npm.yml
  • .github/workflows/ecosystem-e2e.yml
  • pnpm/crates/cli/tests/install.rs
  • pnpm/crates/cli/tests/version.rs
  • pnpm/crates/tarball/src/lib.rs
  • pnpm/crates/cli/tests/dedupe.rs
  • pnpm/crates/cli/tests/hoisted_node_linker.rs
  • pnpm/tasks/integrated-benchmark/src/work_env/tests.rs
  • pnpm/crates/cli/src/cli_args/completion/tests.rs
  • pnpm/crates/cli/src/cli_args/switch_cli_version.rs
  • pnpm/crates/cli/tests/store.rs
  • pnpm/crates/cli/src/cli_args/completion.rs
  • pnpm/crates/cli/tests/custom_resolvers.rs
  • pnpm/crates/cli/tests/completion.rs
  • pnpm/tasks/integrated-benchmark/src/work_env.rs

📝 Walkthrough

Walkthrough

The Rust CLI binary is renamed from pacquet to pnpm. Version constants, diagnostics, shell completions, integration tests, release workflows, ecosystem E2E workflows, and benchmark binary selection are updated accordingly.

Changes

CLI binary and branding migration

Layer / File(s) Summary
Rename binary targets and build wiring
.github/workflows/*, justfile, package.json, pnpm/crates/cli/Cargo.toml, pnpm/tasks/ecosystem-e2e/README.md
Build, packaging, local execution, caching, and ecosystem E2E flows now use the pnpm binary.
Update version and diagnostic metadata
pnpm/crates/config/*, pnpm/crates/cli/src/*, pnpm/crates/napi/*, pnpm/crates/package-manager/*, pnpm/crates/tarball/*
Version sources, user-agent and SBOM metadata, self-update logic, and diagnostic codes use pnpm-specific constants and identifiers.
Rebrand shell completion
pnpm/crates/cli/src/cli_args/completion*, pnpm/crates/cli/tests/completion.rs
Completion parsing, generated shell scripts, error messages, and completion tests use pnpm names.
Run integration tests against pnpm
pnpm/crates/cli/tests/*, pnpm/crates/testing-utils/src/bin.rs
Integration-test command helpers and expectations now resolve the pnpm Cargo binary and validate pnpm metadata.
Resolve benchmark client binaries
pnpm/tasks/integrated-benchmark/src/work_env*
Benchmark setup detects pnpm or legacy pacquet binaries and builds the client binary declared by each revision.

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

Possibly related issues

  • Rust Roadmap #11633 — Covers the broader pacquet-to-pnpm CLI integration and publishing/benchmark migration addressed here.

Possibly related PRs

  • pnpm/pnpm#11913 — Updates integrated-benchmark target selection and cached binary handling.
  • pnpm/pnpm#12661 — Modifies CLI completion-server behavior.
  • pnpm/pnpm#12907 — Updates release workflow packaging for pnpm binaries.

Suggested labels: product: pacquet, product: pnpm@11

Suggested reviewers: KSXGitHub

✨ 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 refactor/pnpm-bin-and-error-codes

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

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

Copy link
Copy Markdown

Code Review by Qodo

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

Context used
✅ Compliance rules (platform): 18 rules

Grey Divider


Remediation recommended

1. ERR_PNPM_ZIP code divergence 📘 Rule violation ≡ Correctness ⭐ New
Description
Pacquet now emits several pnpm-prefixed ERR_PNPM_* diagnostic/retry-logger codes for
Pacquet-specific failures (tarball/zip/gzip mapping, hoisted-graph bad reference, and build
thread-pool setup) that may not exist in pnpm’s actual error-code surface. If pnpm does not emit
these exact codes for equivalent conditions, this introduces new user-visible behavior beyond pnpm
and can break pnpm-compatibility expectations around retry logging and error handling.
Code

pnpm/crates/tarball/src/lib.rs[R1554-1580]

        TarballError::DecodeGzip(_) => {
-            out.code = Some("ERR_PACQUET_TARBALL_GZIP".to_string());
+            out.code = Some("ERR_PNPM_TARBALL_GZIP".to_string());
        }
        TarballError::ReadTarballEntries(_) => {
-            out.code = Some("ERR_PACQUET_TARBALL_TAR".to_string());
+            out.code = Some("ERR_PNPM_TARBALL_TAR".to_string());
        }
        TarballError::ReadLocalTarball { .. } => {
-            out.code = Some("ERR_PACQUET_TARBALL_FILE".to_string());
+            out.code = Some("ERR_PNPM_TARBALL_FILE".to_string());
        }
        TarballError::WriteCasFile(_) | TarballError::WriteStoreIndex(_) => {
-            out.code = Some("ERR_PACQUET_TARBALL_STORE".to_string());
+            out.code = Some("ERR_PNPM_TARBALL_STORE".to_string());
        }
        TarballError::TaskJoin(_) => {
-            out.code = Some("ERR_PACQUET_TASK_JOIN".to_string());
+            out.code = Some("ERR_PNPM_TASK_JOIN".to_string());
        }
        TarballError::TarballTooLarge { .. } => {
-            out.code = Some("ERR_PACQUET_TARBALL_TOO_LARGE".to_string());
+            out.code = Some("ERR_PNPM_TARBALL_TOO_LARGE".to_string());
        }
        TarballError::SiblingFetchFailed { .. } => {
-            out.code = Some("ERR_PACQUET_SIBLING_FETCH".to_string());
+            out.code = Some("ERR_PNPM_SIBLING_FETCH".to_string());
        }
        TarballError::PathTraversal { .. } => {
-            out.code = Some("ERR_PACQUET_PATH_TRAVERSAL".to_string());
+            out.code = Some("ERR_PNPM_PATH_TRAVERSAL".to_string());
        }
        TarballError::ReadZipArchive { .. } | TarballError::ReadZipEntries { .. } => {
-            out.code = Some("ERR_PACQUET_ZIP".to_string());
+            out.code = Some("ERR_PNPM_ZIP".to_string());
        }
Evidence
Rule 713429 requires Pacquet’s user-visible behavior—including error codes used by pnpm’s
requestRetryLogger surface—to match pnpm and not introduce Pacquet-only divergence. The cited
changes assign pnpm-prefixed identifiers to multiple Pacquet error paths:
tarball_error_to_request_retry() maps various TarballError variants to ERR_PNPM_* strings, the
hoisted dependency graph conversion error HoistedDepGraphError::BadReference is annotated as
ERR_PNPM_HOISTED_GRAPH_BAD_REFERENCE, and a Rayon thread-pool build failure is labeled
ERR_PNPM_BUILD_THREAD_POOL. If pnpm doesn’t actually use these codes, the pnpm-prefixed labeling
expands the apparent pnpm-compatible error-code contract and thus creates user-visible divergence.

Rule 713429: Pacquet must not introduce new user-visible behavior beyond pnpm
pnpm/crates/tarball/src/lib.rs[1522-1581]
pnpm/crates/package-manager/src/hoisted_dep_graph.rs[261-279]
pnpm/crates/package-manager/src/build_modules.rs[50-60]

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

## Issue description
Pacquet is emitting several pnpm-prefixed `ERR_PNPM_*` codes for internal/Pacquet-specific failure paths (tarball/zip/gzip-related tarball errors in the retry-logger projection, `HoistedDepGraphError::BadReference`, and a Rayon thread-pool build failure). If pnpm does not emit these exact codes for equivalent failures, this creates a pnpm-incompatible, user-visible error-code surface (including for `requestRetryLogger`) and violates the requirement that Pacquet must not introduce new user-visible behavior beyond pnpm.

## Issue Context
Compliance rule 713429 requires Pacquet’s user-visible behavior (including diagnostic/error codes and retry-logger codes) to match pnpm rather than extend it with new pnpm-prefixed identifiers. The affected code paths currently use pnpm-prefixed codes that may not exist in pnpm’s contract; if pnpm has no equivalent codes, Pacquet should avoid presenting these as pnpm-native (e.g., by mapping to real pnpm codes if they exist, or using a Pacquet-scoped code and explicitly documenting any divergence).

## Fix Focus Areas
- pnpm/crates/tarball/src/lib.rs[1522-1590]
- pnpm/crates/package-manager/src/hoisted_dep_graph.rs[267-279]
- pnpm/crates/package-manager/src/build_modules.rs[54-59]

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


2. Benchmark exec empty path 🐞 Bug ☼ Reliability ⭐ New
Description
WorkEnv::install_command() can expand to an empty string when neither
./pacquet/target/release/pnpm nor .../pacquet exists, and the generated install.bash splices
it directly into exec ..., yielding a confusing exec: : not found failure. This makes
integrated-benchmark failures harder to debug when a build/cache step didn’t actually produce the
expected client binary.
Code

pnpm/tasks/integrated-benchmark/src/work_env.rs[R224-228]

+                let candidates =
+                    ["./pacquet/target/release/pnpm", "./pacquet/target/release/pacquet"].join(" ");
+                format!(
+                    r#""$(for f in {candidates}; do if [ -f "$f" ]; then echo "$f"; break; fi; done)""#,
+                )
Evidence
The pacquet/pnpr branch of install_command() builds a candidate list and echoes the first file
that exists, but has no fallback/error when none exist; the script generator then always writes
exec {command} using that value as the program to execute.

pnpm/tasks/integrated-benchmark/src/work_env.rs[201-252]
pnpm/tasks/integrated-benchmark/src/work_env.rs[2033-2039]

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

### Issue description
The integrated-benchmark harness generates an `install.bash` script that executes the pacquet-like client via a command substitution that selects the first existing candidate path. If neither candidate exists, the substitution expands to an empty string and the script fails later with a generic `exec` error, obscuring the real root cause (missing build output / cache restore).

### Issue Context
This affects benchmark/CI ergonomics (not pnpm runtime behavior), but it can waste CI time and make failures non-actionable.

### Fix Focus Areas
- pnpm/tasks/integrated-benchmark/src/work_env.rs[212-229]
- pnpm/tasks/integrated-benchmark/src/work_env.rs[1981-2044]

### Suggested change
Adjust the generated shell snippet (or the script writer) to:
1) Validate that a candidate was found, and
2) Prefer `-x` (executable) over `-f` (regular file),
3) Emit a clear error message and exit non-zero *before* attempting `exec`.

One approach that keeps the single-word `exec` shape is to make the command-substitution exit non-zero and print an actionable error when no candidate is found (so `set -e` aborts the script with a clear message).

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


3. cli_bin_name hand-parses Cargo.toml 📘 Rule violation ⚙ Maintainability
Description
cli_bin_name() reimplements TOML parsing by scanning Cargo.toml with ad-hoc whitespace splitting
to infer the declared bin name. This is brittle and violates the rule to avoid reimplementing
functionality available in well-maintained parsing libraries.
Code

pnpm/tasks/integrated-benchmark/src/work_env.rs[R319-334]

+    fn cli_bin_name(revision_repo: &Path) -> &'static str {
+        for dir in ["pnpm", "pacquet"] {
+            let manifest = revision_repo.join(dir).join("crates").join("cli").join("Cargo.toml");
+            if let Ok(content) = fs::read_to_string(&manifest) {
+                // Whitespace-tolerant match: taplo pads `name` keys for
+                // alignment in some tables.
+                let has_pnpm_bin = content.lines().any(|line| {
+                    let mut parts = line.split_whitespace();
+                    parts.next() == Some("name")
+                        && parts.next() == Some("=")
+                        && parts.next() == Some(r#""pnpm""#)
+                });
+                return if has_pnpm_bin { "pnpm" } else { "pacquet" };
+            }
+        }
+        "pnpm"
Evidence
The compliance rule flags hand-written parsing utilities when a well-maintained open source package
should be used instead. The new code reads a TOML manifest and parses it via split_whitespace()
checks, which is a reimplementation of TOML parsing logic.

Rule 713437: Avoid reimplementing functionality provided by well-maintained open source packages
pnpm/tasks/integrated-benchmark/src/work_env.rs[319-334]

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

## Issue description
`cli_bin_name()` infers the bin name by manually scanning and splitting lines of a TOML manifest, which is a custom parser approach.

## Issue Context
The benchmark harness needs to read the `[[bin]] name` from the clone’s CLI crate manifest. This should be done with a real TOML parser (or an equivalent robust mechanism) instead of string heuristics.

## Fix Focus Areas
- pnpm/tasks/integrated-benchmark/src/work_env.rs[319-334]

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


View more (2)
4. v12 rename historical comments ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
New comments describe behavior in terms of past transitions (e.g., “from the v12 rename onward” /
“before it”) rather than stating current guarantees and constraints. This violates the rule against
historical-implementation commentary and can quickly become misleading as the code evolves.
Code

pnpm/tasks/integrated-benchmark/src/work_env.rs[R219-222]

+                // The client bin is `pnpm` from the v12 rename onward and
+                // `pacquet` before it; resolve whichever this revision's
+                // build produced at script runtime, the same way the pnpm
+                // branch below resolves its bundle path.
Evidence
The checklist forbids comments that reference prior behavior/implementations. The added comments
explicitly use temporal/historical framing (“from the v12 rename onward”, “before it”, “pre-rename
revisions”) instead of documenting the current supported contract.

Rule 772199: Comments must describe current behavior, not historical implementations
pnpm/tasks/integrated-benchmark/src/work_env.rs[219-222]
pnpm/tasks/integrated-benchmark/src/work_env.rs[302-318]

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

## Issue description
Some newly added comments explain logic using historical phrasing (e.g., “from the v12 rename onward”, “before it”), which violates the requirement that comments describe current behavior rather than historical implementations.

## Issue Context
These comments are in the integrated benchmark harness and should document the current contract: “the harness supports both client binary names” and why, without framing it as past-vs-present.

## Fix Focus Areas
- pnpm/tasks/integrated-benchmark/src/work_env.rs[219-223]
- pnpm/tasks/integrated-benchmark/src/work_env.rs[289-318]

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


5. Stale benchmark binary picked ✓ Resolved 🐞 Bug ☼ Reliability
Description
The integrated-benchmark harness now prefers an existing target/release/pnpm over
target/release/pacquet when resolving the client binary, which can silently execute a stale binary
if both files coexist from previous runs. Because sync_bench_repo() resets tracked files but does
not remove untracked build outputs, this can invalidate performance measurements (or fail
unexpectedly) when benchmarking a pre-rename revision after a post-rename revision in the same
work-env directory.
Code

pnpm/tasks/integrated-benchmark/src/work_env.rs[R305-313]

+    fn client_binary_in(source_dir: &Path) -> PathBuf {
+        let release = source_dir.join("target").join("release");
+        let pnpm = release.join("pnpm");
+        if pnpm.is_file() {
+            return pnpm;
+        }
+        let pacquet = release.join("pacquet");
+        if pacquet.is_file() { pacquet } else { pnpm }
+    }
Evidence
The harness resolves the executable by existence checks that prefer pnpm, both in Rust
(client_binary_in) and in the generated shell command for install.bash; if both binaries exist,
the newer/expected one is not guaranteed to be selected. The bench repo sync logic uses `git reset
--hard but does not git clean` or otherwise remove untracked outputs, so previously built binaries
can persist and trigger the wrong selection.

pnpm/tasks/integrated-benchmark/src/work_env.rs[212-228]
pnpm/tasks/integrated-benchmark/src/work_env.rs[289-335]
pnpm/tasks/integrated-benchmark/src/work_env.rs[1458-1513]

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

### Issue description
The benchmark harness chooses the client executable by “file exists” checks, with `pnpm` taking priority. If a prior run left `target/release/pnpm` behind and the next run builds a revision whose client binary is `pacquet`, both binaries can coexist and the harness will still run the stale `pnpm`.

### Issue Context
`sync_bench_repo()` does not remove untracked build artifacts (like `target/release/*`), so binaries from older runs can linger across different checked-out commits in the same `bench-work-env/...` checkout.

### Fix Focus Areas
- pnpm/tasks/integrated-benchmark/src/work_env.rs[212-228]
- pnpm/tasks/integrated-benchmark/src/work_env.rs[289-335]
- pnpm/tasks/integrated-benchmark/src/work_env.rs[1458-1513]

### Suggested fix
After determining which bin name a revision should produce (you already compute this via `cli_bin_name()` in `build_pacquet()` / `build_pnpr()`), proactively delete the *other* client binary in `target/release/` before/after building (and before copying from pnpr->pacquet). This guarantees the later runtime `for f in ...; -f` selection cannot pick a stale binary.

Concretely:
- If building `--bin=pnpm`: remove `target/release/pacquet` if present.
- If building `--bin=pacquet`: remove `target/release/pnpm` if present.
- Consider applying the same cleanup in the pnpr->pacquet reuse copy path, since it can also leave both names behind.

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


Grey Divider

Previous review results

Review updated until commit 9eb1c7e

Results up to commit a47132e


🐞 Bugs (0) 📘 Rule violations (1) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)


Remediation recommended
1. cli_bin_name hand-parses Cargo.toml 📘 Rule violation ⚙ Maintainability
Description
cli_bin_name() reimplements TOML parsing by scanning Cargo.toml with ad-hoc whitespace splitting
to infer the declared bin name. This is brittle and violates the rule to avoid reimplementing
functionality available in well-maintained parsing libraries.
Code

pnpm/tasks/integrated-benchmark/src/work_env.rs[R319-334]

+    fn cli_bin_name(revision_repo: &Path) -> &'static str {
+        for dir in ["pnpm", "pacquet"] {
+            let manifest = revision_repo.join(dir).join("crates").join("cli").join("Cargo.toml");
+            if let Ok(content) = fs::read_to_string(&manifest) {
+                // Whitespace-tolerant match: taplo pads `name` keys for
+                // alignment in some tables.
+                let has_pnpm_bin = content.lines().any(|line| {
+                    let mut parts = line.split_whitespace();
+                    parts.next() == Some("name")
+                        && parts.next() == Some("=")
+                        && parts.next() == Some(r#""pnpm""#)
+                });
+                return if has_pnpm_bin { "pnpm" } else { "pacquet" };
+            }
+        }
+        "pnpm"
Evidence
The compliance rule flags hand-written parsing utilities when a well-maintained open source package
should be used instead. The new code reads a TOML manifest and parses it via split_whitespace()
checks, which is a reimplementation of TOML parsing logic.

Rule 713437: Avoid reimplementing functionality provided by well-maintained open source packages
pnpm/tasks/integrated-benchmark/src/work_env.rs[319-334]

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

## Issue description
`cli_bin_name()` infers the bin name by manually scanning and splitting lines of a TOML manifest, which is a custom parser approach.

## Issue Context
The benchmark harness needs to read the `[[bin]] name` from the clone’s CLI crate manifest. This should be done with a real TOML parser (or an equivalent robust mechanism) instead of string heuristics.

## Fix Focus Areas
- pnpm/tasks/integrated-benchmark/src/work_env.rs[319-334]

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


2. Stale benchmark binary picked ✓ Resolved 🐞 Bug ☼ Reliability
Description
The integrated-benchmark harness now prefers an existing target/release/pnpm over
target/release/pacquet when resolving the client binary, which can silently execute a stale binary
if both files coexist from previous runs. Because sync_bench_repo() resets tracked files but does
not remove untracked build outputs, this can invalidate performance measurements (or fail
unexpectedly) when benchmarking a pre-rename revision after a post-rename revision in the same
work-env directory.
Code

pnpm/tasks/integrated-benchmark/src/work_env.rs[R305-313]

+    fn client_binary_in(source_dir: &Path) -> PathBuf {
+        let release = source_dir.join("target").join("release");
+        let pnpm = release.join("pnpm");
+        if pnpm.is_file() {
+            return pnpm;
+        }
+        let pacquet = release.join("pacquet");
+        if pacquet.is_file() { pacquet } else { pnpm }
+    }
Evidence
The harness resolves the executable by existence checks that prefer pnpm, both in Rust
(client_binary_in) and in the generated shell command for install.bash; if both binaries exist,
the newer/expected one is not guaranteed to be selected. The bench repo sync logic uses `git reset
--hard but does not git clean` or otherwise remove untracked outputs, so previously built binaries
can persist and trigger the wrong selection.

pnpm/tasks/integrated-benchmark/src/work_env.rs[212-228]
pnpm/tasks/integrated-benchmark/src/work_env.rs[289-335]
pnpm/tasks/integrated-benchmark/src/work_env.rs[1458-1513]

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

### Issue description
The benchmark harness chooses the client executable by “file exists” checks, with `pnpm` taking priority. If a prior run left `target/release/pnpm` behind and the next run builds a revision whose client binary is `pacquet`, both binaries can coexist and the harness will still run the stale `pnpm`.

### Issue Context
`sync_bench_repo()` does not remove untracked build artifacts (like `target/release/*`), so binaries from older runs can linger across different checked-out commits in the same `bench-work-env/...` checkout.

### Fix Focus Areas
- pnpm/tasks/integrated-benchmark/src/work_env.rs[212-228]
- pnpm/tasks/integrated-benchmark/src/work_env.rs[289-335]
- pnpm/tasks/integrated-benchmark/src/work_env.rs[1458-1513]

### Suggested fix
After determining which bin name a revision should produce (you already compute this via `cli_bin_name()` in `build_pacquet()` / `build_pnpr()`), proactively delete the *other* client binary in `target/release/` before/after building (and before copying from pnpr->pacquet). This guarantees the later runtime `for f in ...; -f` selection cannot pick a stale binary.

Concretely:
- If building `--bin=pnpm`: remove `target/release/pacquet` if present.
- If building `--bin=pacquet`: remove `target/release/pnpm` if present.
- Consider applying the same cleanup in the pnpr->pacquet reuse copy path, since it can also leave both names behind.

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


3. v12 rename historical comments ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
New comments describe behavior in terms of past transitions (e.g., “from the v12 rename onward” /
“before it”) rather than stating current guarantees and constraints. This violates the rule against
historical-implementation commentary and can quickly become misleading as the code evolves.
Code

pnpm/tasks/integrated-benchmark/src/work_env.rs[R219-222]

+                // The client bin is `pnpm` from the v12 rename onward and
+                // `pacquet` before it; resolve whichever this revision's
+                // build produced at script runtime, the same way the pnpm
+                // branch below resolves its bundle path.
Evidence
The checklist forbids comments that reference prior behavior/implementations. The added comments
explicitly use temporal/historical framing (“from the v12 rename onward”, “before it”, “pre-rename
revisions”) instead of documenting the current supported contract.

Rule 772199: Comments must describe current behavior, not historical implementations
pnpm/tasks/integrated-benchmark/src/work_env.rs[219-222]
pnpm/tasks/integrated-benchmark/src/work_env.rs[302-318]

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

## Issue description
Some newly added comments explain logic using historical phrasing (e.g., “from the v12 rename onward”, “before it”), which violates the requirement that comments describe current behavior rather than historical implementations.

## Issue Context
These comments are in the integrated benchmark harness and should document the current contract: “the harness supports both client binary names” and why, without framing it as past-vs-present.

## Fix Focus Areas
- pnpm/tasks/integrated-benchmark/src/work_env.rs[219-223]
- pnpm/tasks/integrated-benchmark/src/work_env.rs[289-318]

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


Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Ship CLI as pnpm binary and rename ERR_PACQUET_* codes to ERR_PNPM_*

✨ Enhancement 🐞 Bug fix 🕐 40+ Minutes

Grey Divider

AI Description

• Renames the cargo [[bin]] from pacquet to pnpm, updating release/build workflows,
 justfile, package.json, and all Command::cargo_bin test helpers accordingly.
• Renames the remaining 16 port-original ERR_PACQUET_* diagnostic codes and the PACQUET_VERSION
 constant to ERR_PNPM_* / PNPM_VERSION to match the already-ported 302 codes.
• Fixes shell completion scripts (bash/fish/pwsh/zsh) to register and invoke pnpm instead of the
 broken pacquet name, while the completion-server still accepts legacy pacquet argv[0] for
 backward compatibility.
• Updates SBOM tool identity (CycloneDX component, SPDX creator) to pnpm, matching v11 output.
• Adapts the integrated-benchmark harness to detect and resolve either binary name across old/new
 revisions, and updates CI cache paths to cover both names.
Diagram

graph TD
  A["cargo build --bin pnpm"] --> B["pacquet-cli crate"] --> C["pnpm binary"]
  C --> D["Shell completions"]
  C --> E["SBOM tool identity"]
  C --> F["ERR_PNPM_* codes"]
  G["Integrated benchmark harness"] --> H{"Resolve bin name"}
  H -->|"pnpm exists"| C
  H -->|"legacy pacquet"| I["pacquet binary"]
  subgraph Legend
    direction LR
    _proc([Process/Binary]) ~~~ _dec{Decision}
  end
Loading
High-Level Assessment

The PR correctly scopes the rename to user-facing surfaces (binary name, error codes, completions, SBOM) while deliberately deferring internal crate/directory renames to a later stage, keeping the diff reviewable and the risk contained. Backward-compatibility shims (accepting legacy pacquet argv[0] in the completion server, resolving either binary name in the benchmark harness) are pragmatic given in-flight alpha installs and mixed-revision benchmarking; no better alternative approach stands out for this kind of rename.

Files changed (82) +261 / -216

Enhancement (3) +61 / -14
Cargo.tomlRename cargo '[[bin]]' from pacquet to pnpm +1/-1

Rename cargo '[[bin]]' from pacquet to pnpm

• Changes the '[[bin]] name' in the CLI crate manifest, the core change driving the entire rename.

pnpm/crates/cli/Cargo.toml

sbom.rsSet SBOM tool identity to pnpm +3/-3

Set SBOM tool identity to pnpm

• CycloneDX tool component name/version and SPDX 'Tool:' creator now report 'pnpm' and 'PNPM_VERSION' instead of 'pacquet'.

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

work_env.rsAdd dual-binary-name resolution and manifest-based bin detection to benchmark harness +57/-10

Add dual-binary-name resolution and manifest-based bin detection to benchmark harness

• Introduces 'cli_bin_name()' to read the CLI crate manifest and pick '--bin=pnpm' or '--bin=pacquet' for a given revision, 'client_binary_in()' to resolve the produced binary by existence, and updates cache/build logic to use these helpers so both pre- and post-rename revisions build and run correctly.

pnpm/tasks/integrated-benchmark/src/work_env.rs

Bug fix (1) +22 / -22
completion.rsFix shell completion scripts to register the pnpm command +22/-22

Fix shell completion scripts to register the pnpm command

• All four completion script templates (bash, fish, pwsh, zsh) now register and invoke 'pnpm'; the completed-argv0 detection accepts both 'pnpm' and legacy 'pacquet' for backward compatibility.

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

Refactor (13) +44 / -44
cli_command.rsReference renamed PNPM_VERSION constant for the version flag +1/-1

Reference renamed PNPM_VERSION constant for the version flag

• Updates the clap 'version' attribute to use 'pacquet_config::PNPM_VERSION'.

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

self_update.rsUse PNPM_VERSION constant in self-update logic +7/-7

Use PNPM_VERSION constant in self-update logic

• Replaces all 'PACQUET_VERSION' references with 'PNPM_VERSION' in version-comparison and messaging logic.

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

setup.rsUse PNPM_VERSION for generated exe package.json version +2/-2

Use PNPM_VERSION for generated exe package.json version

• Import and usage renamed from 'PACQUET_VERSION' to 'PNPM_VERSION'.

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

switch_cli_version.rsUse PNPM_VERSION constant in switch-cli-version comparisons +4/-4

Use PNPM_VERSION constant in switch-cli-version comparisons

• Replaces 'PACQUET_VERSION' references with 'PNPM_VERSION' throughout version comparisons.

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

lib.rsReport PNPM_VERSION in reporter and --version output +2/-2

Report PNPM_VERSION in reporter and --version output

• Updates the two callsites reading 'pacquet_config::PACQUET_VERSION' to use 'PNPM_VERSION'.

pnpm/crates/cli/src/lib.rs

defaults.rsRename PACQUET_VERSION constant to PNPM_VERSION +2/-2

Rename PACQUET_VERSION constant to PNPM_VERSION

• Renames the version constant and updates its use in the default User-Agent string.

pnpm/crates/config/src/defaults.rs

lib.rsRe-export PNPM_VERSION instead of PACQUET_VERSION +2/-2

Re-export PNPM_VERSION instead of PACQUET_VERSION

• Updates the public re-export list and a doc comment referencing the renamed error code.

pnpm/crates/config/src/lib.rs

lib.rsUse PNPM_VERSION in NAPI engineVersion binding +1/-1

Use PNPM_VERSION in NAPI engineVersion binding

• Updates the 'engine_version' napi function to return 'pacquet_config::PNPM_VERSION'.

pnpm/crates/napi/src/lib.rs

pack.rsUse PNPM_VERSION in NAPI pack user-agent string +2/-2

Use PNPM_VERSION in NAPI pack user-agent string

• Import and usage updated from 'PACQUET_VERSION' to 'PNPM_VERSION'.

pnpm/crates/napi/src/pack.rs

build_modules.rsRename ERR_PACQUET_BUILD_THREAD_POOL diagnostic code +1/-1

Rename ERR_PACQUET_BUILD_THREAD_POOL diagnostic code

• Renames the diagnostic code to 'ERR_PNPM_BUILD_THREAD_POOL'.

pnpm/crates/package-manager/src/build_modules.rs

hoisted_dep_graph.rsRename ERR_PACQUET_HOISTED_GRAPH_BAD_REFERENCE diagnostic code +1/-1

Rename ERR_PACQUET_HOISTED_GRAPH_BAD_REFERENCE diagnostic code

• Renames the diagnostic code to 'ERR_PNPM_HOISTED_GRAPH_BAD_REFERENCE'.

pnpm/crates/package-manager/src/hoisted_dep_graph.rs

link_hoisted_modules.rsRename two ERR_PACQUET link-hoisted-modules diagnostic codes +2/-2

Rename two ERR_PACQUET link-hoisted-modules diagnostic codes

• Renames 'ERR_PACQUET_LINK_HOISTED_MISSING_CAS' and 'ERR_PACQUET_LINK_HOISTED_MISSING_GRAPH_NODE' to their 'ERR_PNPM_*' equivalents.

pnpm/crates/package-manager/src/link_hoisted_modules.rs

lib.rsRename all ERR_PACQUET_* tarball diagnostic codes to ERR_PNPM_* +17/-17

Rename all ERR_PACQUET_* tarball diagnostic codes to ERR_PNPM_*

• Renames the full set of tarball error codes (fetch, checksum, gzip, tar, file, store, task-join, too-large, sibling-fetch, path-traversal, zip, no-offline-tarball) and updates related doc comments.

pnpm/crates/tarball/src/lib.rs

Tests (57) +116 / -120
tests.rsUpdate completion unit tests for pnpm command name +4/-5

Update completion unit tests for pnpm command name

• Adjusts expected error strings and CLI arg fixtures from 'pacquet' to 'pnpm'.

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

add.rsUpdate integration test to spawn the pnpm binary +1/-1

Update integration test to spawn the pnpm binary

• Changes 'Command::cargo_bin("pacquet")' to 'Command::cargo_bin("pnpm")'.

pnpm/crates/cli/tests/add.rs

approve_builds.rsUpdate integration test helper to spawn pnpm binary +1/-1

Update integration test helper to spawn pnpm binary

• Test helper function updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/approve_builds.rs

audit.rsUpdate audit test command helper for pnpm binary name +1/-1

Update audit test command helper for pnpm binary name

• Test helper function 'pacquet_cmd' updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/audit.rs

bin.rsUpdate bin integration test to spawn pnpm binary +1/-1

Update bin integration test to spawn pnpm binary

• Test updated to use 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/bin.rs

bugs.rsUpdate bugs test helper for pnpm binary name +1/-1

Update bugs test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/bugs.rs

cat_index.rsUpdate cat-index tests to spawn pnpm binary +3/-3

Update cat-index tests to spawn pnpm binary

• Multiple test callsites updated to use 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/cat_index.rs

catalog.rsUpdate catalog test helper for pnpm binary name +1/-1

Update catalog test helper for pnpm binary name

• Test helper function updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/catalog.rs

completion.rsUpdate completion integration tests for pnpm command +34/-34

Update completion integration tests for pnpm command

• Updates expected completion markers ('_pnpm_completion', '#compdef pnpm', etc.) and spawns the renamed binary; asserts the fixed error message wording.

pnpm/crates/cli/tests/completion.rs

config_dependencies.rsUpdate config-dependencies test helper for pnpm binary name +1/-1

Update config-dependencies test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/config_dependencies.rs

custom_fetchers.rsUpdate custom-fetchers test helper for pnpm binary name +1/-1

Update custom-fetchers test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/custom_fetchers.rs

custom_resolvers.rsUpdate custom-resolvers test helper for pnpm binary name +1/-1

Update custom-resolvers test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/custom_resolvers.rs

dedupe.rsUpdate dedupe test to spawn pnpm binary +2/-3

Update dedupe test to spawn pnpm binary

• Recreated command for the '--check' invocation now uses 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/dedupe.rs

dedupe_direct_deps.rsUpdate dedupe-direct-deps test helper for pnpm binary name +1/-1

Update dedupe-direct-deps test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/dedupe_direct_deps.rs

dedupe_injected_deps.rsUpdate dedupe-injected-deps tests to spawn pnpm binary +2/-2

Update dedupe-injected-deps tests to spawn pnpm binary

• Two test callsites updated to use 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/dedupe_injected_deps.rs

deploy.rsUpdate deploy test helper for pnpm binary name +1/-1

Update deploy test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/deploy.rs

dist_tag.rsUpdate dist-tag test helper for pnpm binary name +1/-1

Update dist-tag test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/dist_tag.rs

docs.rsUpdate docs test helper for pnpm binary name +1/-1

Update docs test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/docs.rs

dry_run.rsUpdate dry-run test helper for pnpm binary name +1/-1

Update dry-run test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/dry_run.rs

fetch.rsUpdate fetch test helper for pnpm binary name +1/-1

Update fetch test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/fetch.rs

find_hash.rsUpdate find-hash tests to spawn pnpm binary +3/-3

Update find-hash tests to spawn pnpm binary

• Three test callsites updated to use 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/find_hash.rs

global.rsUpdate global tests to spawn pnpm binary +3/-3

Update global tests to spawn pnpm binary

• Multiple test callsites updated to use 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/global.rs

hoisted_node_linker.rsUpdate hoisted-node-linker test helper for pnpm binary name +1/-1

Update hoisted-node-linker test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/hoisted_node_linker.rs

install.rsUpdate install tests to spawn pnpm binary +6/-8

Update install tests to spawn pnpm binary

• Multiple test callsites updated to use 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/install.rs

lifecycle_scripts.rsUpdate lifecycle-scripts test to spawn pnpm binary +1/-1

Update lifecycle-scripts test to spawn pnpm binary

• Test callsite updated to use 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/lifecycle_scripts.rs

list.rsUpdate list test to spawn pnpm binary +1/-1

Update list test to spawn pnpm binary

• Test callsite updated to use 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/list.rs

lockfile_only.rsUpdate lockfile-only test helper for pnpm binary name +1/-1

Update lockfile-only test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/lockfile_only.rs

lockfile_resolution_reuse.rsUpdate lockfile-resolution-reuse test helper for pnpm binary name +1/-1

Update lockfile-resolution-reuse test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/lockfile_resolution_reuse.rs

outdated.rsUpdate outdated test helper for pnpm binary name +1/-1

Update outdated test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/outdated.rs

patch.rsUpdate patch test helper for pnpm binary name +1/-1

Update patch test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/patch.rs

ping.rsUpdate ping test helper for pnpm binary name +1/-1

Update ping test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/ping.rs

pnpr_install.rsUpdate pnpr-install test helper for pnpm binary name +1/-1

Update pnpr-install test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/pnpr_install.rs

pnpx_alias.rsUpdate pnpx-alias test to use renamed CARGO_BIN_EXE env var +1/-1

Update pnpx-alias test to use renamed CARGO_BIN_EXE env var

• Switches from 'CARGO_BIN_EXE_pacquet' to 'CARGO_BIN_EXE_pnpm'.

pnpm/crates/cli/tests/pnpx_alias.rs

prefix.rsUpdate prefix tests to spawn pnpm binary +3/-3

Update prefix tests to spawn pnpm binary

• Multiple test callsites updated to use 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/prefix.rs

publish.rsUpdate publish test helper for pnpm binary name +1/-1

Update publish test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/publish.rs

remove.rsUpdate remove test helper for pnpm binary name +1/-1

Update remove test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/remove.rs

repo.rsUpdate repo test helper for pnpm binary name +1/-1

Update repo test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/repo.rs

root.rsUpdate root test to spawn pnpm binary +1/-1

Update root test to spawn pnpm binary

• Test callsite updated to use 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/root.rs

run.rsUpdate run tests to spawn pnpm binary +2/-2

Update run tests to spawn pnpm binary

• Two test callsites updated to use 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/run.rs

run_recursive.rsUpdate run-recursive test to spawn pnpm binary +1/-1

Update run-recursive test to spawn pnpm binary

• Test callsite updated to use 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/run_recursive.rs

sbom.rsUpdate SBOM tests to assert pnpm tool identity +3/-3

Update SBOM tests to assert pnpm tool identity

• Assertions updated to expect 'pnpm' as CycloneDX tool name and SPDX creator instead of 'pacquet'.

pnpm/crates/cli/tests/sbom.rs

search.rsUpdate search test helper for pnpm binary name +1/-1

Update search test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/search.rs

set_script.rsUpdate set-script test helper for pnpm binary name +1/-1

Update set-script test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/set_script.rs

side_effects_cache.rsUpdate side-effects-cache test to spawn pnpm binary +1/-1

Update side-effects-cache test to spawn pnpm binary

• Test callsite updated to use 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/side_effects_cache.rs

stale_pin_dedupe.rsUpdate stale-pin-dedupe test helper for pnpm binary name +1/-1

Update stale-pin-dedupe test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/stale_pin_dedupe.rs

store.rsUpdate store tests to spawn pnpm binary +3/-3

Update store tests to spawn pnpm binary

• Multiple test callsites updated to use 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/store.rs

tarball_url_dependency.rsUpdate tarball-url-dependency test helper for pnpm binary name +1/-1

Update tarball-url-dependency test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/tarball_url_dependency.rs

unlink.rsUpdate unlink test to spawn pnpm binary +1/-1

Update unlink test to spawn pnpm binary

• Test callsite updated to use 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/unlink.rs

update.rsUpdate update test helper for pnpm binary name +1/-1

Update update test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/update.rs

verify_deps_before_run.rsUpdate verify-deps-before-run test helper for pnpm binary name +1/-1

Update verify-deps-before-run test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/verify_deps_before_run.rs

version.rsUpdate version tests to assert PNPM_VERSION constant +2/-2

Update version tests to assert PNPM_VERSION constant

• Assertions updated to compare against 'pacquet_config::PNPM_VERSION'.

pnpm/crates/cli/tests/version.rs

whoami.rsUpdate whoami test helper for pnpm binary name +1/-1

Update whoami test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/whoami.rs

why.rsUpdate why test helper for pnpm binary name +1/-1

Update why test helper for pnpm binary name

• Test helper updated to invoke 'cargo_bin("pnpm")'.

pnpm/crates/cli/tests/why.rs

with.rsUpdate with test assertion for PNPM_VERSION constant +1/-1

Update with test assertion for PNPM_VERSION constant

• Assertion updated to compare against 'pacquet_config::PNPM_VERSION'.

pnpm/crates/cli/tests/with.rs

tests.rsUpdate defaults tests for renamed PNPM_VERSION constant +2/-2

Update defaults tests for renamed PNPM_VERSION constant

• Import and usage updated from 'PACQUET_VERSION' to 'PNPM_VERSION'.

pnpm/crates/config/src/defaults/tests.rs

tests.rsUpdate tarball offline-mode test to assert ERR_PNPM code +2/-2

Update tarball offline-mode test to assert ERR_PNPM code

• Assertion and comment updated to reference 'ERR_PNPM_NO_OFFLINE_TARBALL' instead of the old code.

pnpm/crates/tarball/src/tests.rs

bin.rsUpdate shared test-utils command builder for pnpm binary name +1/-1

Update shared test-utils command builder for pnpm binary name

• The 'CommandTempCwd' helper now spawns 'cargo_bin("pnpm")' instead of '"pacquet"'.

pnpm/crates/testing-utils/src/bin.rs

Documentation (3) +4 / -4
README.mdUpdate documented error code from ERR_PACQUET to ERR_PNPM +1/-1

Update documented error code from ERR_PACQUET to ERR_PNPM

• Updates the '--offline' flag documentation to reference the renamed 'ERR_PNPM_NO_OFFLINE_TARBALL' code.

pnpm/crates/cli/README.md

install.rsUpdate doc comment referencing renamed error code +1/-1

Update doc comment referencing renamed error code

• Doc comment now references 'ERR_PNPM_NO_OFFLINE_TARBALL' instead of the old code.

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

README.mdUpdate ecosystem-e2e README build/run instructions for pnpm bin +2/-2

Update ecosystem-e2e README build/run instructions for pnpm bin

• Documentation examples updated to reference '--bin pnpm' and the 'target/release/pnpm' path.

pnpm/tasks/ecosystem-e2e/README.md

Other (5) +14 / -12
ecosystem-e2e.ymlUpdate ecosystem e2e workflow to build/reference pnpm binary +4/-4

Update ecosystem e2e workflow to build/reference pnpm binary

• Build, artifact path, chmod, and harness invocation steps updated to use the 'pnpm' binary name instead of 'pacquet'.

.github/workflows/ecosystem-e2e.yml

pacquet-integrated-benchmark.ymlCache both pnpm and pacquet binary paths for benchmark cache restore +2/-0

Cache both pnpm and pacquet binary paths for benchmark cache restore

• Adds '.../target/release/pnpm' alongside the existing '.../target/release/pacquet' cache path so old and new binary names are both restorable.

.github/workflows/pacquet-integrated-benchmark.yml

pacquet-release-to-npm.ymlRelease workflow builds and ships the pnpm-named binary directly +6/-6

Release workflow builds and ships the pnpm-named binary directly

• Patches 'PNPM_VERSION' instead of 'PACQUET_VERSION', builds with '--bin pnpm', and removes the archive-time rename since the binary is already named 'pnpm'.

.github/workflows/pacquet-release-to-npm.yml

justfileUpdate 'just cli' recipe to run the 'pnpm' bin +1/-1

Update 'just cli' recipe to run the 'pnpm' bin

• Changes 'cargo run --bin pacquet' to 'cargo run --bin pnpm'.

justfile

package.jsonRename 'build:pacquet' npm script to 'build:pnpm' +1/-1

Rename 'build:pacquet' npm script to 'build:pnpm'

• Renames the script and updates its 'cargo build' invocation to target the 'pnpm' bin.

package.json

@qodo-code-review

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

Copy link
Copy Markdown

PR Code Suggestions ✨

Latest suggestions up to 9eb1c7e

Warning

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

CategorySuggestion                                                                                                                                    Impact
Possible issue
Handle compact TOML assignments

Replace split_whitespace() with split_once('=') and trim() to reliably parse
TOML assignments even when spaces around the = are missing.

pnpm/tasks/integrated-benchmark/src/work_env.rs [330-336]

 let has_pnpm_bin = content.lines().any(|line| {
-    let mut parts = line.split_whitespace();
-    parts.next() == Some("name")
-        && parts.next() == Some("=")
-        && parts.next() == Some(r#""pnpm""#)
+    let Some((key, value)) = line.split_once('=') else {
+        return false;
+    };
+    key.trim() == "name" && value.trim() == r#""pnpm""#
 });
 return if has_pnpm_bin { "pnpm" } else { "pacquet" };

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies that split_whitespace is brittle and fails if spaces around = are missing in the TOML file, providing a robust split_once('=') alternative.

Medium
  • More

Previous suggestions

Suggestions up to commit a68e679
CategorySuggestion                                                                                                                                    Impact
Possible issue
Handle compact TOML assignments

Improve the naive TOML parsing for name="pnpm" to be tolerant of missing
whitespace around =.

pnpm/tasks/integrated-benchmark/src/work_env.rs [329-335]

 let has_pnpm_bin = content.lines().any(|line| {
-    let mut parts = line.split_whitespace();
-    parts.next() == Some("name")
-        && parts.next() == Some("=")
-        && parts.next() == Some(r#""pnpm""#)
+    line.split_once('=')
+        .is_some_and(|(key, value)| key.trim() == "name" && value.trim() == r#""pnpm""#)
 });
 return if has_pnpm_bin { "pnpm" } else { "pacquet" };
Suggestion importance[1-10]: 7

__

Why: The current approach is overly strict about whitespace and would fail to match name="pnpm" if Cargo.toml is not strictly formatted with spaces around =.

Medium
Suggestions up to commit a47132e
CategorySuggestion                                                                                                                                    Impact
Possible issue
Append EXE_SUFFIX for binary discovery

Append std::env::consts::EXE_SUFFIX to the binary paths. This correctly resolves
.exe binaries on Windows.

pnpm/tasks/integrated-benchmark/src/work_env.rs [305-313]

 fn client_binary_in(source_dir: &Path) -> PathBuf {
     let release = source_dir.join("target").join("release");
-    let pnpm = release.join("pnpm");
+    let pnpm = release.join(format!("pnpm{}", std::env::consts::EXE_SUFFIX));
     if pnpm.is_file() {
         return pnpm;
     }
-    let pacquet = release.join("pacquet");
+    let pacquet = release.join(format!("pacquet{}", std::env::consts::EXE_SUFFIX));
     if pacquet.is_file() { pacquet } else { pnpm }
 }
Suggestion importance[1-10]: 7

__

Why: Using std::env::consts::EXE_SUFFIX ensures the built binary can be reliably located on Windows runners, where executables receive an .exe extension.

Medium
General
Make binary name matching whitespace-tolerant

Make the Cargo.toml binary name matching fully whitespace-tolerant by removing
all spaces before the comparison.

pnpm/tasks/integrated-benchmark/src/work_env.rs [319-335]

 fn cli_bin_name(revision_repo: &Path) -> &'static str {
     for dir in ["pnpm", "pacquet"] {
         let manifest = revision_repo.join(dir).join("crates").join("cli").join("Cargo.toml");
         if let Ok(content) = fs::read_to_string(&manifest) {
             // Whitespace-tolerant match: taplo pads `name` keys for
             // alignment in some tables.
             let has_pnpm_bin = content.lines().any(|line| {
-                let mut parts = line.split_whitespace();
-                parts.next() == Some("name")
-                    && parts.next() == Some("=")
-                    && parts.next() == Some(r#""pnpm""#)
+                let cleaned = line.replace(|c: char| c.is_whitespace(), "");
+                cleaned.starts_with("name=\"pnpm\"")
             });
             return if has_pnpm_bin { "pnpm" } else { "pacquet" };
         }
     }
     "pnpm"
 }
Suggestion importance[1-10]: 4

__

Why: Stripping whitespace makes the manifest parsing slightly more robust to non-standard formatting, although standard Cargo.toml files usually include spaces.

Low
Include pnpx/pnx in completion alias check

Include pnpx and pnx in the binary name check for completion commands.

pnpm/crates/cli/src/cli_args/completion.rs [188-191]

 if Path::new(first)
     .file_stem()
     .and_then(|name| name.to_str())
-    .is_some_and(|name| name == "pnpm" || name == "pacquet")
+    .is_some_and(|name| matches!(name, "pnpm" | "pacquet" | "pnpx" | "pnx"))
Suggestion importance[1-10]: 3

__

Why: Adding the pnpx and pnx aliases expands support for common pnpm workflows, slightly improving the user experience for completions.

Low

@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: 9

🧹 Nitpick comments (3)
.github/workflows/ecosystem-e2e.yml (1)

44-45: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Stale step name: "Build pacquet and the harness"

The step name still says "pacquet" but the command on line 45 now builds --bin pnpm. Consider updating for clarity.

🔧 Suggested fix
       - name: Build pacquet and the harness
+      - name: Build pnpm and the harness
         run: cargo build --release --bin pnpm --bin ecosystem-e2e
🤖 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 @.github/workflows/ecosystem-e2e.yml around lines 44 - 45, Update the
workflow step name currently labeled “Build pacquet and the harness” to
accurately reference the pnpm binary and ecosystem-e2e harness built by the
cargo command, without changing the build command itself.
pnpm/crates/cli/tests/pnpr_install.rs (1)

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

Expect message "find the pacquet binary" is now misleading

cargo_bin("pnpm") looks up the pnpm binary, but the panic message still says "pacquet." If the lookup fails, this will confuse whoever reads the error.

🔧 Suggested fix
 fn pacquet_at(workspace: &Path) -> Command {
-    Command::cargo_bin("pnpm").expect("find the pacquet binary").with_current_dir(workspace)
+    Command::cargo_bin("pnpm").expect("find the pnpm binary").with_current_dir(workspace)
 }
🤖 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 `@pnpm/crates/cli/tests/pnpr_install.rs` at line 95, Update the expect message
in the pnpm command setup to accurately say “find the pnpm binary” instead of
referring to the obsolete “pacquet” name.
pnpm/crates/cli/tests/list.rs (1)

173-176: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Binary name change is correct; consider updating stale "pacquet" error messages.

The cargo_bin("pnpm") change is correct. However, the error messages on lines 36 and 174 still say "spawn pacquet list" and "find the pacquet binary" respectively, which are now factually incorrect. While the PR objectives note that internal names are intentionally left unchanged, these user-facing test failure messages could confuse developers debugging CI failures.

As per coding guidelines for pnpm/**/*.rs, keep pacquet and the TypeScript pnpm CLI behaviorally identical. As per path instructions referencing pnpm/AGENTS.md, error codes and user-facing messages are part of the behavioral identity contract.

♻️ Optional: update stale error messages
 fn recursive_project_names(pacquet: Command, extra_args: &[&str]) -> BTreeSet<String> {
     let output = pacquet
         .with_arg("-r")
         .with_arg("list")
         .with_args(extra_args)
         .with_arg("--depth")
         .with_arg("-1")
         .with_arg("--json")
         .output()
-        .expect("spawn pacquet list");
+        .expect("spawn pnpm list");
     let changed_project_names = |extra_args: &[&str]| {
         let pacquet = Command::cargo_bin("pnpm")
-            .expect("find the pacquet binary")
+            .expect("find the pnpm binary")
             .with_current_dir(&workspace);
         recursive_project_names(pacquet, &[&["--filter", "[origin/main]"], extra_args].concat())
     };
🤖 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 `@pnpm/crates/cli/tests/list.rs` around lines 173 - 176, Update the stale
expect messages in the list test, including the messages associated with
spawning the list command and locating the binary, to refer to the pnpm binary
instead of pacquet. Preserve the existing cargo_bin("pnpm") behavior and test
logic in recursive_project_names.

Sources: Coding guidelines, 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 @.github/workflows/pacquet-integrated-benchmark.yml:
- Line 200: Update the comment above the cache path addition to state that pnpr
builds may produce either the pnpm or pacquet client binary, while retaining
both cache paths in the workflow.

In `@pnpm/crates/cli/tests/config_dependencies.rs`:
- Line 11: Update the expect message on the Command::cargo_bin("pnpm") call to
refer to finding the pnpm binary instead of the outdated “pacquet” name.

In `@pnpm/crates/cli/tests/dedupe_direct_deps.rs`:
- Line 355: Update the `.expect()` message in the `Command::cargo_bin("pnpm")`
invocation within the dedupe direct dependencies test from “find the pacquet
binary” to “find the pnpm binary” so it matches the requested executable.

In `@pnpm/crates/cli/tests/dry_run.rs`:
- Line 15: Update the stale expect message paired with cargo_bin("pnpm") in the
dry-run test and the corresponding setup code in fetch.rs, lockfile_only.rs, and
remove.rs to reference the pnpm binary instead of “pacquet”.

In `@pnpm/crates/cli/tests/search.rs`:
- Line 15: Update the stale expect message in the search test’s
Command::cargo_bin("pnpm") invocation from “find the pacquet binary” to “find
the pnpm binary,” matching the requested executable.

In `@pnpm/crates/cli/tests/set_script.rs`:
- Line 9: The expect message in the test command setup is misspelled and does
not match the requested binary. Update the expect call associated with
Command::cargo_bin("pnpm") to say "find the pnpm binary" instead of "find the
pacquet binary".

In `@pnpm/crates/cli/tests/side_effects_cache.rs`:
- Around line 79-80: The expect message in the cargo_bin("pnpm") invocation is
misspelled and names the wrong binary. Update the expect call in the
side-effects cache test to say “find the pnpm binary,” matching the command
being located.

In `@pnpm/tasks/ecosystem-e2e/README.md`:
- Around line 47-48: Update the inline comment above the cargo command to say
that pnpm must be built, matching the --bin pnpm argument and the
./target/release/pnpm path.

In `@pnpm/tasks/integrated-benchmark/src/work_env.rs`:
- Around line 305-335: Add regression tests in work_env/tests.rs for
cli_bin_name and client_binary_in using temporary directories. Cover CLI
manifests declaring name = "pnpm" and name = "pacquet" (including both directory
layouts), and verify client_binary_in selects an existing target/release/pnpm
binary, otherwise an existing pacquet binary, with the expected fallback when
neither exists.

---

Nitpick comments:
In @.github/workflows/ecosystem-e2e.yml:
- Around line 44-45: Update the workflow step name currently labeled “Build
pacquet and the harness” to accurately reference the pnpm binary and
ecosystem-e2e harness built by the cargo command, without changing the build
command itself.

In `@pnpm/crates/cli/tests/list.rs`:
- Around line 173-176: Update the stale expect messages in the list test,
including the messages associated with spawning the list command and locating
the binary, to refer to the pnpm binary instead of pacquet. Preserve the
existing cargo_bin("pnpm") behavior and test logic in recursive_project_names.

In `@pnpm/crates/cli/tests/pnpr_install.rs`:
- Line 95: Update the expect message in the pnpm command setup to accurately say
“find the pnpm binary” instead of referring to the obsolete “pacquet” 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: 57b8c9c5-e33f-4cad-8357-4f93dd07c229

📥 Commits

Reviewing files that changed from the base of the PR and between 84e3d3b and a47132e.

📒 Files selected for processing (82)
  • .github/workflows/ecosystem-e2e.yml
  • .github/workflows/pacquet-integrated-benchmark.yml
  • .github/workflows/pacquet-release-to-npm.yml
  • justfile
  • package.json
  • pnpm/crates/cli/Cargo.toml
  • pnpm/crates/cli/README.md
  • pnpm/crates/cli/src/cli_args/cli_command.rs
  • pnpm/crates/cli/src/cli_args/completion.rs
  • pnpm/crates/cli/src/cli_args/completion/tests.rs
  • pnpm/crates/cli/src/cli_args/install.rs
  • pnpm/crates/cli/src/cli_args/sbom.rs
  • pnpm/crates/cli/src/cli_args/self_update.rs
  • pnpm/crates/cli/src/cli_args/setup.rs
  • pnpm/crates/cli/src/cli_args/switch_cli_version.rs
  • pnpm/crates/cli/src/lib.rs
  • pnpm/crates/cli/tests/add.rs
  • pnpm/crates/cli/tests/approve_builds.rs
  • pnpm/crates/cli/tests/audit.rs
  • pnpm/crates/cli/tests/bin.rs
  • pnpm/crates/cli/tests/bugs.rs
  • pnpm/crates/cli/tests/cat_index.rs
  • pnpm/crates/cli/tests/catalog.rs
  • pnpm/crates/cli/tests/completion.rs
  • pnpm/crates/cli/tests/config_dependencies.rs
  • pnpm/crates/cli/tests/custom_fetchers.rs
  • pnpm/crates/cli/tests/custom_resolvers.rs
  • pnpm/crates/cli/tests/dedupe.rs
  • pnpm/crates/cli/tests/dedupe_direct_deps.rs
  • pnpm/crates/cli/tests/dedupe_injected_deps.rs
  • pnpm/crates/cli/tests/deploy.rs
  • pnpm/crates/cli/tests/dist_tag.rs
  • pnpm/crates/cli/tests/docs.rs
  • pnpm/crates/cli/tests/dry_run.rs
  • pnpm/crates/cli/tests/fetch.rs
  • pnpm/crates/cli/tests/find_hash.rs
  • pnpm/crates/cli/tests/global.rs
  • pnpm/crates/cli/tests/hoisted_node_linker.rs
  • pnpm/crates/cli/tests/install.rs
  • pnpm/crates/cli/tests/lifecycle_scripts.rs
  • pnpm/crates/cli/tests/list.rs
  • pnpm/crates/cli/tests/lockfile_only.rs
  • pnpm/crates/cli/tests/lockfile_resolution_reuse.rs
  • pnpm/crates/cli/tests/outdated.rs
  • pnpm/crates/cli/tests/patch.rs
  • pnpm/crates/cli/tests/ping.rs
  • pnpm/crates/cli/tests/pnpr_install.rs
  • pnpm/crates/cli/tests/pnpx_alias.rs
  • pnpm/crates/cli/tests/prefix.rs
  • pnpm/crates/cli/tests/publish.rs
  • pnpm/crates/cli/tests/remove.rs
  • pnpm/crates/cli/tests/repo.rs
  • pnpm/crates/cli/tests/root.rs
  • pnpm/crates/cli/tests/run.rs
  • pnpm/crates/cli/tests/run_recursive.rs
  • pnpm/crates/cli/tests/sbom.rs
  • pnpm/crates/cli/tests/search.rs
  • pnpm/crates/cli/tests/set_script.rs
  • pnpm/crates/cli/tests/side_effects_cache.rs
  • pnpm/crates/cli/tests/stale_pin_dedupe.rs
  • pnpm/crates/cli/tests/store.rs
  • pnpm/crates/cli/tests/tarball_url_dependency.rs
  • pnpm/crates/cli/tests/unlink.rs
  • pnpm/crates/cli/tests/update.rs
  • pnpm/crates/cli/tests/verify_deps_before_run.rs
  • pnpm/crates/cli/tests/version.rs
  • pnpm/crates/cli/tests/whoami.rs
  • pnpm/crates/cli/tests/why.rs
  • pnpm/crates/cli/tests/with.rs
  • pnpm/crates/config/src/defaults.rs
  • pnpm/crates/config/src/defaults/tests.rs
  • pnpm/crates/config/src/lib.rs
  • pnpm/crates/napi/src/lib.rs
  • pnpm/crates/napi/src/pack.rs
  • pnpm/crates/package-manager/src/build_modules.rs
  • pnpm/crates/package-manager/src/hoisted_dep_graph.rs
  • pnpm/crates/package-manager/src/link_hoisted_modules.rs
  • pnpm/crates/tarball/src/lib.rs
  • pnpm/crates/tarball/src/tests.rs
  • pnpm/crates/testing-utils/src/bin.rs
  • pnpm/tasks/ecosystem-e2e/README.md
  • pnpm/tasks/integrated-benchmark/src/work_env.rs

Comment thread pnpm/crates/cli/tests/dry_run.rs Resolved
Comment thread pnpm/crates/cli/tests/search.rs Resolved
Comment thread pnpm/crates/cli/tests/set_script.rs Resolved
Comment thread pnpm/tasks/ecosystem-e2e/README.md Resolved
Copilot AI review requested due to automatic review settings July 10, 2026 22:11
@zkochan
zkochan force-pushed the refactor/pnpm-bin-and-error-codes branch from a47132e to a68e679 Compare July 10, 2026 22:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@zkochan

zkochan commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

Rebased over latest main (the conflict was with #12918's staged-archive fix — resolved keeping the scratch-dir approach, with the source path now target/<target>/release/pnpm since cargo outputs the final name) and addressed the review findings:

Qodo — stale-binary bug (valid, fixed): bench dirs are keyed by revision label, so a moving label (e.g. pnpr@main) crossing the rename could leave both pnpm and pacquet in target/release, and existence-preference could pick the stale one. The build fns now delete the sibling-named binary after every build, and the pnpr-copy path names its destination after the source binary. Covered by the invariant note on client_binary_in.

Qodo — historical comments (fixed): reworded to state the current constraint (revisions disagree on the bin name) rather than the rename transition.

Qodo — hand-parsed TOML (declined): the workspace has no TOML-parser crate anywhere in its dependency tree, and adding one for a single boolean probe in the benchmark harness isn't worth the dependency. The probe now carries a comment documenting that tradeoff.

CodeRabbit: all 56 stale find the pacquet binary expect messages fixed; ecosystem-e2e step name + README comment fixed; the benchmark cache-path comment now describes the dual-name reality; regression tests added for cli_bin_name (both layouts, padded keys, missing-manifest default) and client_binary_in (old-only, both-present, neither).

Validated: cargo check --all-targets on the touched crates, all 26 integrated-benchmark tests pass (including the two new ones), fmt/typos/workflow-YAML clean.

🤖 Generated with Claude Code

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

🧹 Nitpick comments (1)
pnpm/tasks/integrated-benchmark/src/work_env/tests.rs (1)

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

Use tempfile::TempDir for these test directories. This crate doesn’t currently depend on tempfile, so add it as a dev-dependency if you want automatic cleanup on panic.

🤖 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 `@pnpm/tasks/integrated-benchmark/src/work_env/tests.rs` around lines 288 -
340, Replace the manually constructed temp paths and cleanup calls in
cli_bin_name_reads_the_declared_bin_from_either_layout and
client_binary_in_prefers_the_existing_binary with tempfile::TempDir instances,
using each TempDir path as the test root. Add tempfile as a dev-dependency for
this crate, and rely on TempDir’s automatic cleanup instead of
fs::remove_dir_all.

Source: Coding guidelines

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

Nitpick comments:
In `@pnpm/tasks/integrated-benchmark/src/work_env/tests.rs`:
- Around line 288-340: Replace the manually constructed temp paths and cleanup
calls in cli_bin_name_reads_the_declared_bin_from_either_layout and
client_binary_in_prefers_the_existing_binary with tempfile::TempDir instances,
using each TempDir path as the test root. Add tempfile as a dev-dependency for
this crate, and rely on TempDir’s automatic cleanup instead of
fs::remove_dir_all.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 10a99237-5ce1-4044-aa81-a4e7fcaf96e1

📥 Commits

Reviewing files that changed from the base of the PR and between a47132e and a68e679.

📒 Files selected for processing (83)
  • .github/workflows/ecosystem-e2e.yml
  • .github/workflows/pacquet-integrated-benchmark.yml
  • .github/workflows/pacquet-release-to-npm.yml
  • justfile
  • package.json
  • pnpm/crates/cli/Cargo.toml
  • pnpm/crates/cli/README.md
  • pnpm/crates/cli/src/cli_args/cli_command.rs
  • pnpm/crates/cli/src/cli_args/completion.rs
  • pnpm/crates/cli/src/cli_args/completion/tests.rs
  • pnpm/crates/cli/src/cli_args/install.rs
  • pnpm/crates/cli/src/cli_args/sbom.rs
  • pnpm/crates/cli/src/cli_args/self_update.rs
  • pnpm/crates/cli/src/cli_args/setup.rs
  • pnpm/crates/cli/src/cli_args/switch_cli_version.rs
  • pnpm/crates/cli/src/lib.rs
  • pnpm/crates/cli/tests/add.rs
  • pnpm/crates/cli/tests/approve_builds.rs
  • pnpm/crates/cli/tests/audit.rs
  • pnpm/crates/cli/tests/bin.rs
  • pnpm/crates/cli/tests/bugs.rs
  • pnpm/crates/cli/tests/cat_index.rs
  • pnpm/crates/cli/tests/catalog.rs
  • pnpm/crates/cli/tests/completion.rs
  • pnpm/crates/cli/tests/config_dependencies.rs
  • pnpm/crates/cli/tests/custom_fetchers.rs
  • pnpm/crates/cli/tests/custom_resolvers.rs
  • pnpm/crates/cli/tests/dedupe.rs
  • pnpm/crates/cli/tests/dedupe_direct_deps.rs
  • pnpm/crates/cli/tests/dedupe_injected_deps.rs
  • pnpm/crates/cli/tests/deploy.rs
  • pnpm/crates/cli/tests/dist_tag.rs
  • pnpm/crates/cli/tests/docs.rs
  • pnpm/crates/cli/tests/dry_run.rs
  • pnpm/crates/cli/tests/fetch.rs
  • pnpm/crates/cli/tests/find_hash.rs
  • pnpm/crates/cli/tests/global.rs
  • pnpm/crates/cli/tests/hoisted_node_linker.rs
  • pnpm/crates/cli/tests/install.rs
  • pnpm/crates/cli/tests/lifecycle_scripts.rs
  • pnpm/crates/cli/tests/list.rs
  • pnpm/crates/cli/tests/lockfile_only.rs
  • pnpm/crates/cli/tests/lockfile_resolution_reuse.rs
  • pnpm/crates/cli/tests/outdated.rs
  • pnpm/crates/cli/tests/patch.rs
  • pnpm/crates/cli/tests/ping.rs
  • pnpm/crates/cli/tests/pnpr_install.rs
  • pnpm/crates/cli/tests/pnpx_alias.rs
  • pnpm/crates/cli/tests/prefix.rs
  • pnpm/crates/cli/tests/publish.rs
  • pnpm/crates/cli/tests/remove.rs
  • pnpm/crates/cli/tests/repo.rs
  • pnpm/crates/cli/tests/root.rs
  • pnpm/crates/cli/tests/run.rs
  • pnpm/crates/cli/tests/run_recursive.rs
  • pnpm/crates/cli/tests/sbom.rs
  • pnpm/crates/cli/tests/search.rs
  • pnpm/crates/cli/tests/set_script.rs
  • pnpm/crates/cli/tests/side_effects_cache.rs
  • pnpm/crates/cli/tests/stale_pin_dedupe.rs
  • pnpm/crates/cli/tests/store.rs
  • pnpm/crates/cli/tests/tarball_url_dependency.rs
  • pnpm/crates/cli/tests/unlink.rs
  • pnpm/crates/cli/tests/update.rs
  • pnpm/crates/cli/tests/verify_deps_before_run.rs
  • pnpm/crates/cli/tests/version.rs
  • pnpm/crates/cli/tests/whoami.rs
  • pnpm/crates/cli/tests/why.rs
  • pnpm/crates/cli/tests/with.rs
  • pnpm/crates/config/src/defaults.rs
  • pnpm/crates/config/src/defaults/tests.rs
  • pnpm/crates/config/src/lib.rs
  • pnpm/crates/napi/src/lib.rs
  • pnpm/crates/napi/src/pack.rs
  • pnpm/crates/package-manager/src/build_modules.rs
  • pnpm/crates/package-manager/src/hoisted_dep_graph.rs
  • pnpm/crates/package-manager/src/link_hoisted_modules.rs
  • pnpm/crates/tarball/src/lib.rs
  • pnpm/crates/tarball/src/tests.rs
  • pnpm/crates/testing-utils/src/bin.rs
  • pnpm/tasks/ecosystem-e2e/README.md
  • pnpm/tasks/integrated-benchmark/src/work_env.rs
  • pnpm/tasks/integrated-benchmark/src/work_env/tests.rs
✅ Files skipped from review due to trivial changes (12)
  • pnpm/crates/cli/Cargo.toml
  • pnpm/crates/cli/README.md
  • pnpm/tasks/ecosystem-e2e/README.md
  • pnpm/crates/cli/tests/find_hash.rs
  • pnpm/crates/cli/tests/bugs.rs
  • pnpm/crates/cli/src/cli_args/install.rs
  • pnpm/crates/cli/tests/unlink.rs
  • pnpm/crates/cli/tests/fetch.rs
  • pnpm/crates/cli/tests/add.rs
  • pnpm/crates/cli/src/lib.rs
  • pnpm/crates/cli/tests/lifecycle_scripts.rs
  • pnpm/crates/cli/src/cli_args/completion/tests.rs
🚧 Files skipped from review as they are similar to previous changes (70)
  • pnpm/crates/cli/tests/ping.rs
  • pnpm/crates/cli/tests/pnpx_alias.rs
  • pnpm/crates/cli/tests/patch.rs
  • pnpm/crates/napi/src/lib.rs
  • pnpm/crates/cli/tests/hoisted_node_linker.rs
  • pnpm/crates/cli/src/cli_args/cli_command.rs
  • pnpm/crates/cli/tests/deploy.rs
  • pnpm/crates/cli/tests/whoami.rs
  • pnpm/crates/cli/tests/why.rs
  • pnpm/crates/cli/tests/docs.rs
  • pnpm/crates/cli/tests/pnpr_install.rs
  • pnpm/crates/cli/tests/run_recursive.rs
  • pnpm/crates/cli/tests/publish.rs
  • pnpm/crates/cli/tests/dry_run.rs
  • pnpm/crates/cli/tests/set_script.rs
  • pnpm/crates/cli/tests/config_dependencies.rs
  • pnpm/crates/package-manager/src/hoisted_dep_graph.rs
  • pnpm/crates/cli/tests/repo.rs
  • pnpm/crates/cli/tests/dedupe_injected_deps.rs
  • pnpm/crates/napi/src/pack.rs
  • pnpm/crates/cli/tests/custom_fetchers.rs
  • pnpm/crates/cli/tests/cat_index.rs
  • pnpm/crates/cli/tests/lockfile_resolution_reuse.rs
  • pnpm/crates/cli/tests/dedupe_direct_deps.rs
  • pnpm/crates/cli/tests/version.rs
  • pnpm/crates/config/src/defaults.rs
  • pnpm/crates/cli/tests/run.rs
  • .github/workflows/pacquet-integrated-benchmark.yml
  • pnpm/crates/cli/tests/custom_resolvers.rs
  • pnpm/crates/cli/tests/update.rs
  • pnpm/crates/cli/tests/audit.rs
  • pnpm/crates/cli/tests/list.rs
  • pnpm/crates/cli/tests/side_effects_cache.rs
  • pnpm/crates/cli/tests/lockfile_only.rs
  • pnpm/crates/cli/tests/outdated.rs
  • pnpm/crates/cli/tests/verify_deps_before_run.rs
  • pnpm/crates/cli/tests/store.rs
  • pnpm/crates/cli/tests/with.rs
  • pnpm/crates/cli/tests/tarball_url_dependency.rs
  • pnpm/crates/cli/tests/bin.rs
  • pnpm/crates/cli/tests/root.rs
  • .github/workflows/ecosystem-e2e.yml
  • pnpm/crates/cli/tests/search.rs
  • pnpm/crates/testing-utils/src/bin.rs
  • pnpm/crates/cli/tests/install.rs
  • pnpm/crates/cli/tests/approve_builds.rs
  • pnpm/crates/cli/tests/dist_tag.rs
  • pnpm/crates/package-manager/src/build_modules.rs
  • pnpm/crates/cli/tests/remove.rs
  • pnpm/crates/cli/src/cli_args/sbom.rs
  • pnpm/crates/package-manager/src/link_hoisted_modules.rs
  • pnpm/crates/config/src/lib.rs
  • pnpm/crates/cli/tests/stale_pin_dedupe.rs
  • pnpm/crates/cli/tests/sbom.rs
  • pnpm/crates/cli/src/cli_args/self_update.rs
  • justfile
  • pnpm/crates/tarball/src/lib.rs
  • pnpm/crates/tarball/src/tests.rs
  • package.json
  • pnpm/crates/cli/tests/dedupe.rs
  • pnpm/crates/cli/tests/prefix.rs
  • pnpm/crates/cli/src/cli_args/switch_cli_version.rs
  • pnpm/crates/cli/src/cli_args/setup.rs
  • pnpm/crates/config/src/defaults/tests.rs
  • .github/workflows/pacquet-release-to-npm.yml
  • pnpm/crates/cli/tests/global.rs
  • pnpm/crates/cli/tests/catalog.rs
  • pnpm/crates/cli/src/cli_args/completion.rs
  • pnpm/tasks/integrated-benchmark/src/work_env.rs
  • pnpm/crates/cli/tests/completion.rs

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit a68e679

@github-actions

github-actions Bot commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                          main                                   pr
-----                          ----                                   --
tarball/download_dependency    1.00      6.5±0.14ms   672.3 KB/sec    1.00      6.4±0.04ms   675.3 KB/sec

@github-actions

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: a68e6791fd62

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 4.201 ± 0.124 4.048 4.438 1.98 ± 0.12
pacquet@main 4.109 ± 0.099 3.988 4.295 1.94 ± 0.11
pnpr@HEAD 2.210 ± 0.112 2.046 2.364 1.04 ± 0.08
pnpr@main 2.123 ± 0.110 2.000 2.361 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.2007842927,
      "stddev": 0.12373944233679189,
      "median": 4.157438109099999,
      "user": 3.9372324199999995,
      "system": 3.5462837200000004,
      "min": 4.0483159381,
      "max": 4.4378299771,
      "times": [
        4.4378299771,
        4.186595457099999,
        4.3650944770999995,
        4.131418913099999,
        4.183457305099999,
        4.1308248311,
        4.2875596831,
        4.1135064261,
        4.1232399190999995,
        4.0483159381
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.108977233100001,
      "stddev": 0.09927215507823071,
      "median": 4.090435316599999,
      "user": 3.8806353199999997,
      "system": 3.53857202,
      "min": 3.9875937461000004,
      "max": 4.295048459099999,
      "times": [
        4.152905060099999,
        4.085446977099999,
        4.0483592611,
        4.295048459099999,
        4.1519417201,
        4.2302535421,
        3.9875937461000004,
        4.0954236560999995,
        4.0448859111,
        3.9979139981
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 2.2098445087000003,
      "stddev": 0.1121180559312941,
      "median": 2.1846163581000004,
      "user": 2.64820762,
      "system": 3.05805972,
      "min": 2.0460359951,
      "max": 2.3638492101,
      "times": [
        2.1509195501000002,
        2.3167492211000003,
        2.1538166801000003,
        2.2688869391,
        2.3580589551,
        2.2154160361,
        2.1073030631000003,
        2.0460359951,
        2.1174094371,
        2.3638492101
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 2.1225186897999997,
      "stddev": 0.1098381704065599,
      "median": 2.0810005246000003,
      "user": 2.70279862,
      "system": 3.0694493200000004,
      "min": 2.0001481801,
      "max": 2.3605377681,
      "times": [
        2.0445089011,
        2.0495808041,
        2.0514194601,
        2.0001481801,
        2.2256415781,
        2.0610738511,
        2.1349274261,
        2.3605377681,
        2.1009271981,
        2.1964217311
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 676.9 ± 13.0 661.9 698.7 1.00
pacquet@main 677.8 ± 8.3 664.3 691.5 1.00 ± 0.02
pnpr@HEAD 753.0 ± 87.7 700.9 1000.3 1.11 ± 0.13
pnpr@main 765.9 ± 95.4 709.8 1033.6 1.13 ± 0.14
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.67691931394,
      "stddev": 0.012994610638517127,
      "median": 0.6736322800400001,
      "user": 0.39947476000000004,
      "system": 1.36208076,
      "min": 0.66191170454,
      "max": 0.69866346754,
      "times": [
        0.66761164454,
        0.66191170454,
        0.69822090954,
        0.68284137554,
        0.66574921454,
        0.69866346754,
        0.67852029254,
        0.67010462254,
        0.67715993754,
        0.6684099705400001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.67775480184,
      "stddev": 0.008292804078374695,
      "median": 0.6779301980400001,
      "user": 0.41413365999999996,
      "system": 1.3622445600000002,
      "min": 0.66428613254,
      "max": 0.6914980135400001,
      "times": [
        0.66428613254,
        0.6914980135400001,
        0.67222870254,
        0.67102382854,
        0.67227425854,
        0.6802980535400001,
        0.6889163955400001,
        0.67809282654,
        0.68116223754,
        0.6777675695400001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.7530397783399999,
      "stddev": 0.08765660097064937,
      "median": 0.7284898345399999,
      "user": 0.42387976,
      "system": 1.3886470599999998,
      "min": 0.70088560454,
      "max": 1.00030933254,
      "times": [
        0.72530187954,
        0.7433740855400001,
        0.73637612854,
        0.71476839254,
        0.73006282554,
        0.73036566354,
        0.72691684354,
        0.70088560454,
        1.00030933254,
        0.72203702754
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.76594677364,
      "stddev": 0.09538839146288706,
      "median": 0.74291650204,
      "user": 0.43823596,
      "system": 1.38459536,
      "min": 0.70983159454,
      "max": 1.03358504654,
      "times": [
        0.71370429754,
        0.74855511454,
        0.70983159454,
        0.74509318154,
        0.74073982254,
        0.7310593495400001,
        0.75165322754,
        1.03358504654,
        0.75843301454,
        0.7268130875400001
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.342 ± 0.057 4.238 4.424 1.97 ± 0.09
pacquet@main 4.314 ± 0.034 4.270 4.386 1.96 ± 0.09
pnpr@HEAD 2.245 ± 0.121 2.071 2.425 1.02 ± 0.07
pnpr@main 2.206 ± 0.101 2.054 2.366 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.342443086499999,
      "stddev": 0.0569436386916842,
      "median": 4.3341125306,
      "user": 3.8187321599999997,
      "system": 3.46977748,
      "min": 4.2379014926,
      "max": 4.4242549966,
      "times": [
        4.3969640586,
        4.4242549966,
        4.4150904446,
        4.2379014926,
        4.3184436236,
        4.3244522466,
        4.3438662076,
        4.3295512916,
        4.2952327336,
        4.3386737696
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.314298509800001,
      "stddev": 0.03439128124908716,
      "median": 4.3147614456,
      "user": 3.845364459999999,
      "system": 3.4171084799999996,
      "min": 4.2698396346,
      "max": 4.3859652986,
      "times": [
        4.2992100836,
        4.3166625336,
        4.3128603576,
        4.2898451996,
        4.3168919116,
        4.3859652986,
        4.3378873236,
        4.2698396346,
        4.3387433006,
        4.2750794546
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 2.2450154125,
      "stddev": 0.12061172350185072,
      "median": 2.2326371146,
      "user": 2.52840586,
      "system": 2.9626061799999994,
      "min": 2.0707227716,
      "max": 2.4253259486,
      "times": [
        2.1540116346,
        2.3609999696,
        2.1523621396,
        2.3720708675999997,
        2.4253259486,
        2.0707227716,
        2.2942975286,
        2.1709767006,
        2.1445789326,
        2.3048076316
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 2.2056561996000004,
      "stddev": 0.10085686027060058,
      "median": 2.1911385146,
      "user": 2.54754526,
      "system": 2.95833828,
      "min": 2.0541048226,
      "max": 2.3660979206,
      "times": [
        2.0541048226,
        2.3204176616,
        2.2092914766,
        2.2778124926,
        2.1729855526,
        2.1555452595999998,
        2.2539339666,
        2.1728749656,
        2.0734978776,
        2.3660979206
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.417 ± 0.017 1.385 1.447 2.01 ± 0.15
pacquet@main 1.431 ± 0.067 1.382 1.617 2.03 ± 0.18
pnpr@HEAD 0.704 ± 0.053 0.675 0.852 1.00
pnpr@main 0.721 ± 0.071 0.691 0.923 1.02 ± 0.13
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.4174539971199998,
      "stddev": 0.01696641013384423,
      "median": 1.41969702142,
      "user": 1.3598571600000002,
      "system": 1.75312054,
      "min": 1.38478109892,
      "max": 1.44681355292,
      "times": [
        1.42351720192,
        1.38478109892,
        1.42213439692,
        1.4007289649199999,
        1.4104351449199999,
        1.43319131192,
        1.42022560892,
        1.41916843392,
        1.41354425592,
        1.44681355292
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.43127487262,
      "stddev": 0.0674382631366562,
      "median": 1.4132088184199998,
      "user": 1.3944588599999999,
      "system": 1.7394867399999998,
      "min": 1.38215396892,
      "max": 1.61741427892,
      "times": [
        1.61741427892,
        1.38215396892,
        1.3990307469199998,
        1.4322819999199998,
        1.40902237792,
        1.40244568692,
        1.43561105592,
        1.4203702089199999,
        1.4173952589199998,
        1.39702314292
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.7038996657200001,
      "stddev": 0.05256918337957157,
      "median": 0.68763992242,
      "user": 0.34827485999999996,
      "system": 1.3265256399999998,
      "min": 0.67474941292,
      "max": 0.8515766289200001,
      "times": [
        0.67474941292,
        0.6944742769200001,
        0.8515766289200001,
        0.70276741692,
        0.6871081789200001,
        0.6848747969200001,
        0.6843851269200001,
        0.68817166592,
        0.6946657809200001,
        0.67622337192
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.7205340577200001,
      "stddev": 0.07134516939370132,
      "median": 0.6986567269200001,
      "user": 0.36969266,
      "system": 1.30790224,
      "min": 0.6908759079200001,
      "max": 0.92311473992,
      "times": [
        0.6908759079200001,
        0.6938396709200001,
        0.6988806469200001,
        0.70191871892,
        0.6944052859200001,
        0.70495098292,
        0.6984328069200001,
        0.6938705899200001,
        0.70505122692,
        0.92311473992
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 3.097 ± 0.031 3.067 3.182 4.61 ± 0.07
pacquet@main 3.154 ± 0.066 3.086 3.332 4.69 ± 0.11
pnpr@HEAD 0.672 ± 0.007 0.656 0.680 1.00
pnpr@main 0.723 ± 0.075 0.686 0.933 1.08 ± 0.11
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 3.0968463008800002,
      "stddev": 0.031488877799632435,
      "median": 3.0891915061799997,
      "user": 1.8501849,
      "system": 1.9809210199999998,
      "min": 3.06740229418,
      "max": 3.1815206891799996,
      "times": [
        3.09323581618,
        3.0984152041799997,
        3.1039579381799998,
        3.07909750418,
        3.0921517391799997,
        3.08365459418,
        3.0862312731799997,
        3.08279595618,
        3.1815206891799996,
        3.06740229418
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 3.1540733395799996,
      "stddev": 0.06617054597110252,
      "median": 3.1413176201799997,
      "user": 1.8485029000000002,
      "system": 2.04729552,
      "min": 3.0858267481799997,
      "max": 3.33241610918,
      "times": [
        3.1616610271799996,
        3.13447432118,
        3.14479148018,
        3.0858267481799997,
        3.1330672311799996,
        3.11353637218,
        3.15232486618,
        3.33241610918,
        3.14239140118,
        3.1402438391799996
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.67179515378,
      "stddev": 0.007067837672906956,
      "median": 0.6726671211800002,
      "user": 0.3559157,
      "system": 1.28234462,
      "min": 0.6560233441800001,
      "max": 0.6795600031800001,
      "times": [
        0.6665291951800001,
        0.67866335418,
        0.6771844571800001,
        0.6693516031800001,
        0.6699566491800001,
        0.6701078531800001,
        0.6560233441800001,
        0.6795600031800001,
        0.6752263891800001,
        0.67534868918
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.72316888508,
      "stddev": 0.07452194892596964,
      "median": 0.69864147168,
      "user": 0.38554659999999996,
      "system": 1.30393612,
      "min": 0.68571067318,
      "max": 0.9329992061800001,
      "times": [
        0.70944662118,
        0.69370785818,
        0.6882253341800001,
        0.70138603018,
        0.71162299918,
        0.6930243811800001,
        0.69589691318,
        0.68571067318,
        0.9329992061800001,
        0.71966883418
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 652.8 ± 18.9 623.9 681.0 5.87 ± 0.21
pacquet@main 649.1 ± 13.6 625.5 670.2 5.84 ± 0.17
pnpr@HEAD 111.2 ± 2.2 107.6 115.8 1.00
pnpr@main 111.7 ± 1.9 107.2 113.5 1.01 ± 0.03
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.65281891784,
      "stddev": 0.018934144074724674,
      "median": 0.65107055174,
      "user": 0.62053414,
      "system": 0.1564172,
      "min": 0.6238806892400001,
      "max": 0.68102214924,
      "times": [
        0.65515639724,
        0.63609647924,
        0.64719130524,
        0.6238806892400001,
        0.64543618024,
        0.63647595224,
        0.68102214924,
        0.66877848624,
        0.65494979824,
        0.67920174124
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.64905285114,
      "stddev": 0.013558287910863137,
      "median": 0.65069297124,
      "user": 0.60977474,
      "system": 0.1641936,
      "min": 0.62554932224,
      "max": 0.67017851724,
      "times": [
        0.63301076724,
        0.62554932224,
        0.64659014024,
        0.65423480924,
        0.65189117224,
        0.63990089724,
        0.64949477024,
        0.65532382324,
        0.67017851724,
        0.66435429224
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.11118133357333333,
      "stddev": 0.0021970753329482004,
      "median": 0.11191146774,
      "user": 0.03058535666666666,
      "system": 0.01939458333333333,
      "min": 0.10758250024,
      "max": 0.11583829724,
      "times": [
        0.11232915024,
        0.11311115824,
        0.11208222724,
        0.10892836624,
        0.11156806224,
        0.10846088124,
        0.10805552724,
        0.11265597324,
        0.11177836324,
        0.10758250024,
        0.10986213924,
        0.11303340224,
        0.11325898124,
        0.11280136724,
        0.11254215024,
        0.10864028924000001,
        0.11184396924000001,
        0.10825731624,
        0.11285708224,
        0.10781898424,
        0.11583829724,
        0.11075976424,
        0.11197896624,
        0.11230708724
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.11174258124000001,
      "stddev": 0.0019232280022251306,
      "median": 0.11255896974,
      "user": 0.029357773333333337,
      "system": 0.01985658333333333,
      "min": 0.10723048524,
      "max": 0.11349946124,
      "times": [
        0.11300746724,
        0.11207316424,
        0.10818333124,
        0.10800371424,
        0.11241471524,
        0.11333957224,
        0.11343949824,
        0.11273032824,
        0.11234613624,
        0.11238480924,
        0.11349946124,
        0.11257060724,
        0.11312531024,
        0.11314668824,
        0.11264396524,
        0.11262332624,
        0.11273508624,
        0.11300700824,
        0.11254733224,
        0.11087627724,
        0.10864472824,
        0.10723048524,
        0.10932063624,
        0.11192830124
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 6.890 ± 0.127 6.762 7.177 1.38 ± 0.03
pacquet@main 6.960 ± 0.139 6.766 7.267 1.39 ± 0.03
pnpr@HEAD 5.002 ± 0.073 4.894 5.113 1.00
pnpr@main 5.166 ± 0.171 4.977 5.507 1.03 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 6.8896933772799995,
      "stddev": 0.12726293265321081,
      "median": 6.89532921978,
      "user": 4.0315279,
      "system": 3.822399500000001,
      "min": 6.76223055778,
      "max": 7.1768373827800005,
      "times": [
        6.7637479137800005,
        7.1768373827800005,
        6.76714479878,
        6.81348075978,
        6.93575222678,
        6.90628808378,
        6.97633736078,
        6.91074433278,
        6.88437035578,
        6.76223055778
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 6.960402339379999,
      "stddev": 0.13887110860405485,
      "median": 6.94581572428,
      "user": 4.058136,
      "system": 3.8278558999999994,
      "min": 6.76642350678,
      "max": 7.26739130478,
      "times": [
        7.26739130478,
        6.8721854037800005,
        7.04288400078,
        6.76642350678,
        6.87670305578,
        7.0211872707800005,
        7.00436139178,
        6.99176618278,
        6.86125601078,
        6.89986526578
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 5.00238025658,
      "stddev": 0.07309669477487166,
      "median": 4.99512865728,
      "user": 2.7714423,
      "system": 3.2517568999999993,
      "min": 4.894296117780001,
      "max": 5.11331496578,
      "times": [
        5.00410552578,
        4.98615178878,
        5.11331496578,
        4.939844931780001,
        5.09999864578,
        5.03834126778,
        5.05520942578,
        4.894296117780001,
        4.943795579780001,
        4.94874431678
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 5.16639821538,
      "stddev": 0.1709256053641383,
      "median": 5.14511578178,
      "user": 2.837981799999999,
      "system": 3.3451844,
      "min": 4.97727492978,
      "max": 5.50699260378,
      "times": [
        5.08691141378,
        5.01518213978,
        4.99719197878,
        4.97727492978,
        5.203320149780001,
        5.32867074178,
        5.05953700678,
        5.2124081457800004,
        5.27649304378,
        5.50699260378
      ]
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/12923
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,342.44 ms
(+1.72%)Baseline: 4,268.93 ms
5,122.72 ms
(84.77%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
3,096.85 ms
(+1.73%)Baseline: 3,044.19 ms
3,653.03 ms
(84.77%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
1,417.45 ms
(+3.73%)Baseline: 1,366.52 ms
1,639.82 ms
(86.44%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
652.82 ms
(+0.30%)Baseline: 650.88 ms
781.05 ms
(83.58%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
4,200.78 ms
(+2.13%)Baseline: 4,113.02 ms
4,935.63 ms
(85.11%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
6,889.69 ms
(-0.99%)Baseline: 6,958.41 ms
8,350.10 ms
(82.51%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
676.92 ms
(+5.68%)Baseline: 640.53 ms
768.63 ms
(88.07%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/12923
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,245.02 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
671.80 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
703.90 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
111.18 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
2,209.84 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
5,002.38 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
753.04 ms
🐰 View full continuous benchmarking report in Bencher

zkochan and others added 2 commits July 11, 2026 01:23
Stage 2a of retiring the pacquet codename — the user-facing surfaces:

- The cargo bin is now `pnpm`, so every build outputs the binary under
  its shipped name and the release workflow no longer renames at
  archive time. `-p pacquet-cli --bin pnpm` until the crate renames
  land (stage 2b).
- The 16 port-original `ERR_PACQUET_*` error codes are now
  `ERR_PNPM_*`, matching the 302 codes already ported as `ERR_PNPM_*`.
  (`PACQUET_VERSION` rides along as `PNPM_VERSION`.)
- Shell completions register for (and invoke) `pnpm` instead of
  `pacquet` — they were broken for v12, which installs the binary as
  `pnpm`. The completion-server still accepts `pacquet` as argv[0] so
  scripts installed by earlier alphas keep working until re-setup.
- SBOM output identifies the tool as `pnpm` (CycloneDX component and
  SPDX creator), matching what v11 emits.

The integrated-benchmark harness builds and runs arbitrary revisions,
which now disagree on the bin name: it detects the name from the
clone's CLI manifest for `--bin=` and resolves the produced binary by
existence (mirroring how the pnpm target resolves its bundle), and the
CI binary-cache paths cover both names.

Co-Authored-By: Claude Fable 5 <[email protected]>
- Delete the sibling-named client binary after each harness build and
  name the pnpr-copy destination after its source, so existence-based
  resolution can never pick a stale executable when a moving revision
  label leaves both names in target/release (Qodo).
- Add regression tests for cli_bin_name and client_binary_in.
- Reword harness comments to state current constraints instead of
  rename history; document why the manifest probe is a line scan (the
  workspace has no TOML-parser dependency).
- Fix 56 stale "find the pacquet binary" expect messages, the
  ecosystem-e2e step name and README comment, and the benchmark cache
  comment (CodeRabbit).

Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot AI review requested due to automatic review settings July 10, 2026 23:25
@zkochan
zkochan force-pushed the refactor/pnpm-bin-and-error-codes branch from a68e679 to 9eb1c7e Compare July 10, 2026 23:25

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 9eb1c7e

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pnpm/crates/cli/tests/stage.rs`:
- Line 1: Update the module documentation comment and all three spawn-related
`.expect()` messages in the stage integration tests to refer to “pnpm stage”
instead of “pacquet stage”, including the occurrences near the test setup and
later stage tests.
🪄 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: d14ea688-e3a8-4359-82c9-8405d5e3aa0c

📥 Commits

Reviewing files that changed from the base of the PR and between a68e679 and 9eb1c7e.

📒 Files selected for processing (84)
  • .github/workflows/ecosystem-e2e.yml
  • .github/workflows/pacquet-integrated-benchmark.yml
  • .github/workflows/pacquet-release-to-npm.yml
  • justfile
  • package.json
  • pnpm/crates/cli/Cargo.toml
  • pnpm/crates/cli/README.md
  • pnpm/crates/cli/src/cli_args/cli_command.rs
  • pnpm/crates/cli/src/cli_args/completion.rs
  • pnpm/crates/cli/src/cli_args/completion/tests.rs
  • pnpm/crates/cli/src/cli_args/install.rs
  • pnpm/crates/cli/src/cli_args/sbom.rs
  • pnpm/crates/cli/src/cli_args/self_update.rs
  • pnpm/crates/cli/src/cli_args/setup.rs
  • pnpm/crates/cli/src/cli_args/switch_cli_version.rs
  • pnpm/crates/cli/src/lib.rs
  • pnpm/crates/cli/tests/add.rs
  • pnpm/crates/cli/tests/approve_builds.rs
  • pnpm/crates/cli/tests/audit.rs
  • pnpm/crates/cli/tests/bin.rs
  • pnpm/crates/cli/tests/bugs.rs
  • pnpm/crates/cli/tests/cat_index.rs
  • pnpm/crates/cli/tests/catalog.rs
  • pnpm/crates/cli/tests/completion.rs
  • pnpm/crates/cli/tests/config_dependencies.rs
  • pnpm/crates/cli/tests/custom_fetchers.rs
  • pnpm/crates/cli/tests/custom_resolvers.rs
  • pnpm/crates/cli/tests/dedupe.rs
  • pnpm/crates/cli/tests/dedupe_direct_deps.rs
  • pnpm/crates/cli/tests/dedupe_injected_deps.rs
  • pnpm/crates/cli/tests/deploy.rs
  • pnpm/crates/cli/tests/dist_tag.rs
  • pnpm/crates/cli/tests/docs.rs
  • pnpm/crates/cli/tests/dry_run.rs
  • pnpm/crates/cli/tests/fetch.rs
  • pnpm/crates/cli/tests/find_hash.rs
  • pnpm/crates/cli/tests/global.rs
  • pnpm/crates/cli/tests/hoisted_node_linker.rs
  • pnpm/crates/cli/tests/install.rs
  • pnpm/crates/cli/tests/lifecycle_scripts.rs
  • pnpm/crates/cli/tests/list.rs
  • pnpm/crates/cli/tests/lockfile_only.rs
  • pnpm/crates/cli/tests/lockfile_resolution_reuse.rs
  • pnpm/crates/cli/tests/outdated.rs
  • pnpm/crates/cli/tests/patch.rs
  • pnpm/crates/cli/tests/ping.rs
  • pnpm/crates/cli/tests/pnpr_install.rs
  • pnpm/crates/cli/tests/pnpx_alias.rs
  • pnpm/crates/cli/tests/prefix.rs
  • pnpm/crates/cli/tests/publish.rs
  • pnpm/crates/cli/tests/remove.rs
  • pnpm/crates/cli/tests/repo.rs
  • pnpm/crates/cli/tests/root.rs
  • pnpm/crates/cli/tests/run.rs
  • pnpm/crates/cli/tests/run_recursive.rs
  • pnpm/crates/cli/tests/sbom.rs
  • pnpm/crates/cli/tests/search.rs
  • pnpm/crates/cli/tests/set_script.rs
  • pnpm/crates/cli/tests/side_effects_cache.rs
  • pnpm/crates/cli/tests/stage.rs
  • pnpm/crates/cli/tests/stale_pin_dedupe.rs
  • pnpm/crates/cli/tests/store.rs
  • pnpm/crates/cli/tests/tarball_url_dependency.rs
  • pnpm/crates/cli/tests/unlink.rs
  • pnpm/crates/cli/tests/update.rs
  • pnpm/crates/cli/tests/verify_deps_before_run.rs
  • pnpm/crates/cli/tests/version.rs
  • pnpm/crates/cli/tests/whoami.rs
  • pnpm/crates/cli/tests/why.rs
  • pnpm/crates/cli/tests/with.rs
  • pnpm/crates/config/src/defaults.rs
  • pnpm/crates/config/src/defaults/tests.rs
  • pnpm/crates/config/src/lib.rs
  • pnpm/crates/napi/src/lib.rs
  • pnpm/crates/napi/src/pack.rs
  • pnpm/crates/package-manager/src/build_modules.rs
  • pnpm/crates/package-manager/src/hoisted_dep_graph.rs
  • pnpm/crates/package-manager/src/link_hoisted_modules.rs
  • pnpm/crates/tarball/src/lib.rs
  • pnpm/crates/tarball/src/tests.rs
  • pnpm/crates/testing-utils/src/bin.rs
  • pnpm/tasks/ecosystem-e2e/README.md
  • pnpm/tasks/integrated-benchmark/src/work_env.rs
  • pnpm/tasks/integrated-benchmark/src/work_env/tests.rs
✅ Files skipped from review due to trivial changes (13)
  • pnpm/crates/package-manager/src/hoisted_dep_graph.rs
  • pnpm/crates/cli/src/cli_args/install.rs
  • pnpm/tasks/ecosystem-e2e/README.md
  • pnpm/crates/cli/tests/dedupe_direct_deps.rs
  • pnpm/crates/package-manager/src/link_hoisted_modules.rs
  • pnpm/crates/cli/tests/run_recursive.rs
  • pnpm/crates/cli/README.md
  • pnpm/crates/cli/tests/dist_tag.rs
  • pnpm/crates/cli/tests/with.rs
  • pnpm/crates/cli/tests/config_dependencies.rs
  • pnpm/crates/cli/src/cli_args/sbom.rs
  • pnpm/crates/cli/tests/run.rs
  • pnpm/crates/config/src/defaults.rs
🚧 Files skipped from review as they are similar to previous changes (70)
  • pnpm/crates/cli/tests/pnpx_alias.rs
  • pnpm/crates/cli/tests/custom_fetchers.rs
  • pnpm/crates/cli/tests/ping.rs
  • pnpm/crates/cli/tests/dry_run.rs
  • pnpm/crates/cli/tests/lockfile_only.rs
  • pnpm/crates/cli/Cargo.toml
  • pnpm/crates/cli/tests/pnpr_install.rs
  • pnpm/crates/cli/tests/deploy.rs
  • pnpm/crates/napi/src/lib.rs
  • pnpm/crates/cli/tests/verify_deps_before_run.rs
  • pnpm/crates/cli/tests/cat_index.rs
  • pnpm/crates/cli/tests/audit.rs
  • pnpm/crates/cli/tests/dedupe_injected_deps.rs
  • pnpm/crates/cli/tests/outdated.rs
  • pnpm/crates/cli/src/lib.rs
  • pnpm/crates/cli/tests/find_hash.rs
  • pnpm/crates/cli/tests/list.rs
  • package.json
  • pnpm/crates/cli/src/cli_args/cli_command.rs
  • pnpm/crates/cli/tests/patch.rs
  • pnpm/crates/cli/tests/approve_builds.rs
  • pnpm/crates/cli/tests/whoami.rs
  • pnpm/crates/package-manager/src/build_modules.rs
  • pnpm/crates/napi/src/pack.rs
  • pnpm/crates/cli/tests/tarball_url_dependency.rs
  • pnpm/crates/cli/tests/remove.rs
  • pnpm/crates/cli/tests/why.rs
  • pnpm/crates/cli/src/cli_args/setup.rs
  • pnpm/crates/cli/tests/bin.rs
  • pnpm/crates/cli/tests/prefix.rs
  • pnpm/crates/cli/tests/add.rs
  • .github/workflows/pacquet-integrated-benchmark.yml
  • pnpm/crates/cli/tests/global.rs
  • pnpm/crates/cli/tests/side_effects_cache.rs
  • pnpm/crates/cli/tests/update.rs
  • pnpm/crates/cli/tests/fetch.rs
  • pnpm/crates/cli/tests/bugs.rs
  • pnpm/crates/cli/tests/lifecycle_scripts.rs
  • pnpm/crates/cli/tests/lockfile_resolution_reuse.rs
  • pnpm/crates/cli/tests/publish.rs
  • pnpm/crates/cli/tests/sbom.rs
  • pnpm/crates/config/src/defaults/tests.rs
  • pnpm/crates/config/src/lib.rs
  • justfile
  • pnpm/crates/cli/tests/catalog.rs
  • pnpm/crates/cli/tests/root.rs
  • pnpm/crates/cli/tests/set_script.rs
  • pnpm/crates/cli/tests/stale_pin_dedupe.rs
  • pnpm/crates/cli/tests/unlink.rs
  • pnpm/crates/cli/tests/search.rs
  • pnpm/crates/tarball/src/tests.rs
  • pnpm/crates/cli/src/cli_args/self_update.rs
  • pnpm/crates/testing-utils/src/bin.rs
  • pnpm/crates/cli/tests/repo.rs
  • pnpm/crates/cli/tests/docs.rs
  • .github/workflows/pacquet-release-to-npm.yml
  • .github/workflows/ecosystem-e2e.yml
  • pnpm/crates/cli/tests/install.rs
  • pnpm/crates/cli/tests/version.rs
  • pnpm/crates/tarball/src/lib.rs
  • pnpm/crates/cli/tests/dedupe.rs
  • pnpm/crates/cli/tests/hoisted_node_linker.rs
  • pnpm/tasks/integrated-benchmark/src/work_env/tests.rs
  • pnpm/crates/cli/src/cli_args/completion/tests.rs
  • pnpm/crates/cli/src/cli_args/switch_cli_version.rs
  • pnpm/crates/cli/tests/store.rs
  • pnpm/crates/cli/src/cli_args/completion.rs
  • pnpm/crates/cli/tests/custom_resolvers.rs
  • pnpm/crates/cli/tests/completion.rs
  • pnpm/tasks/integrated-benchmark/src/work_env.rs

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

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pnpm/crates/cli/tests/stage.rs`:
- Line 1: Update the module documentation comment and all three spawn-related
`.expect()` messages in the stage integration tests to refer to “pnpm stage”
instead of “pacquet stage”, including the occurrences near the test setup and
later stage tests.
🪄 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: d14ea688-e3a8-4359-82c9-8405d5e3aa0c

📥 Commits

Reviewing files that changed from the base of the PR and between a68e679 and 9eb1c7e.

📒 Files selected for processing (84)
  • .github/workflows/ecosystem-e2e.yml
  • .github/workflows/pacquet-integrated-benchmark.yml
  • .github/workflows/pacquet-release-to-npm.yml
  • justfile
  • package.json
  • pnpm/crates/cli/Cargo.toml
  • pnpm/crates/cli/README.md
  • pnpm/crates/cli/src/cli_args/cli_command.rs
  • pnpm/crates/cli/src/cli_args/completion.rs
  • pnpm/crates/cli/src/cli_args/completion/tests.rs
  • pnpm/crates/cli/src/cli_args/install.rs
  • pnpm/crates/cli/src/cli_args/sbom.rs
  • pnpm/crates/cli/src/cli_args/self_update.rs
  • pnpm/crates/cli/src/cli_args/setup.rs
  • pnpm/crates/cli/src/cli_args/switch_cli_version.rs
  • pnpm/crates/cli/src/lib.rs
  • pnpm/crates/cli/tests/add.rs
  • pnpm/crates/cli/tests/approve_builds.rs
  • pnpm/crates/cli/tests/audit.rs
  • pnpm/crates/cli/tests/bin.rs
  • pnpm/crates/cli/tests/bugs.rs
  • pnpm/crates/cli/tests/cat_index.rs
  • pnpm/crates/cli/tests/catalog.rs
  • pnpm/crates/cli/tests/completion.rs
  • pnpm/crates/cli/tests/config_dependencies.rs
  • pnpm/crates/cli/tests/custom_fetchers.rs
  • pnpm/crates/cli/tests/custom_resolvers.rs
  • pnpm/crates/cli/tests/dedupe.rs
  • pnpm/crates/cli/tests/dedupe_direct_deps.rs
  • pnpm/crates/cli/tests/dedupe_injected_deps.rs
  • pnpm/crates/cli/tests/deploy.rs
  • pnpm/crates/cli/tests/dist_tag.rs
  • pnpm/crates/cli/tests/docs.rs
  • pnpm/crates/cli/tests/dry_run.rs
  • pnpm/crates/cli/tests/fetch.rs
  • pnpm/crates/cli/tests/find_hash.rs
  • pnpm/crates/cli/tests/global.rs
  • pnpm/crates/cli/tests/hoisted_node_linker.rs
  • pnpm/crates/cli/tests/install.rs
  • pnpm/crates/cli/tests/lifecycle_scripts.rs
  • pnpm/crates/cli/tests/list.rs
  • pnpm/crates/cli/tests/lockfile_only.rs
  • pnpm/crates/cli/tests/lockfile_resolution_reuse.rs
  • pnpm/crates/cli/tests/outdated.rs
  • pnpm/crates/cli/tests/patch.rs
  • pnpm/crates/cli/tests/ping.rs
  • pnpm/crates/cli/tests/pnpr_install.rs
  • pnpm/crates/cli/tests/pnpx_alias.rs
  • pnpm/crates/cli/tests/prefix.rs
  • pnpm/crates/cli/tests/publish.rs
  • pnpm/crates/cli/tests/remove.rs
  • pnpm/crates/cli/tests/repo.rs
  • pnpm/crates/cli/tests/root.rs
  • pnpm/crates/cli/tests/run.rs
  • pnpm/crates/cli/tests/run_recursive.rs
  • pnpm/crates/cli/tests/sbom.rs
  • pnpm/crates/cli/tests/search.rs
  • pnpm/crates/cli/tests/set_script.rs
  • pnpm/crates/cli/tests/side_effects_cache.rs
  • pnpm/crates/cli/tests/stage.rs
  • pnpm/crates/cli/tests/stale_pin_dedupe.rs
  • pnpm/crates/cli/tests/store.rs
  • pnpm/crates/cli/tests/tarball_url_dependency.rs
  • pnpm/crates/cli/tests/unlink.rs
  • pnpm/crates/cli/tests/update.rs
  • pnpm/crates/cli/tests/verify_deps_before_run.rs
  • pnpm/crates/cli/tests/version.rs
  • pnpm/crates/cli/tests/whoami.rs
  • pnpm/crates/cli/tests/why.rs
  • pnpm/crates/cli/tests/with.rs
  • pnpm/crates/config/src/defaults.rs
  • pnpm/crates/config/src/defaults/tests.rs
  • pnpm/crates/config/src/lib.rs
  • pnpm/crates/napi/src/lib.rs
  • pnpm/crates/napi/src/pack.rs
  • pnpm/crates/package-manager/src/build_modules.rs
  • pnpm/crates/package-manager/src/hoisted_dep_graph.rs
  • pnpm/crates/package-manager/src/link_hoisted_modules.rs
  • pnpm/crates/tarball/src/lib.rs
  • pnpm/crates/tarball/src/tests.rs
  • pnpm/crates/testing-utils/src/bin.rs
  • pnpm/tasks/ecosystem-e2e/README.md
  • pnpm/tasks/integrated-benchmark/src/work_env.rs
  • pnpm/tasks/integrated-benchmark/src/work_env/tests.rs
✅ Files skipped from review due to trivial changes (13)
  • pnpm/crates/package-manager/src/hoisted_dep_graph.rs
  • pnpm/crates/cli/src/cli_args/install.rs
  • pnpm/tasks/ecosystem-e2e/README.md
  • pnpm/crates/cli/tests/dedupe_direct_deps.rs
  • pnpm/crates/package-manager/src/link_hoisted_modules.rs
  • pnpm/crates/cli/tests/run_recursive.rs
  • pnpm/crates/cli/README.md
  • pnpm/crates/cli/tests/dist_tag.rs
  • pnpm/crates/cli/tests/with.rs
  • pnpm/crates/cli/tests/config_dependencies.rs
  • pnpm/crates/cli/src/cli_args/sbom.rs
  • pnpm/crates/cli/tests/run.rs
  • pnpm/crates/config/src/defaults.rs
🚧 Files skipped from review as they are similar to previous changes (70)
  • pnpm/crates/cli/tests/pnpx_alias.rs
  • pnpm/crates/cli/tests/custom_fetchers.rs
  • pnpm/crates/cli/tests/ping.rs
  • pnpm/crates/cli/tests/dry_run.rs
  • pnpm/crates/cli/tests/lockfile_only.rs
  • pnpm/crates/cli/Cargo.toml
  • pnpm/crates/cli/tests/pnpr_install.rs
  • pnpm/crates/cli/tests/deploy.rs
  • pnpm/crates/napi/src/lib.rs
  • pnpm/crates/cli/tests/verify_deps_before_run.rs
  • pnpm/crates/cli/tests/cat_index.rs
  • pnpm/crates/cli/tests/audit.rs
  • pnpm/crates/cli/tests/dedupe_injected_deps.rs
  • pnpm/crates/cli/tests/outdated.rs
  • pnpm/crates/cli/src/lib.rs
  • pnpm/crates/cli/tests/find_hash.rs
  • pnpm/crates/cli/tests/list.rs
  • package.json
  • pnpm/crates/cli/src/cli_args/cli_command.rs
  • pnpm/crates/cli/tests/patch.rs
  • pnpm/crates/cli/tests/approve_builds.rs
  • pnpm/crates/cli/tests/whoami.rs
  • pnpm/crates/package-manager/src/build_modules.rs
  • pnpm/crates/napi/src/pack.rs
  • pnpm/crates/cli/tests/tarball_url_dependency.rs
  • pnpm/crates/cli/tests/remove.rs
  • pnpm/crates/cli/tests/why.rs
  • pnpm/crates/cli/src/cli_args/setup.rs
  • pnpm/crates/cli/tests/bin.rs
  • pnpm/crates/cli/tests/prefix.rs
  • pnpm/crates/cli/tests/add.rs
  • .github/workflows/pacquet-integrated-benchmark.yml
  • pnpm/crates/cli/tests/global.rs
  • pnpm/crates/cli/tests/side_effects_cache.rs
  • pnpm/crates/cli/tests/update.rs
  • pnpm/crates/cli/tests/fetch.rs
  • pnpm/crates/cli/tests/bugs.rs
  • pnpm/crates/cli/tests/lifecycle_scripts.rs
  • pnpm/crates/cli/tests/lockfile_resolution_reuse.rs
  • pnpm/crates/cli/tests/publish.rs
  • pnpm/crates/cli/tests/sbom.rs
  • pnpm/crates/config/src/defaults/tests.rs
  • pnpm/crates/config/src/lib.rs
  • justfile
  • pnpm/crates/cli/tests/catalog.rs
  • pnpm/crates/cli/tests/root.rs
  • pnpm/crates/cli/tests/set_script.rs
  • pnpm/crates/cli/tests/stale_pin_dedupe.rs
  • pnpm/crates/cli/tests/unlink.rs
  • pnpm/crates/cli/tests/search.rs
  • pnpm/crates/tarball/src/tests.rs
  • pnpm/crates/cli/src/cli_args/self_update.rs
  • pnpm/crates/testing-utils/src/bin.rs
  • pnpm/crates/cli/tests/repo.rs
  • pnpm/crates/cli/tests/docs.rs
  • .github/workflows/pacquet-release-to-npm.yml
  • .github/workflows/ecosystem-e2e.yml
  • pnpm/crates/cli/tests/install.rs
  • pnpm/crates/cli/tests/version.rs
  • pnpm/crates/tarball/src/lib.rs
  • pnpm/crates/cli/tests/dedupe.rs
  • pnpm/crates/cli/tests/hoisted_node_linker.rs
  • pnpm/tasks/integrated-benchmark/src/work_env/tests.rs
  • pnpm/crates/cli/src/cli_args/completion/tests.rs
  • pnpm/crates/cli/src/cli_args/switch_cli_version.rs
  • pnpm/crates/cli/tests/store.rs
  • pnpm/crates/cli/src/cli_args/completion.rs
  • pnpm/crates/cli/tests/custom_resolvers.rs
  • pnpm/crates/cli/tests/completion.rs
  • pnpm/tasks/integrated-benchmark/src/work_env.rs
🛑 Comments failed to post (1)
pnpm/crates/cli/tests/stage.rs (1)

1-1: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Update stale "pacquet stage" references to "pnpm stage".

The module doc comment (line 1) says `pacquet stage` integration tests and three .expect() messages (lines 38, 153, 500) say "spawn pacquet stage", but the binary is now pnpm (confirmed by Command::cargo_bin("pnpm") on line 26 and the [[bin]] name = "pnpm" in Cargo.toml). The PR objectives explicitly include "update stale messages and comments" as part of the changes.

✏️ Proposed fix
-//! `pacquet stage` integration tests: drive the real binary end-to-end
+//! `pnpm stage` integration tests: drive the real binary end-to-end
-    pacquet(workspace).with_arg("stage").with_args(args).output().expect("spawn pacquet stage")
+    pacquet(workspace).with_arg("stage").with_args(args).output().expect("spawn pnpm stage")
-        .expect("spawn pacquet stage");
+        .expect("spawn pnpm stage");

(Line 500 has the same .expect("spawn pacquet stage") pattern as line 153.)

Also applies to: 38-38, 153-153, 500-500

🤖 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 `@pnpm/crates/cli/tests/stage.rs` at line 1, Update the module documentation
comment and all three spawn-related `.expect()` messages in the stage
integration tests to refer to “pnpm stage” instead of “pacquet stage”, including
the occurrences near the test setup and later stage tests.

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

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 37.50000% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.44%. Comparing base (6a85968) to head (9eb1c7e).

Files with missing lines Patch % Lines
pnpm/crates/tarball/src/lib.rs 16.66% 10 Missing ⚠️
pnpm/crates/cli/src/cli_args/self_update.rs 0.00% 6 Missing ⚠️
pnpm/crates/cli/src/cli_args/setup.rs 0.00% 1 Missing ⚠️
pnpm/crates/cli/src/cli_args/switch_cli_version.rs 66.66% 1 Missing ⚠️
pnpm/crates/napi/src/lib.rs 0.00% 1 Missing ⚠️
pnpm/crates/napi/src/pack.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #12923   +/-   ##
=======================================
  Coverage   85.43%   85.44%           
=======================================
  Files         474      474           
  Lines       74546    74545    -1     
=======================================
+ Hits        63691    63694    +3     
+ Misses      10855    10851    -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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pacquet product: pnpm@11 reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants