Skip to content

fix(dlx): drop the caller project's patches from the cache install - #13734

Merged
zkochan merged 2 commits into
mainfrom
fix/dlx-drop-caller-patches
Aug 8, 2026
Merged

zkochan merged 2 commits into
mainfrom
fix/dlx-drop-caller-patches

Conversation

@zkochan

@zkochan zkochan commented Aug 8, 2026 •

Copy link
Copy Markdown
Member

Summary

pnpm dlx (and pnpm create, which routes through it) fails in any project that
uses patchedDependencies:

$ pnpm dlx cowsay hi
Error:   × adding a new package
  ╰─▶ Failed to read patch file /home/zoltan/.cache/pnpm/dlx/f35ea02…/mskn61f7-23wx0/__patches__/[email protected]: No such file or directory (os error 2)

The dlx cache install runs with the invoking project's already-loaded config,
which carries patchedDependencies, while its workspace root is anchored to the
throwaway prepare dir. Patch paths are resolved against the workspace root
(Config::resolved_patched_dependencies), so they end up pointing inside the dlx
cache dir, where nothing exists.

pnpm installs the dlx package unpatched — I verified this against the TypeScript
CLI: a pnpm dlx --package=fs-extra … run from this repo (which patches
[email protected]) produces a dlx cache lockfile with no patchedDependencies
and an unpatched graceful-fs. So the cache install now drops the caller's
patches instead of rebasing the paths onto the caller's workspace — the same
treatment overrides, catalogs, and packageExtensions already get in the
global (cli_args::global) and self-update (self_update::install_pnpm)
installs. patchedDependencies is the only remaining workspace_dir-relative
config field, so no other setting needs the same handling.

This is also why CI is red on #13675: this repo patches graceful-fs,
and pn compile-only shells out to pnx, so both TS CI / Compile & Lint and
the integrated benchmark fail there as soon as an affected release is pinned as
packageManager.

TypeScript CLI: no change needed — it already installs dlx packages unpatched
(verified by running the bundle, as described above).

Squash Commit Body

The dlx cache install inherits the invoking project's config, including
`patchedDependencies`, but its workspace root is anchored to the throwaway
prepare dir. Patch paths resolve against that root, so a caller with patches
sent the install looking for them under the dlx cache dir and every
`pnpm dlx` / `pnpm create` from such a project died with "Failed to read
patch file <cache dir>/... (os error 2)". This repo is one such project:
`pn compile-only` runs `pnx`, so TS CI and the integrated benchmark both go
red as soon as an affected release is pinned.

pnpm installs the dlx package unpatched (verified against the TypeScript
CLI: the dlx cache lockfile records no `patchedDependencies`), so the
throwaway install drops them rather than rebasing the paths onto the
caller's workspace — the same treatment `overrides`, `catalogs`, and
`packageExtensions` already get in the global and self-update installs.

Regression test: a dlx run from a project that patches the dlx package
itself must run the unpatched bin. It fails without the fix, on the exact
missing-patch-file error.

Checklist

  • The change is implemented in both the TypeScript CLI and the Rust
    pnpm/ port, or the description notes what still needs porting.
  • Added a changeset (pnpm changeset) if this PR changes any published
    package. Keep it short and written for pnpm users — it becomes a release note.
  • Added or updated tests.

Written by an agent (Claude Code, claude-opus-5[1m]).


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

Summary by CodeRabbit

  • Bug Fixes

    • Fixed pnpm dlx and pnpm create so temporary installations are not affected by patchedDependencies configured in the calling project.
    • Ensured packages run with their original contents when executed through these commands, preventing unexpected patched output.
  • Tests

    • Added regression coverage confirming patched caller projects do not alter dlx execution results.

The dlx cache install inherits the invoking project's config, including
`patchedDependencies`, but its workspace root is anchored to the throwaway
prepare dir. Patch paths resolve against that root, so a caller with
patches sent the install looking for them under the dlx cache dir and
every `pnpm dlx` / `pnpm create` from such a project died with
"Failed to read patch file <cache dir>/... (os error 2)". This repo is one
such project: `pn compile-only` runs `pnx`, so TS CI and the integrated
benchmark both go red as soon as an affected release is pinned.

pnpm installs the dlx package unpatched (verified against the TypeScript
CLI: the dlx cache lockfile records no `patchedDependencies`), so the
throwaway install drops them rather than rebasing the paths onto the
caller's workspace — the same treatment `overrides`, `catalogs`, and
`packageExtensions` already get in the global and self-update installs.

Regression test: a dlx run from a project that patches the dlx package
itself must run the unpatched bin. It fails without the fix, on the exact
missing-patch-file error.
Copilot AI lite review requested due to automatic review settings August 8, 2026 17:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@coderabbitai

coderabbitai Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 001ef2ba-2d3f-487b-a4a4-362c053b7047

📥 Commits

Reviewing files that changed from the base of the PR and between 6c0b293 and e915fd5.

📒 Files selected for processing (2)
  • .changeset/dlx-ignores-caller-patches.md
  • pnpm/crates/cli/tests/suite/dlx.rs
🚧 Files skipped from review as they are similar to previous changes (2)
  • .changeset/dlx-ignores-caller-patches.md
  • pnpm/crates/cli/tests/suite/dlx.rs

📝 Walkthrough

Walkthrough

pnpm dlx cache installations now ignore caller-project patchedDependencies. A Unix-only regression test verifies the unpatched package output. A changeset documents the behavior for pnpm dlx and pnpm create.

Changes

dlx patch isolation

Layer / File(s) Summary
Clear caller patches and verify dlx output
pnpm/crates/cli/src/cli_args/dlx.rs, pnpm/crates/cli/tests/suite/dlx.rs, .changeset/dlx-ignores-caller-patches.md
The temporary dlx installation clears inherited patch configuration. A Unix-only test verifies that the unpatched package produces touch.txt instead of patched.txt. The changeset documents the release behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • pnpm/pnpm#13180: Both changes relate to the pacquet release changeset.
  • pnpm/pnpm#13709: Both changes modify pnpm/crates/cli/src/cli_args/dlx.rs to isolate temporary dlx installations.

Suggested labels: product: pacquet

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/dlx-drop-caller-patches

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix dlx cache installs by ignoring caller patchedDependencies

🐞 Bug fix 🧪 Tests 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Prevent pnpm/pacquet dlx from inheriting caller patchedDependencies into the cache install.
• Avoid patch-path resolution against the throwaway dlx workspace root (missing patch files).
• Add a regression test ensuring dlx runs the unpatched package even when the caller has patches.
Diagram

graph TD
  A["Caller project"] --> B["dlx invocation"] --> C["install_into_cache()"] --> D["Config: workspace=prepare; patches cleared"] --> E["Prepare dir install"] --> F[("dlx cache entry")] --> G["Execute package bin"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Rebase patch paths to caller workspace
  • ➕ Would allow dlx installs to be patched using the caller project's patches
  • ➖ More complex and brittle: must retain access to caller workspace root while isolating the throwaway install
  • ➖ Introduces surprising coupling between dlx cache contents and caller workspace state/paths
  • ➖ Conflicts with pnpm’s observed behavior (dlx installs appear unpatched)
2. Apply patches by copying them into the prepare dir
  • ➕ Keeps patch resolution workspace-relative without needing the caller workspace during install
  • ➖ Still couples dlx cache output to caller config and patch contents
  • ➖ Extra I/O and edge cases (missing files, path traversal, cache invalidation when patch changes)

Recommendation: Keep the PR’s approach: explicitly drop patchedDependencies for dlx cache installs. It matches pnpm’s effective behavior (dlx installs unpatched), removes a hard failure mode for any patched workspace, and avoids introducing tight coupling between a global-ish cache install and arbitrary caller workspace state.

Files changed (3) +61 / -0

Bug fix (1) +7 / -0
dlx.rsClear patchedDependencies for dlx cache installs +7/-0

Clear patchedDependencies for dlx cache installs

• When preparing the throwaway dlx cache install, anchors 'workspace_dir' to the prepare directory and now explicitly sets 'config.patched_dependencies = None'. This prevents patch paths (workspace-relative) from being resolved against the dlx cache/prepare directory, which previously caused missing patch-file failures for patched workspaces.

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

Tests (1) +49 / -0
dlx.rsAdd regression test: dlx ignores caller patchedDependencies +49/-0

Add regression test: dlx ignores caller patchedDependencies

• Adds a Unix-only integration test that configures a caller workspace with a 'patchedDependencies' entry targeting the dlx package itself. Verifies dlx succeeds and runs the unpatched bin output (creates 'touch.txt' and not 'patched.txt'), preventing regressions of the missing-patch-file failure.

pnpm/crates/cli/tests/suite/dlx.rs

Documentation (1) +5 / -0
dlx-ignores-caller-patches.mdDocument dlx behavior change for patchedDependencies +5/-0

Document dlx behavior change for patchedDependencies

• Adds a changeset noting that 'pnpm dlx'/'pnpm create' no longer fail when the invoking project uses 'patchedDependencies'. Explains that the dlx cache install now ignores caller patches to avoid missing patch-file errors.

.changeset/dlx-ignores-caller-patches.md

@greptile-apps

greptile-apps Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (2): Last reviewed commit: "test(dlx): compile the patch-isolation t..." | Re-trigger Greptile

Comment thread pnpm/crates/cli/tests/suite/dlx.rs Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
.changeset/dlx-ignores-caller-patches.md (1)

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

Keep the release note user-facing.

Remove the cache-install and path-resolution diagnosis. State the observed fix and the searchable error only.

Proposed release note
-`pnpm dlx` and `pnpm create` work again in a project that has `patchedDependencies`. The caller's patches were carried into the throwaway cache install, whose patch paths no longer resolve, so every invocation failed with "Failed to read patch file". The cache install now ignores them, as pnpm does.
+`pnpm dlx` and `pnpm create` no longer fail with "Failed to read patch file" in projects that use `patchedDependencies`.

As per path instructions, “The changeset is release-note text for users, not implementation rationale.” Based on learnings, changesets should describe user-visible behavior.

🤖 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 @.changeset/dlx-ignores-caller-patches.md at line 5, Update the changeset
release note to describe only the user-visible fix: pnpm dlx and pnpm create now
work in projects with patchedDependencies, and include the searchable error
“Failed to read patch file.” Remove the cache-install, patch-path, and
implementation diagnosis.

Sources: Path instructions, Learnings

pnpm/crates/cli/tests/suite/dlx.rs (1)

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

Keep the test visible on non-Unix targets.

If this fixture can run on non-Unix targets, replace #[cfg(unix)] with #[cfg_attr(not(unix), ignore = "...")]. The current attribute removes the test from compilation and from test reports on those targets.

As per path instructions, “a Unix-only test should preferably compile everywhere and use an explicit non-Unix ignore when possible.”

🤖 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/suite/dlx.rs` around lines 110 - 112, Update the test
attribute above dlx_ignores_the_caller_projects_patched_dependencies so the test
remains compiled and reported on non-Unix targets, using a conditional ignore
there instead of conditionally compiling it only on Unix. Preserve normal
execution on Unix and provide an explicit ignore reason for non-Unix platforms.

Source: Path instructions

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

Inline comments:
In @.changeset/dlx-ignores-caller-patches.md:
- Around line 1-3: Update the changeset metadata to include the TypeScript CLI
package alongside pacquet, using its exact package name (pnpm) and retaining the
patch release level for both packages.

---

Nitpick comments:
In @.changeset/dlx-ignores-caller-patches.md:
- Line 5: Update the changeset release note to describe only the user-visible
fix: pnpm dlx and pnpm create now work in projects with patchedDependencies, and
include the searchable error “Failed to read patch file.” Remove the
cache-install, patch-path, and implementation diagnosis.

In `@pnpm/crates/cli/tests/suite/dlx.rs`:
- Around line 110-112: Update the test attribute above
dlx_ignores_the_caller_projects_patched_dependencies so the test remains
compiled and reported on non-Unix targets, using a conditional ignore there
instead of conditionally compiling it only on Unix. Preserve normal execution on
Unix and provide an explicit ignore reason for non-Unix platforms.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f83baedf-6b38-4ba7-9dab-61801241afa3

📥 Commits

Reviewing files that changed from the base of the PR and between 4e68132 and 6c0b293.

📒 Files selected for processing (3)
  • .changeset/dlx-ignores-caller-patches.md
  • pnpm/crates/cli/src/cli_args/dlx.rs
  • pnpm/crates/cli/tests/suite/dlx.rs

@qodo-code-review

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

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Remediation recommended

1. Ignored dlx test lacks issue 📘 Rule violation ▣ Testability ⭐ New
Description
The new dlx test is marked ignore on non-Unix platforms without an explicit tracking issue
reference, which violates the requirement to not hide failures by skipping/ignoring tests without a
linked justification.
Code

pnpm/crates/cli/tests/suite/dlx.rs[104]

+#[cfg_attr(not(unix), ignore = "dlx bin execution is only exercised on Unix")]
Relevance

●●● Strong

Compliance precedent: skipped/quarantined tests required explicit tracking issue reference; team
previously accepted adding it.

PR-#13141

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The compliance checklist requires that tests not be newly skipped/ignored without an explicit issue
reference and justification. The added cfg_attr(..., ignore = ...) introduces an ignored test on
non-Unix platforms with only a generic reason string and no issue reference.

Rule 713440: Investigate and resolve all failing tests before merge
pnpm/crates/cli/tests/suite/dlx.rs[104-104]

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

## Issue description
A newly added test is conditionally ignored (`#[cfg_attr(not(unix), ignore = ...)]`) without an explicit issue/ticket reference, which conflicts with the compliance requirement for skipped/ignored tests.

## Issue Context
If the test must not run on non-Unix platforms, prefer conditional compilation (`#[cfg(unix)]`) or include a concrete issue reference in the ignore reason so the skip is auditable and tracked.

## Fix Focus Areas
- pnpm/crates/cli/tests/suite/dlx.rs[104-104]

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


2. Brittle YAML append 🐞 Bug ☼ Reliability
Description
The new dlx patchedDependencies test appends a YAML block via raw string concatenation without
ensuring the existing pnpm-workspace.yaml ends with \n, which can produce invalid YAML and cause
a deterministic test failure if the harness fixture ever stops ending with a newline.
Code

pnpm/crates/cli/tests/suite/dlx.rs[R133-136]

+    let mut workspace_yaml =
+        std::fs::read_to_string(&workspace_yaml_path).expect("read pnpm-workspace.yaml");
+    workspace_yaml.push_str(
+        "patchedDependencies:\n  '@foo/[email protected]': patches/touch-file-one-bin.patch\n",
Relevance

●●● Strong

Repo often accepts newline-safe pnpm-workspace.yaml appends / helper usage to prevent brittle YAML
fixtures.

PR-#13386
PR-#13407
PR-#13563

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The test currently appends directly with push_str and no newline guard, while the suite utilities
explicitly add a trailing newline before appending to prevent invalid YAML.

pnpm/crates/cli/tests/suite/dlx.rs[132-138]
pnpm/crates/cli/tests/suite/_utils/mod.rs[79-96]
PR-#13386

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

## Issue description
A new test appends `patchedDependencies:` to `pnpm-workspace.yaml` without guaranteeing a trailing newline, which can concatenate onto the last existing line and break YAML parsing.

## Issue Context
The test suite already has newline-safe helpers for editing `pnpm-workspace.yaml`; using them avoids brittle assumptions about fixture formatting.

## Fix Focus Areas
- pnpm/crates/cli/tests/suite/dlx.rs[132-139]
- pnpm/crates/cli/tests/suite/_utils/mod.rs[79-96]

## Suggested fix
Replace the raw `read_to_string` + `push_str` with a newline-safe helper (or add an `if !yaml.ends_with('\n') { yaml.push('\n') }` guard before appending). If you need to append a multi-line block, consider reusing/expanding the existing helper patterns in `suite/_utils/mod.rs` to support block appends safely.

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


3. Changeset missing pnpm entry 📘 Rule violation § Compliance
Description
The new changeset file only declares a bump for pacquet and omits pnpm, which violates the
requirement that every changeset explicitly includes a pnpm bump. This can cause release tooling
to skip the required pnpm version bump for this change.
Code

.changeset/dlx-ignores-caller-patches.md[R1-3]

+---
+"pacquet": patch
+---
Relevance

●● Moderate

Mixed precedent: some PRs added required pnpm bump, others left pacquet-only changesets unchanged.

PR-#13403
PR-#13695
PR-#13337

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 713436 requires each new/modified changeset to include a pnpm entry with a valid
bump type. The added changeset front-matter includes only "pacquet": patch and no pnpm entry.

Rule 713436: Explicitly declare pnpm package and correct bump type in changesets
.changeset/dlx-ignores-caller-patches.md[1-3]

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 changeset front-matter is missing a `pnpm` entry.

## Issue Context
Compliance requires each changeset to explicitly include the `pnpm` package with a valid bump type (`patch`/`minor`/`major`). This PR adds a changeset that currently only lists `pacquet`.

## Fix Focus Areas
- .changeset/dlx-ignores-caller-patches.md[1-3]

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


View more (1)
4. Test doc comment is historical ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
The new Rust doc comment describes the prior failure mode (“Inheriting them failed…”) rather than
stating current behavior/contract. This violates the rule that comments must describe current
behavior, not historical implementations.
Code

pnpm/crates/cli/tests/suite/dlx.rs[R105-109]

+/// The caller project's `patchedDependencies` must not reach the dlx cache
+/// install: pnpm's dlx installs the package unpatched, and the configured
+/// paths are relative to the caller's workspace root, which the dlx install
+/// does not have. Inheriting them failed every dlx invocation from a project
+/// with patches, on a patch file missing under the cache dir.
Relevance

●● Moderate

Team sometimes rewrites historical doc comments, but similar “avoid historical phrasing” suggestions
were also ignored.

PR-#13138
PR-#13359
PR-#13658

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 772199 disallows comments that describe historical behavior. The added doc comment
includes past-tense description of what previously happened when patches were inherited ("Inheriting
them failed every dlx invocation...") instead of phrasing it as current contract/rationale.

Rule 772199: Comments must describe current behavior, not historical implementations
pnpm/crates/cli/tests/suite/dlx.rs[105-109]

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

## Issue description
A newly added doc comment uses historical framing (past failure mode) instead of describing current behavior.

## Issue Context
Comments should describe what the code currently guarantees and, if needed, phrase rationale without historical phrasing.

## Fix Focus Areas
- pnpm/crates/cli/tests/suite/dlx.rs[105-109]

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



Informational

5. Version-pinned patch key 🐞 Bug ⚙ Maintainability
Description
The new test hardcodes @foo/[email protected] in patchedDependencies, so if the mocked
registry fixture version is ever bumped, the patch entry may stop matching and the test could stop
detecting a regression where dlx accidentally applies caller patches.
Code

pnpm/crates/cli/tests/suite/dlx.rs[R135-137]

+    workspace_yaml.push_str(
+        "patchedDependencies:\n  '@foo/[email protected]': patches/touch-file-one-bin.patch\n",
+    );
Relevance

●● Moderate

General precedent favors avoiding hardcoded versions in tests, but no close match for
patchedDependencies version pin.

PR-#13636
PR-#12831
PR-#13425

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The fixture currently uses version 1.0.0, so the test works today, but the patching implementation
supports wildcard matching via a bare-name key; pinning the exact version makes the test sensitive
to fixture bumps.

pnpm/crates/cli/tests/suite/dlx.rs[135-137]
pnpr/.fixtures/packages/@foo/touch-file-one-bin/1.0.0/package.json[1-5]
pnpm/crates/patching/src/group.rs[49-76]
pnpm/crates/patching/src/get_patch_info.rs[25-80]

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 test’s `patchedDependencies` key is pinned to a specific version (`@foo/[email protected]`). If the fixture version changes, the patch may no longer match, weakening the regression test.

## Issue Context
Patch matching supports a wildcard/"all versions" selector: a bare `name` key (or `name@*`) targets the `all` bucket, and `get_patch_info` matches exact → unique range → wildcard.

## Fix Focus Areas
- pnpm/crates/cli/tests/suite/dlx.rs[135-137]
- pnpm/crates/patching/src/group.rs[41-76]
- pnpm/crates/patching/src/get_patch_info.rs[25-80]

## Suggested fix
Change the YAML entry to use a version-agnostic selector, e.g.:
- `patchedDependencies:\n  '@foo/touch-file-one-bin': patches/touch-file-one-bin.patch\n`
(or `@foo/touch-file-one-bin@*`), so the test continues to cover the behavior if the fixture’s package version changes.

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


Grey Divider

Context used
✅ Compliance rules (platform): 26 rules

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Previous review results

Review updated until commit e915fd5

Results up to commit 6c0b293 ⚖️ Balanced


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


Remediation recommended
1. Brittle YAML append 🐞 Bug ☼ Reliability
Description
The new dlx patchedDependencies test appends a YAML block via raw string concatenation without
ensuring the existing pnpm-workspace.yaml ends with \n, which can produce invalid YAML and cause
a deterministic test failure if the harness fixture ever stops ending with a newline.
Code

pnpm/crates/cli/tests/suite/dlx.rs[R133-136]

+    let mut workspace_yaml =
+        std::fs::read_to_string(&workspace_yaml_path).expect("read pnpm-workspace.yaml");
+    workspace_yaml.push_str(
+        "patchedDependencies:\n  '@foo/[email protected]': patches/touch-file-one-bin.patch\n",
Relevance

●●● Strong

Repo often accepts newline-safe pnpm-workspace.yaml appends / helper usage to prevent brittle YAML
fixtures.

PR-#13386
PR-#13407
PR-#13563

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The test currently appends directly with push_str and no newline guard, while the suite utilities
explicitly add a trailing newline before appending to prevent invalid YAML.

pnpm/crates/cli/tests/suite/dlx.rs[132-138]
pnpm/crates/cli/tests/suite/_utils/mod.rs[79-96]
PR-#13386

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

## Issue description
A new test appends `patchedDependencies:` to `pnpm-workspace.yaml` without guaranteeing a trailing newline, which can concatenate onto the last existing line and break YAML parsing.

## Issue Context
The test suite already has newline-safe helpers for editing `pnpm-workspace.yaml`; using them avoids brittle assumptions about fixture formatting.

## Fix Focus Areas
- pnpm/crates/cli/tests/suite/dlx.rs[132-139]
- pnpm/crates/cli/tests/suite/_utils/mod.rs[79-96]

## Suggested fix
Replace the raw `read_to_string` + `push_str` with a newline-safe helper (or add an `if !yaml.ends_with('\n') { yaml.push('\n') }` guard before appending). If you need to append a multi-line block, consider reusing/expanding the existing helper patterns in `suite/_utils/mod.rs` to support block appends safely.

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


2. Changeset missing pnpm entry 📘 Rule violation § Compliance
Description
The new changeset file only declares a bump for pacquet and omits pnpm, which violates the
requirement that every changeset explicitly includes a pnpm bump. This can cause release tooling
to skip the required pnpm version bump for this change.
Code

.changeset/dlx-ignores-caller-patches.md[R1-3]

+---
+"pacquet": patch
+---
Relevance

●● Moderate

Mixed precedent: some PRs added required pnpm bump, others left pacquet-only changesets unchanged.

PR-#13403
PR-#13695
PR-#13337

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 713436 requires each new/modified changeset to include a pnpm entry with a valid
bump type. The added changeset front-matter includes only "pacquet": patch and no pnpm entry.

Rule 713436: Explicitly declare pnpm package and correct bump type in changesets
.changeset/dlx-ignores-caller-patches.md[1-3]

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 changeset front-matter is missing a `pnpm` entry.

## Issue Context
Compliance requires each changeset to explicitly include the `pnpm` package with a valid bump type (`patch`/`minor`/`major`). This PR adds a changeset that currently only lists `pacquet`.

## Fix Focus Areas
- .changeset/dlx-ignores-caller-patches.md[1-3]

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


3. Test doc comment is historical ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
The new Rust doc comment describes the prior failure mode (“Inheriting them failed…”) rather than
stating current behavior/contract. This violates the rule that comments must describe current
behavior, not historical implementations.
Code

pnpm/crates/cli/tests/suite/dlx.rs[R105-109]

+/// The caller project's `patchedDependencies` must not reach the dlx cache
+/// install: pnpm's dlx installs the package unpatched, and the configured
+/// paths are relative to the caller's workspace root, which the dlx install
+/// does not have. Inheriting them failed every dlx invocation from a project
+/// with patches, on a patch file missing under the cache dir.
Relevance

●● Moderate

Team sometimes rewrites historical doc comments, but similar “avoid historical phrasing” suggestions
were also ignored.

PR-#13138
PR-#13359
PR-#13658

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 772199 disallows comments that describe historical behavior. The added doc comment
includes past-tense description of what previously happened when patches were inherited ("Inheriting
them failed every dlx invocation...") instead of phrasing it as current contract/rationale.

Rule 772199: Comments must describe current behavior, not historical implementations
pnpm/crates/cli/tests/suite/dlx.rs[105-109]

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

## Issue description
A newly added doc comment uses historical framing (past failure mode) instead of describing current behavior.

## Issue Context
Comments should describe what the code currently guarantees and, if needed, phrase rationale without historical phrasing.

## Fix Focus Areas
- pnpm/crates/cli/tests/suite/dlx.rs[105-109]

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



Informational
4. Version-pinned patch key 🐞 Bug ⚙ Maintainability
Description
The new test hardcodes @foo/[email protected] in patchedDependencies, so if the mocked
registry fixture version is ever bumped, the patch entry may stop matching and the test could stop
detecting a regression where dlx accidentally applies caller patches.
Code

pnpm/crates/cli/tests/suite/dlx.rs[R135-137]

+    workspace_yaml.push_str(
+        "patchedDependencies:\n  '@foo/[email protected]': patches/touch-file-one-bin.patch\n",
+    );
Relevance

●● Moderate

General precedent favors avoiding hardcoded versions in tests, but no close match for
patchedDependencies version pin.

PR-#13636
PR-#12831
PR-#13425

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The fixture currently uses version 1.0.0, so the test works today, but the patching implementation
supports wildcard matching via a bare-name key; pinning the exact version makes the test sensitive
to fixture bumps.

pnpm/crates/cli/tests/suite/dlx.rs[135-137]
pnpr/.fixtures/packages/@foo/touch-file-one-bin/1.0.0/package.json[1-5]
pnpm/crates/patching/src/group.rs[49-76]
pnpm/crates/patching/src/get_patch_info.rs[25-80]

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 test’s `patchedDependencies` key is pinned to a specific version (`@foo/[email protected]`). If the fixture version changes, the patch may no longer match, weakening the regression test.

## Issue Context
Patch matching supports a wildcard/"all versions" selector: a bare `name` key (or `name@*`) targets the `all` bucket, and `get_patch_info` matches exact → unique range → wildcard.

## Fix Focus Areas
- pnpm/crates/cli/tests/suite/dlx.rs[135-137]
- pnpm/crates/patching/src/group.rs[41-76]
- pnpm/crates/patching/src/get_patch_info.rs[25-80]

## Suggested fix
Change the YAML entry to use a version-agnostic selector, e.g.:
- `patchedDependencies:\n  '@foo/touch-file-one-bin': patches/touch-file-one-bin.patch\n`
(or `@foo/touch-file-one-bin@*`), so the test continues to cover the behavior if the fixture’s package version changes.

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

Warning

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

No code suggestions found for the PR.

@github-actions

github-actions Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                                            main                                   pr
-----                                            ----                                   --
lockfile/parse_pnpm_lock                         1.00     12.2±0.04ms    30.7 MB/sec    1.00     12.2±0.07ms    30.6 MB/sec
packument/parse                                  1.00     39.0±0.07µs  1702.5 MB/sec    1.00     38.8±0.20µs  1708.6 MB/sec
tarball/download_dependency                      1.00      2.4±0.06ms  1783.3 KB/sec    1.01      2.5±0.06ms  1765.4 KB/sec
tarball_batch/cold_store_many_medium_tarballs    1.00    175.9±2.49ms 91.0 KElem/sec    1.01    177.2±1.48ms 90.3 KElem/sec
workspace_resolution/hoist_heavy                 1.00    251.8±1.38ms        ? ?/sec    1.01    254.3±1.89ms        ? ?/sec

@codecov-commenter

codecov-commenter commented Aug 8, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13734      +/-   ##
==========================================
- Coverage   88.23%   88.23%   -0.01%     
==========================================
  Files         616      616              
  Lines      100167   100307     +140     
==========================================
+ Hits        88380    88503     +123     
- Misses      11787    11804      +17     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: e915fd57615a

Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm. Bencher consumes pacquet@HEAD and pnpr@HEAD.

The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time).

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.572 ± 0.140 2.375 2.751 1.67 ± 0.20
pacquet@main 2.549 ± 0.174 2.360 2.758 1.66 ± 0.21
pnpr@HEAD 1.535 ± 0.161 1.348 1.807 1.00
pnpr@main 1.590 ± 0.177 1.378 1.823 1.04 ± 0.16
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.5715812666,
      "stddev": 0.13996572489414597,
      "median": 2.6061043741,
      "user": 1.59661256,
      "system": 1.35792026,
      "min": 2.3747351841,
      "max": 2.7512086491,
      "times": [
        2.3773052431000004,
        2.6173823171,
        2.3747351841,
        2.6511126721000005,
        2.5948264311,
        2.4340116041,
        2.5211259561,
        2.7512086491,
        2.7501355211000003,
        2.6439690881
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.5490350196000002,
      "stddev": 0.17415309534660797,
      "median": 2.5207304576,
      "user": 1.63782676,
      "system": 1.34025886,
      "min": 2.3601703041,
      "max": 2.7583968461,
      "times": [
        2.7465161611,
        2.7583968461,
        2.7567899971000003,
        2.3841719071000003,
        2.5179844021,
        2.3601703041,
        2.5234765131000003,
        2.6944594681000003,
        2.3638223871000004,
        2.3845622101000004
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5353494816,
      "stddev": 0.16127853520068622,
      "median": 1.4941705111,
      "user": 1.11405676,
      "system": 1.15394606,
      "min": 1.3483376271,
      "max": 1.8066699781,
      "times": [
        1.4275820491,
        1.4983785481,
        1.7332114671,
        1.6821850311,
        1.4899624741,
        1.3483376271,
        1.5985605461,
        1.3924450120999998,
        1.8066699781,
        1.3761620830999999
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5898964480999997,
      "stddev": 0.1769487991225974,
      "median": 1.6308472686,
      "user": 1.0964661599999999,
      "system": 1.20596336,
      "min": 1.3777965951,
      "max": 1.8225328211,
      "times": [
        1.3777965951,
        1.6946301841,
        1.4123944281,
        1.3934960161,
        1.5940663731,
        1.6676281641,
        1.4091251741,
        1.8225328211,
        1.7991860291000001,
        1.7281086960999998
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 273.0 ± 5.1 265.9 280.6 1.00
pacquet@main 274.6 ± 7.1 261.0 283.0 1.01 ± 0.03
pnpr@HEAD 283.4 ± 5.7 274.6 292.2 1.04 ± 0.03
pnpr@main 281.4 ± 4.3 275.1 287.7 1.03 ± 0.02
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.27297990884000006,
      "stddev": 0.005059415348042557,
      "median": 0.27159350254000003,
      "user": 0.23716338,
      "system": 0.551784,
      "min": 0.26591199604000004,
      "max": 0.28056454004000003,
      "times": [
        0.27680871304000004,
        0.27231882604,
        0.27014534204,
        0.28056454004000003,
        0.27981720504,
        0.26951766204000005,
        0.26777978604,
        0.27086817904000005,
        0.26591199604000004,
        0.27606683904
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.27458946934,
      "stddev": 0.007127322343252454,
      "median": 0.27614318154000006,
      "user": 0.22967768000000005,
      "system": 0.5443051000000001,
      "min": 0.26104838704000005,
      "max": 0.28298027004000004,
      "times": [
        0.26967633004,
        0.26104838704000005,
        0.27936180104,
        0.27230205404,
        0.28257129104,
        0.28298027004000004,
        0.27771874204,
        0.27456762104000004,
        0.26685033904000005,
        0.27881785804000003
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.28337735704000006,
      "stddev": 0.005700410819780703,
      "median": 0.28332002304000004,
      "user": 0.22199987999999998,
      "system": 0.5658045,
      "min": 0.27463860504000004,
      "max": 0.29219244104000003,
      "times": [
        0.29219244104000003,
        0.28054193704,
        0.28603407804000003,
        0.27463860504000004,
        0.28662184304000005,
        0.28504233504000004,
        0.29060398604000004,
        0.27724541404,
        0.27925522004000003,
        0.28159771104000003
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.28144369454,
      "stddev": 0.004268732572370038,
      "median": 0.28144471454000003,
      "user": 0.23648617999999993,
      "system": 0.5465639,
      "min": 0.27510869804000004,
      "max": 0.28774683704000004,
      "times": [
        0.28201525704,
        0.28529841604000006,
        0.28389806504000004,
        0.28774683704000004,
        0.28568652504000003,
        0.27583073504000005,
        0.27510869804000004,
        0.27826584104,
        0.28087417204000004,
        0.27971239904000006
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.616 ± 0.010 2.598 2.626 1.68 ± 0.13
pacquet@main 2.623 ± 0.015 2.604 2.655 1.69 ± 0.13
pnpr@HEAD 1.653 ± 0.159 1.432 1.867 1.06 ± 0.13
pnpr@main 1.553 ± 0.119 1.436 1.833 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.6157681708200005,
      "stddev": 0.009976433913101742,
      "median": 2.6185523922200002,
      "user": 1.59579468,
      "system": 1.37388584,
      "min": 2.59808030272,
      "max": 2.62581519072,
      "times": [
        2.62453765972,
        2.62581519072,
        2.6010242157200003,
        2.6206517177200004,
        2.62473953872,
        2.61645306672,
        2.59808030272,
        2.61124211572,
        2.6228555997200003,
        2.6122823007200004
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.62267696842,
      "stddev": 0.015133527206052745,
      "median": 2.61922630422,
      "user": 1.61310008,
      "system": 1.34834124,
      "min": 2.6037111047200003,
      "max": 2.65506212972,
      "times": [
        2.62214211772,
        2.6077858117200003,
        2.6248308107200002,
        2.6037111047200003,
        2.64093745672,
        2.61810981072,
        2.6171340667200003,
        2.6203427977200002,
        2.65506212972,
        2.61671357772
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.6534302521199997,
      "stddev": 0.15948191299373576,
      "median": 1.6909559567199999,
      "user": 1.07834588,
      "system": 1.18394864,
      "min": 1.43240320172,
      "max": 1.86703217672,
      "times": [
        1.43240320172,
        1.86703217672,
        1.50922779572,
        1.84343293172,
        1.67842756472,
        1.70348434872,
        1.56540423872,
        1.43922632372,
        1.78624206272,
        1.70942187672
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5533323059200002,
      "stddev": 0.11904174385761504,
      "median": 1.5224256662200002,
      "user": 1.0927518800000002,
      "system": 1.19057244,
      "min": 1.4358991217200001,
      "max": 1.8329531887200001,
      "times": [
        1.51048378672,
        1.8329531887200001,
        1.47206384972,
        1.64490318772,
        1.54842580372,
        1.61331207372,
        1.4358991217200001,
        1.49300052272,
        1.5343675457200001,
        1.44791397872
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 438.5 ± 21.0 398.6 465.3 1.40 ± 0.07
pacquet@main 415.9 ± 9.1 394.6 427.7 1.33 ± 0.04
pnpr@HEAD 317.1 ± 5.8 305.4 323.3 1.01 ± 0.03
pnpr@main 313.7 ± 6.1 304.6 322.1 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.43847192463999995,
      "stddev": 0.021041646881605498,
      "median": 0.43547407334,
      "user": 0.56968812,
      "system": 0.70491634,
      "min": 0.39860477384,
      "max": 0.46526032984,
      "times": [
        0.43940298484,
        0.42906276384,
        0.42342936884,
        0.43596967284,
        0.46526032984,
        0.43048752584,
        0.46435872384,
        0.46316462884,
        0.39860477384,
        0.43497847384
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.41587621044,
      "stddev": 0.009087514231583068,
      "median": 0.41763554884,
      "user": 0.5504668199999999,
      "system": 0.6822510399999999,
      "min": 0.39458195484,
      "max": 0.42765037384,
      "times": [
        0.42111754784,
        0.40966313284,
        0.41844907284,
        0.41682202484,
        0.42287153284,
        0.42765037384,
        0.41986750884,
        0.41539638684,
        0.39458195484,
        0.41234256884
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.31711956114,
      "stddev": 0.00584858337763965,
      "median": 0.31876937334,
      "user": 0.20542872,
      "system": 0.5746442399999999,
      "min": 0.30539719583999997,
      "max": 0.32334395884,
      "times": [
        0.30539719583999997,
        0.31911303884,
        0.31842570784,
        0.31067368984,
        0.32150801884,
        0.32278350684,
        0.32102130584,
        0.31584426684,
        0.32334395884,
        0.31308492184
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.31365386564,
      "stddev": 0.006056750978107377,
      "median": 0.31369966234,
      "user": 0.20865352,
      "system": 0.5542253399999998,
      "min": 0.30461388384,
      "max": 0.32211431984,
      "times": [
        0.30647486084,
        0.30987479884,
        0.31550165384,
        0.32207776884,
        0.31776117884,
        0.31027237584,
        0.32211431984,
        0.31595014484,
        0.30461388384,
        0.31189767084
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.744 ± 0.009 1.730 1.761 5.67 ± 0.22
pacquet@main 1.739 ± 0.006 1.726 1.746 5.65 ± 0.22
pnpr@HEAD 0.308 ± 0.012 0.282 0.319 1.00
pnpr@main 0.313 ± 0.008 0.304 0.327 1.02 ± 0.05
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.74379723254,
      "stddev": 0.00920284631693448,
      "median": 1.7421370502400002,
      "user": 0.80737686,
      "system": 0.7839319599999999,
      "min": 1.72968615224,
      "max": 1.7614027222400002,
      "times": [
        1.75382616524,
        1.73870062224,
        1.75016747024,
        1.73548324624,
        1.72968615224,
        1.7425957622400001,
        1.74048907324,
        1.7614027222400002,
        1.7439427732400001,
        1.74167833824
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.7386793459400003,
      "stddev": 0.00554131101220384,
      "median": 1.73844148424,
      "user": 0.77337346,
      "system": 0.79609546,
      "min": 1.7256367722400001,
      "max": 1.74556144224,
      "times": [
        1.73783003624,
        1.74556144224,
        1.73938683924,
        1.73676586624,
        1.7374067102400002,
        1.7256367722400001,
        1.7425719752400002,
        1.74475084924,
        1.73879604024,
        1.73808692824
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.30781840774,
      "stddev": 0.011858078942027516,
      "median": 0.31033693224000003,
      "user": 0.20616876,
      "system": 0.5390896599999999,
      "min": 0.28156005124,
      "max": 0.31903986224,
      "times": [
        0.30657467724000004,
        0.29687944824,
        0.30310111024,
        0.30595528424,
        0.28156005124,
        0.31783366524,
        0.31409918724,
        0.31903986224,
        0.31883137024,
        0.31430942124
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.31252372264,
      "stddev": 0.00785634996450915,
      "median": 0.30916367274,
      "user": 0.21148225999999998,
      "system": 0.5405576599999999,
      "min": 0.30417525824,
      "max": 0.32672356024,
      "times": [
        0.32298308124,
        0.30592134924000003,
        0.30786790824,
        0.30856818424,
        0.30975916124,
        0.31300844824,
        0.31964499824000003,
        0.30417525824,
        0.30658527724,
        0.32672356024
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 229.9 ± 15.2 203.2 247.5 2.62 ± 0.18
pacquet@main 229.2 ± 14.5 212.1 254.5 2.61 ± 0.17
pnpr@HEAD 89.3 ± 2.4 85.5 94.4 1.02 ± 0.03
pnpr@main 87.7 ± 1.6 84.3 91.5 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.22990005110909092,
      "stddev": 0.015239321260067738,
      "median": 0.2315248712,
      "user": 0.17440101090909094,
      "system": 0.07113895454545455,
      "min": 0.20315632320000002,
      "max": 0.24746581720000002,
      "times": [
        0.2465791712,
        0.22944928120000002,
        0.23793807420000002,
        0.24511476820000003,
        0.20315632320000002,
        0.21915834320000002,
        0.2315248712,
        0.24746581720000002,
        0.21421743920000003,
        0.2140147162,
        0.2402817572
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.22921805586666666,
      "stddev": 0.014491436849865539,
      "median": 0.2257207242,
      "user": 0.17577283666666665,
      "system": 0.07260658333333332,
      "min": 0.2121048782,
      "max": 0.2545387982,
      "times": [
        0.24499263920000003,
        0.2197855222,
        0.22638426120000002,
        0.2545387982,
        0.2525277992,
        0.2250571872,
        0.2121048782,
        0.22940239320000003,
        0.2329288102,
        0.2226289952,
        0.21234822620000002,
        0.21791716020000002
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.08931634887741934,
      "stddev": 0.0023586370473175737,
      "median": 0.0895697542,
      "user": 0.021645500645161287,
      "system": 0.009678145161290322,
      "min": 0.0854759212,
      "max": 0.09438448220000001,
      "times": [
        0.0900373222,
        0.0898510032,
        0.0854759212,
        0.0909503482,
        0.0916218912,
        0.09253819220000001,
        0.0901974242,
        0.0883211282,
        0.08914438520000001,
        0.0910869162,
        0.0921061402,
        0.0900488742,
        0.0874487292,
        0.0856633742,
        0.08645407020000001,
        0.0879689862,
        0.08585327020000001,
        0.0876048522,
        0.0878391122,
        0.0871781702,
        0.0867816052,
        0.09029773220000001,
        0.09438448220000001,
        0.0895697542,
        0.09366564120000001,
        0.0902670752,
        0.09057119520000001,
        0.08745017220000001,
        0.0869166682,
        0.0894741752,
        0.0920382032
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.08772643741875003,
      "stddev": 0.001641661253856252,
      "median": 0.08740493120000001,
      "user": 0.02064651375,
      "system": 0.010588140624999997,
      "min": 0.0843360402,
      "max": 0.0915360702,
      "times": [
        0.0889849362,
        0.0873088962,
        0.0862866552,
        0.0895319532,
        0.0874588282,
        0.08728867720000001,
        0.0870826712,
        0.0915360702,
        0.0871243782,
        0.0861547472,
        0.0904233282,
        0.09093799620000001,
        0.08590244220000001,
        0.08769756620000001,
        0.08743890920000001,
        0.08530655320000001,
        0.08788241220000001,
        0.08796833620000001,
        0.0866991592,
        0.08576054720000001,
        0.0871704662,
        0.0887361282,
        0.0875939812,
        0.0873709532,
        0.08679522020000001,
        0.0890546972,
        0.0905227542,
        0.0843360402,
        0.0878024532,
        0.08701545520000001,
        0.0869287202,
        0.08914406520000001
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 862.5 ± 147.2 647.2 1097.8 1.14 ± 0.25
pacquet@main 754.1 ± 107.9 608.3 885.0 1.00
pnpm@HEAD 3004.0 ± 60.1 2938.0 3144.8 3.98 ± 0.58
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.8625472396311112,
      "stddev": 0.1471975065458572,
      "median": 0.84504262352,
      "user": 0.8086948111111112,
      "system": 0.1536582377777778,
      "min": 0.64715526952,
      "max": 1.0978385185200001,
      "times": [
        0.64715526952,
        0.8098186725200001,
        0.8512237475200001,
        0.78906804852,
        0.75676186952,
        1.08967310452,
        0.87634330252,
        0.84504262352,
        1.0978385185200001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.75406291052,
      "stddev": 0.10787573215028491,
      "median": 0.81123971252,
      "user": 0.6905758111111111,
      "system": 0.1424405711111111,
      "min": 0.60831823852,
      "max": 0.8849636615200001,
      "times": [
        0.81271155752,
        0.6158412655200001,
        0.8849636615200001,
        0.69231379952,
        0.81123971252,
        0.60831823852,
        0.66646357452,
        0.84485154352,
        0.84986284152
      ]
    },
    {
      "command": "pnpm@HEAD",
      "mean": 3.0039753436311107,
      "stddev": 0.06005075493627613,
      "median": 2.99772671552,
      "user": 4.594391144444445,
      "system": 0.26136590444444446,
      "min": 2.93804832952,
      "max": 3.1447693225199997,
      "times": [
        3.1447693225199997,
        2.93804832952,
        3.01701354852,
        2.99190688952,
        2.99772671552,
        2.96364204452,
        3.0234361175199997,
        3.00341506452,
        2.95582006052
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.525 ± 0.129 4.421 4.790 1.27 ± 0.05
pacquet@main 4.618 ± 0.155 4.470 4.916 1.30 ± 0.05
pnpr@HEAD 3.573 ± 0.115 3.478 3.808 1.01 ± 0.04
pnpr@main 3.550 ± 0.081 3.454 3.679 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.524817623140001,
      "stddev": 0.12860871131766782,
      "median": 4.46090935564,
      "user": 1.81215108,
      "system": 1.4201904,
      "min": 4.42095335564,
      "max": 4.78986399664,
      "times": [
        4.45897759064,
        4.43827609864,
        4.43945699764,
        4.48201622464,
        4.78986399664,
        4.42095335564,
        4.65706501864,
        4.65969490164,
        4.46284112064,
        4.43903092664
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.618477379939999,
      "stddev": 0.15464868220152805,
      "median": 4.6089823256399995,
      "user": 1.8358972799999997,
      "system": 1.4184547,
      "min": 4.46971703064,
      "max": 4.91600249664,
      "times": [
        4.59768996964,
        4.46971703064,
        4.47173614664,
        4.50217783364,
        4.63718859664,
        4.47421687764,
        4.62027468164,
        4.91600249664,
        4.66289312064,
        4.83287704564
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.5728994489400003,
      "stddev": 0.11481678239686494,
      "median": 3.52994034314,
      "user": 1.23638148,
      "system": 1.3086995999999997,
      "min": 3.47841738964,
      "max": 3.80785771764,
      "times": [
        3.47841738964,
        3.49684305664,
        3.56885661464,
        3.58754744864,
        3.53835670964,
        3.49075203964,
        3.48982579864,
        3.74901373764,
        3.52152397664,
        3.80785771764
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.54991223714,
      "stddev": 0.08079482143263356,
      "median": 3.56291221464,
      "user": 1.25299678,
      "system": 1.2481659999999999,
      "min": 3.45357056764,
      "max": 3.67873609064,
      "times": [
        3.47820527164,
        3.55881088764,
        3.46971357364,
        3.5670135416399997,
        3.5758532126400002,
        3.46231265564,
        3.45357056764,
        3.64412244464,
        3.67873609064,
        3.61078412564
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13734
Testbedpacquet
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,598.08 ms
(-2.88%)Baseline: 2,675.17 ms
3,210.21 ms
(80.93%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,729.69 ms
(-2.59%)Baseline: 1,775.76 ms
2,130.91 ms
(81.17%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
398.60 ms
(-12.24%)Baseline: 454.17 ms
545.01 ms
(73.14%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
203.16 ms
(-8.50%)Baseline: 222.03 ms
266.44 ms
(76.25%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,374.74 ms
(-2.99%)Baseline: 2,447.94 ms
2,937.52 ms
(80.84%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,420.95 ms
(-2.33%)Baseline: 4,526.25 ms
5,431.50 ms
(81.39%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
265.91 ms
(-6.86%)Baseline: 285.51 ms
342.61 ms
(77.61%)
isolated-linker.peer-heavy-resolve.hot-cache.offline📈 view plot
🚷 view threshold
647.16 ms
(-11.81%)Baseline: 733.81 ms
880.57 ms
(73.49%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13734
Testbedpnpr

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkLatencymilliseconds (ms)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,432.40 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
281.56 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
305.40 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
85.48 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,348.34 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,478.42 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
274.64 ms
🐰 View full continuous benchmarking report in Bencher

Review follow-ups: the regression test has nothing platform-specific in
it, so it is gated with a runtime `ignore` rather than `cfg(unix)` (per
CODE_STYLE_GUIDE), which also makes the `assert_cmd` prelude used on
every target. Trim the test doc comment and the changeset to the parts
that are not already stated by the test body.
Copilot AI review requested due to automatic review settings August 8, 2026 18:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Aug 8, 2026
@qodo-code-review

Copy link
Copy Markdown

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

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

No code suggestions found for the PR.

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

Labels

product: pacquet reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants