Skip to content

fix(setup): keep $PNPM_HOME/bin first on PATH in login shells - #16636

Merged
zkochan merged 2 commits into
mainfrom
fix-16635
Oct 5, 2026
Merged

zkochan merged 2 commits into
mainfrom
fix-16635

Conversation

@zkochan

@zkochan zkochan commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Summary

pnpm setup writes an rc block that skips the PATH prepend whenever $PNPM_HOME/bin is anywhere on PATH. A login shell that inherits PATH (the VS Code terminal on macOS) runs path_helper before .zshrc, which moves the inherited entry behind the system paths. The guard then saw the entry and skipped the prepend, so Homebrew's or the system's node shadowed the node shim from pnpm runtime set node -g.

The guard now skips only when the entry is already first (or last, for the end position). Fixed in both the Rust CLI (pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs) and v11 (@pnpm/os.env.path-extender-posix), for sh-family shells and fish.

Closes #16635

Squash Commit Body

The rc block written by `pnpm setup` skipped the prepend whenever
`$PNPM_HOME/bin` was anywhere on PATH. A login shell that inherits PATH
(the VS Code terminal on macOS) runs path_helper before the rc file,
which moves the inherited entry behind the system paths, so another
`node` shadowed the global runtime shim.

The guard now skips only when the entry is already at the adding
position:

- sh family: `":$PNPM_HOME/bin:"*)` for start, `*":$PNPM_HOME/bin:")`
  for end.
- fish: `test "$PATH[1]" != "$PNPM_HOME/bin"` (`$PATH[-1]` for end).

Sourcing the block twice leaves PATH unchanged. If the entry was further
down, one duplicate remains behind the prepended one, which is harmless.

Users who already ran `pnpm setup` have the old block. Re-running setup
would otherwise fail with ERR_PNPM_BAD_SHELL_SECTION, so a block that
exactly matches the old rendering (same PNPM_HOME) is replaced without
`--force`. v12 also accepts the block v11 wrote, which double-quotes the
PNPM_HOME value where v12 single-quotes it. Any other differing block
still needs `--force`.

Fixed in both the Rust CLI and the v11 path-extender-posix package.

Closes pnpm/pnpm#16635

Checklist

  • I checked the referenced issue and verified that none of the PRs
    already linked to it solves it.
  • New features are implemented only in the Rust pnpm v12 CLI. Bug fixes
    are implemented in every affected version.
  • 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.

Verified by sourcing the new block twice in sh, bash, zsh and fish with PATH set to /usr/bin:$PNPM_HOME/bin:/bin, $PNPM_HOME/bin:/usr/bin and /usr/bin. $PNPM_HOME/bin ended up first in every case. A Rust test runs the rendered block through /bin/sh. The v11 migration tests fail with the outdated-block exception removed. Not tested on macOS itself.


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

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • pnpm setup now checks the requested end of PATH when adding a directory, matching entries precisely and helping keep $PNPM_HOME/bin first when configured to prepend it.
    • Rerunning setup can update recognized configuration blocks from earlier versions without requiring --overwrite. Other differing blocks still require --overwrite.
    • If your shell configuration contains an older setup block, rerun pnpm setup to update it.

The rc block written by `pnpm setup` skipped the prepend whenever
`$PNPM_HOME/bin` was anywhere on PATH. A login shell that inherits PATH
(the VS Code terminal on macOS) runs path_helper before the rc file,
which moves the inherited entry behind the system paths, so another
`node` shadowed the global runtime shim.

The guard now skips only when the entry is already at the adding
position: first for start, last for end. Fish gets the same check via
`$PATH[1]` / `$PATH[-1]`. A block that exactly matches what earlier
versions rendered is replaced without `--force`, so re-running
`pnpm setup` upgrades it.

Fixed in both stacks.

Closes #16635

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: pnpm/pnpm/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3876f5da-f4be-4d5c-bf2e-02a2cb63a3a9
📥 Commits

Reviewing files that changed from the base of the PR and between bc58dd1 and 5395920.

📒 Files selected for processing (2)
  • pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs
  • pnpm/crates/cli/src/cli_args/setup/path_extender/posix/tests.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.


📝 Walkthrough

Walkthrough

POSIX shell and fish setup now check whether the configured directory is at the requested end of PATH. Setup can replace matching configuration blocks created by the previous anywhere-based guard without requiring --overwrite.

Changes

PATH setup behavior

Layer / File(s) Summary
Render and verify position-specific PATH guards
pnpm11/os/env/path-extender-posix/src/path-extender-posix.ts, pnpm11/os/env/path-extender-posix/test/path-extender-posix.test.ts, pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs, pnpm/crates/cli/src/cli_args/setup/path_extender/posix/tests.rs
POSIX shells check the first or last colon-delimited PATH entry for start or end insertion. Fish checks the corresponding first or last element. Tests cover generated guards and PATH behavior.
Replace earlier generated setup blocks
pnpm11/os/env/path-extender-posix/src/path-extender-posix.ts, pnpm11/os/env/path-extender-posix/test/path-extender-posix.test.ts, pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs, pnpm/crates/cli/src/cli_args/setup/path_extender/posix/tests.rs, .changeset/setup-path-guard-keeps-pnpm-home-first.md
Setup passes the earlier anywhere-based guard as an outdated block. Configuration updates replace a matching block without overwrite. Nushell does not use this replacement path. The changeset records patch releases for the affected packages.

Priority: ➖ Normal

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

Change: Bug fix · Severity of issue fixed: Medium

Assessment against linked issues

Objective Addressed Explanation
Ensure $PNPM_HOME/bin is first on PATH when setup requests start insertion and the inherited PATH already contains it later [#16635] ✅
Replace an earlier setup guard that matches the directory anywhere, without requiring overwrite [#16635] ✅

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

Merge Risk: ⚪ Minimal · up to 53959

This change makes pnpm setup keep the pnpm bin directory at the requested position in PATH and replaces older generated shell blocks automatically. No merge-blocking risk was identified.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 53959

The change restores the requested executable precedence and limits automatic replacement to recognized generated configuration. No introduced security issue was identified in the inspected setup paths. Concurrent configuration edits and broader shell-input handling remain limitations.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The security-relevant effect is persistent executable precedence in shells sourcing the affected configuration. The inspected paths retain the invoking process's filesystem authority and configuration-location selection; no new service or tenant authority was observed.

Trust Boundaries and Controls

  • observed — Automatic migration uses full-section equality, not marker presence alone. Current-content equality skips writing; recognized legacy equality permits replacement; other differing content retains the explicit overwrite gate. Recognition compares text rather than evaluating shell code.

Resilience and Maintainability Implications

  • observed — The unchanged Rust replacement writer removes its temporary file best-effort after write or rename failure and propagates the error. Replacement avoids publishing partially written target content, but does not provide a setup-wide rollback or cross-process edit lock.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
🧰 Additional context used
📚 Code guidelines (3)
AGENTS.md — auto-discovered
pnpm/AGENTS.md — auto-discovered
pnpm/CODE_STYLE_GUIDE.md — auto-discovered

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.

@codecov-commenter

codecov-commenter commented Oct 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.13115% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.34%. Comparing base (f511b21) to head (5395920).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ates/cli/src/cli_args/setup/path_extender/posix.rs 72.13% 17 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16636      +/-   ##
==========================================
- Coverage   92.35%   92.34%   -0.02%     
==========================================
  Files        1589     1589              
  Lines      209921   209969      +48     
==========================================
+ Hits       193869   193891      +22     
- Misses      16052    16078      +26     

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

@zkochan
zkochan marked this pull request as ready for review October 5, 2026 23:25
Copilot AI balanced review requested due to automatic review settings October 5, 2026 23:25
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                                            main                                   pr
-----                                            ----                                   --
lockfile/parse_pnpm_lock                         1.15     14.3±0.67ms    26.2 MB/sec    1.00     12.5±2.02ms    30.0 MB/sec
packument/parse                                  1.00     47.9±4.49µs  1385.9 MB/sec    1.02     48.8±6.82µs  1358.3 MB/sec
tarball/download_dependency                      1.18      7.0±0.97ms   615.6 KB/sec    1.00      6.0±0.39ms   727.1 KB/sec
tarball_batch/cold_store_many_medium_tarballs    1.32   252.3±21.80ms 63.4 KElem/sec    1.00   190.7±11.13ms 83.9 KElem/sec
version_pick/repeated_ranges_file                1.13      4.5±0.07ms  6.9 KElem/sec    1.00      4.0±0.03ms  7.9 KElem/sec
version_pick/repeated_ranges_raw                 1.27      4.7±0.50ms  6.6 KElem/sec    1.00      3.7±0.08ms  8.4 KElem/sec
workspace_resolution/hoist_heavy                 1.29    256.6±8.52ms        ? ?/sec    1.00   198.9±18.72ms        ? ?/sec
workspace_sort/chained_projects                  1.44     17.6±2.46ms        ? ?/sec    1.00     12.2±0.76ms        ? ?/sec

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.

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Keep PNPM_HOME/bin first on PATH in login shells

🐞 Bug fix 🧪 Tests 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Make setup blocks restore PNPM_HOME/bin to the requested PATH position after login-shell
 reordering.
• Let rerunning setup replace exactly matching older blocks without --force, while preserving
 protection for custom blocks.
• Cover shell rendering, PATH behavior, and migration in Rust and v11 tests.
Diagram

graph TD
  A["pnpm setup"] --> B["Rust CLI"] --> D["Guard renderer"] --> E["Shell rc block"] --> F["Shell PATH"]
  A --> C["v11 extender"] --> D
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Move the existing PATH entry
  • ➕ Avoids retaining a duplicate when the directory was already elsewhere on PATH.
  • ➖ Requires more complex, shell-specific PATH rewriting and creates greater compatibility risk.

Recommendation: Keep the position-aware guards. They restore precedence with small, idempotent shell blocks; an existing entry may remain further down PATH, but removing it is not necessary for the fix.

Files changed (5) +384 / -164

Bug fix (2) +141 / -49
posix.rsRender position-aware guards and migrate old Rust setup blocks +78/-15

Render position-aware guards and migrate old Rust setup blocks

• Changes sh-family and fish blocks to skip PATH insertion only when the directory is already first or last, as requested. Allows an exact match of the previously generated block to be replaced without overwrite; other differing sections still require it. Nushell retains its existing behavior.

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

path-extender-posix.tsApply position-aware guards and block migration in v11 +63/-34

Apply position-aware guards and block migration in v11

• Extracts sh-family and fish block rendering so setup can produce both the new position-aware block and its previous form. An exactly matching previous block is replaced without overwrite; unrelated differing blocks remain protected.

pnpm11/os/env/path-extender-posix/src/path-extender-posix.ts

Tests (2) +236 / -115
tests.rsTest Rust guard rendering, PATH behavior, and migration +97/-23

Test Rust guard rendering, PATH behavior, and migration

• Updates sh-family and fish rendering expectations and verifies that sourcing the POSIX block twice restores PATH precedence without repeatedly prepending. Adds coverage for rendering and replacing an outdated block without overwrite.

pnpm/crates/cli/src/cli_args/setup/path_extender/posix/tests.rs

path-extender-posix.test.tsUpdate v11 shell expectations and test block upgrades +139/-92

Update v11 shell expectations and test block upgrades

• Updates sh-family and fish expectations for first- or last-entry guards. Adds tests confirming that rerunning setup replaces previously generated bash and fish blocks without overwrite.

pnpm11/os/env/path-extender-posix/test/path-extender-posix.test.ts

Documentation (1) +7 / -0
setup-path-guard-keeps-pnpm-home-first.mdAnnounce the setup PATH-precedence fix +7/-0

Announce the setup PATH-precedence fix

• Adds patch changesets for pnpm, pacquet, and the v11 POSIX path extender. Tells users to rerun setup to replace their existing shell block.

.changeset/setup-path-guard-keeps-pnpm-home-first.md

@qodo-code-review

qodo-code-review Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (1) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. V11 users cannot update their shell setup ✓ Resolved
Description
setup_shell and setup_fish_shell recognize an outdated block only by rendering it with Rust's
single-quoted directory, but v11 wrote the directory with double quotes. When a user reruns v12
pnpm setup with a v11 bash, zsh, or fish block, the exact comparison rejects it without --force,
after the command has already installed the CLI and written alias scripts.
Code

pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[R76-79]

+    let outdated = wrap_settings(
+        opts.config_section_name,
+        &render_posix_section(&dir, opts, PathGuard::Anywhere),
+    );
Relevance

●●● Strong

The migration path claims legacy replacement but exact rendering differs across stacks, causing
deterministic rerun failures.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The v12 setup caller uses the pnpm section and PNPM_HOME/bin for both shell paths. The new Rust
outdated renderers single-quote the home directory, whereas v11's renderers double-quote it; the
update accepts only an exact match and otherwise errors without overwrite. The Rust setup caller
performs installation and alias writes before that update.

pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[76-81]
pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[179-184]
pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[119-128]
pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[208-219]
pnpm11/os/env/path-extender-posix/src/path-extender-posix.ts[125-135]
pnpm11/os/env/path-extender-posix/src/path-extender-posix.ts[178-191]
pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[329-336]
pnpm/crates/cli/src/cli_args/setup.rs[59-82]

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

## Issue description
Rust setup's exact outdated-block check does not recognize the double-quoted blocks written by pnpm v11, so rerunning setup fails without `--force`.

## Fix Focus Areas
- pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[76-81]
- pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[179-184]
- pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[329-335]

## Recommended Fix
Render the exact v11 POSIX and fish block formats as additional accepted outdated variants. Keep replacement restricted to exact known generated blocks, and test migration from v11-formatted configuration in both shell families.

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



Remediation recommended

2. Shell-expanded homes block setup migration 🐞 Bug ≡ Correctness ⭐ New
Description
v11_quote builds an exact-match candidate from the current PNPM_HOME, which may differ from the
literal directory written in a v11 block after the shell expands $ or backslashes. When a user
reruns setup from a shell that sourced such a block, update_shell_config rejects it without
--force, leaving the old block in place.
Code

pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[R76-79]

+    let outdated = [sh_quote, v11_quote].map(|quote_value| {
+        let settings = render_posix_section(&dir, opts, PathGuard::Anywhere, quote_value);
+        wrap_settings(opts.config_section_name, &settings)
+    });
Relevance

●●● Strong

Explicit migration intent and shell-expansion mismatch make this a concrete correctness fix.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The setup handler obtains its directory from default_pnpm_home_dir, which prefers the process's
PNPM_HOME. The new candidate renders that value inside unescaped double quotes, while replacement
requires exact equality with the stored section; a sourced v11 assignment such as
PNPM_HOME="/tmp/$HOME/pnpm" can therefore produce a different candidate from the text in the rc
file.

pnpm/crates/cli/src/cli_args/setup.rs[49-57]
pnpm/crates/config/src/defaults.rs[115-132]
pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[73-80]
pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[149-154]
pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[345-352]

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 v11 block containing shell expansion can set the current `PNPM_HOME` to a value different from the literal value stored in the block, so exact-match migration fails.

## Fix Focus Areas
- pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[76-80]
- pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[149-154]
- pnpm/crates/cli/src/cli_args/setup/path_extender/posix/tests.rs[161-179]

## Recommended Fix
Recognize the original v11 block safely when its stored directory and current environment value differ through shell expansion. Add a test using a literal dollar sign in the stored directory; do not evaluate shell text to perform the match.

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

Dismiss ↗ | View ↗


3. One release note mixes v11 and v12 📘 Rule violation § Compliance
Description
The setup-path-guard-keeps-pnpm-home-first.md changeset targets both the TypeScript packages and
the Rust pacquet package in one file. Because this PR changes both stacks, release tooling cannot
maintain separate version-specific release notes as required.
Code

.changeset/setup-path-guard-keeps-pnpm-home-first.md[R2-4]

+"@pnpm/os.env.path-extender-posix": patch
+"pnpm": patch
+"pacquet": patch
Relevance

●●● Strong

Recent reviews consistently require separate v11 and v12 changesets when pnpm and pacquet are both
targeted.

PR-#16479
PR-#15895

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The checklist requires separate changeset files when a single PR changes both the v11 TypeScript
stack and the v12 Rust stack, with each file targeting only the appropriate package set. The added
changeset instead lists @pnpm/os.env.path-extender-posix, pnpm, and pacquet together.

Rule 713436: Changesets for pnpm v11 vs v12 (pacquet) must target the correct package and bump type
.changeset/setup-path-guard-keeps-pnpm-home-first.md[2-4]

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 PR uses one changeset for both pnpm v11 TypeScript packages and the pnpm v12 Rust `pacquet` package, instead of separate changeset files for each supported version.

## Fix Focus Areas
- .changeset/setup-path-guard-keeps-pnpm-home-first.md[1-7]

## Recommended Fix
Split this into separate changeset files: one targeting `@pnpm/os.env.path-extender-posix` and `pnpm` with a patch bump, and another targeting `pacquet` with an appropriate bump. Keep each release note scoped to the behavior shipped by its corresponding stack.

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

Dismiss ↗ | View ↗


Grey Divider

Context sources
✅ Compliance rules (platform): 66 rules
✅ Cross-repo context — repo relationships
  Explored: repo: pnpm/get.pnpm.io (sha: 5f964df3) — View relationship
Review mode: Auto: ⚖️ Balanced: Shell rendering and migration matching carry real security and compatibility risk.

Grey Divider

Tip of the day
💡 Did you know, you can turn on the rule miner and Qodo learns your standards from review history

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous reviews

Review updated until commit 5395920

Results up to commit bc58dd1 🧠 Deep


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


Action required
1. V11 users cannot update their shell setup ✓ Resolved
Description
setup_shell and setup_fish_shell recognize an outdated block only by rendering it with Rust's
single-quoted directory, but v11 wrote the directory with double quotes. When a user reruns v12
pnpm setup with a v11 bash, zsh, or fish block, the exact comparison rejects it without --force,
after the command has already installed the CLI and written alias scripts.
Code

pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[R76-79]

+    let outdated = wrap_settings(
+        opts.config_section_name,
+        &render_posix_section(&dir, opts, PathGuard::Anywhere),
+    );
Relevance

●●● Strong

The migration path claims legacy replacement but exact rendering differs across stacks, causing
deterministic rerun failures.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The v12 setup caller uses the pnpm section and PNPM_HOME/bin for both shell paths. The new Rust
outdated renderers single-quote the home directory, whereas v11's renderers double-quote it; the
update accepts only an exact match and otherwise errors without overwrite. The Rust setup caller
performs installation and alias writes before that update.

pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[76-81]
pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[179-184]
pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[119-128]
pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[208-219]
pnpm11/os/env/path-extender-posix/src/path-extender-posix.ts[125-135]
pnpm11/os/env/path-extender-posix/src/path-extender-posix.ts[178-191]
pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[329-336]
pnpm/crates/cli/src/cli_args/setup.rs[59-82]

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

## Issue description
Rust setup's exact outdated-block check does not recognize the double-quoted blocks written by pnpm v11, so rerunning setup fails without `--force`.

## Fix Focus Areas
- pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[76-81]
- pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[179-184]
- pnpm/crates/cli/src/cli_args/setup/path_extender/posix.rs[329-335]

## Recommended Fix
Render the exact v11 POSIX and fish block formats as additional accepted outdated variants. Keep replacement restricted to exact known generated blocks, and test migration from v11-formatted configuration in both shell families.

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



Remediation recommended
2. One release note mixes v11 and v12 📘 Rule violation § Compliance
Description
The setup-path-guard-keeps-pnpm-home-first.md changeset targets both the TypeScript packages and
the Rust pacquet package in one file. Because this PR changes both stacks, release tooling cannot
maintain separate version-specific release notes as required.
Code

.changeset/setup-path-guard-keeps-pnpm-home-first.md[R2-4]

+"@pnpm/os.env.path-extender-posix": patch
+"pnpm": patch
+"pacquet": patch
Relevance

●●● Strong

Recent reviews consistently require separate v11 and v12 changesets when pnpm and pacquet are both
targeted.

PR-#16479
PR-#15895

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The checklist requires separate changeset files when a single PR changes both the v11 TypeScript
stack and the v12 Rust stack, with each file targeting only the appropriate package set. The added
changeset instead lists @pnpm/os.env.path-extender-posix, pnpm, and pacquet together.

Rule 713436: Changesets for pnpm v11 vs v12 (pacquet) must target the correct package and bump type
.changeset/setup-path-guard-keeps-pnpm-home-first.md[2-4]

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 PR uses one changeset for both pnpm v11 TypeScript packages and the pnpm v12 Rust `pacquet` package, instead of separate changeset files for each supported version.

## Fix Focus Areas
- .changeset/setup-path-guard-keeps-pnpm-home-first.md[1-7]

## Recommended Fix
Split this into separate changeset files: one targeting `@pnpm/os.env.path-extender-posix` and `pnpm` with a patch bump, and another targeting `pacquet` with an appropriate bump. Keep each release note scoped to the behavior shipped by its corresponding stack.

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

Dismiss ↗ | View ↗


Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

No code suggestions found for the PR.

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Same-run regression check

HEAD and main are measured on the same runner. The tolerance is 5% of the main median or 2 ms, whichever is larger. A regression requires both the median slowdown and the gap between the fastest retained HEAD sample and slowest retained main sample to exceed this tolerance, after trimming up to 10% from each tail. Suspected regressions are rerun once with target order reversed and only fail if reproduced. This conservative noise guard is not a statistical confidence interval.

Inconclusive rows do not fail the check. They remain visible for performance review. Bencher retains absolute minimum timings for historical tracking; historical alerts do not gate this PR. Sequential measurements can still be affected by runner drift.

Scenario Engine main median HEAD median Change Tolerance Result
isolated-fresh-restore-cold-cache-cold-store pacquet 2345.04 ms 2502.49 ms 6.7% 117.25 ms Inconclusive (overlapping samples)
isolated-fresh-restore-cold-cache-cold-store pnpr 1431.82 ms 1449.37 ms 1.2% 71.59 ms Within tolerance
isolated-fresh-restore-hot-cache-hot-store pacquet 316.78 ms 309.19 ms -2.4% 15.84 ms Within tolerance
isolated-fresh-restore-hot-cache-hot-store pnpr 375.35 ms 334.33 ms -10.9% 18.77 ms Within tolerance
isolated-repeat-install-hot-cache-hot-store pacquet 22.97 ms 21.17 ms -7.8% 2.00 ms Within tolerance
isolated-repeat-install-hot-cache-hot-store pnpr 19.53 ms 17.87 ms -8.5% 2.00 ms Within tolerance
isolated-repeat-install-cold-cache-hot-store pacquet 10.29 ms 10.88 ms 5.7% 2.00 ms Within tolerance
isolated-repeat-install-cold-cache-hot-store pnpr 10.26 ms 11.05 ms 7.7% 2.00 ms Within tolerance
isolated-fresh-install-cold-cache-cold-store pacquet 2522.37 ms 2490.96 ms -1.2% 126.12 ms Within tolerance
isolated-fresh-install-cold-cache-cold-store pnpr 1803.32 ms 1638.13 ms -9.2% 90.17 ms Within tolerance
isolated-fresh-install-hot-cache-hot-store pacquet 665.94 ms 594.90 ms -10.7% 33.30 ms Within tolerance
isolated-fresh-install-hot-cache-hot-store pnpr 412.07 ms 399.45 ms -3.1% 20.60 ms Within tolerance
isolated-fresh-install-cold-cache-hot-store pacquet 1767.33 ms 1770.54 ms 0.2% 88.37 ms Within tolerance
isolated-fresh-install-cold-cache-hot-store pnpr 368.08 ms 366.44 ms -0.4% 18.40 ms Within tolerance
isolated-fresh-resolve-hot-cache-offline pacquet 354.49 ms 260.34 ms -26.6% 17.72 ms Within tolerance
isolated-fresh-resolve-hot-cache-offline pnpr 134.78 ms 135.21 ms 0.3% 6.74 ms Within tolerance
isolated-peer-heavy-resolve-hot-cache-offline pacquet 231.56 ms 252.69 ms 9.1% 11.58 ms Inconclusive (overlapping samples)
isolated-linked-workspace-resolve-hot-cache-offline pacquet 242.32 ms 231.44 ms -4.5% 12.12 ms Within tolerance
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pacquet 4692.85 ms 5180.27 ms 10.4% 234.64 ms Inconclusive (overlapping samples)
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pnpr 3736.33 ms 3781.04 ms 1.2% 186.82 ms Within tolerance
gvs-fresh-restore-hot-cache-hot-store pacquet 213.44 ms 209.33 ms -1.9% 10.67 ms Within tolerance
gvs-fresh-restore-hot-cache-hot-store pnpr 203.79 ms 196.70 ms -3.5% 10.19 ms Within tolerance

Integrated-Benchmark Report (Linux)

Commit: bc58dd15f177

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

The tables below show mean ± σ. Bencher tracks absolute minimum latency; PR regression checks compare HEAD and main samples from the same runner. Historical timing alerts do not gate PRs.

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.475 ± 0.158 2.260 2.697 1.72 ± 0.17
pacquet@main 2.374 ± 0.112 2.262 2.603 1.65 ± 0.15
pnpr@HEAD 1.437 ± 0.115 1.291 1.622 1.00 ± 0.11
pnpr@main 1.436 ± 0.108 1.303 1.633 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.4750703497,
      "stddev": 0.15780660830074497,
      "median": 2.5024945678,
      "user": 1.3141202599999997,
      "system": 1.4136236599999998,
      "min": 2.2604009863,
      "max": 2.6968040943
    },
    {
      "command": "pacquet@main",
      "mean": 2.3736228084,
      "stddev": 0.1121737004946011,
      "median": 2.3450439368,
      "user": 1.3408645600000002,
      "system": 1.4188204599999998,
      "min": 2.2619254483,
      "max": 2.6034572863
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.4368778711999999,
      "stddev": 0.11497812100229808,
      "median": 1.4493661548,
      "user": 1.1970800599999998,
      "system": 1.3235986599999998,
      "min": 1.2914811773000001,
      "max": 1.6221245303
    },
    {
      "command": "pnpr@main",
      "mean": 1.4360205655000002,
      "stddev": 0.10796116998372239,
      "median": 1.4318243898,
      "user": 1.2060514599999999,
      "system": 1.2686894599999998,
      "min": 1.3031411933000001,
      "max": 1.6329897343000002
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 310.7 ± 20.6 273.7 345.4 1.00
pacquet@main 332.3 ± 61.6 278.4 447.4 1.07 ± 0.21
pnpr@HEAD 345.7 ± 40.0 308.1 452.0 1.11 ± 0.15
pnpr@main 387.2 ± 41.7 329.3 460.1 1.25 ± 0.16
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.31067205768,
      "stddev": 0.020604842162810607,
      "median": 0.30918601068,
      "user": 0.36930752,
      "system": 0.6996094600000001,
      "min": 0.27367230018,
      "max": 0.34544966718
    },
    {
      "command": "pacquet@main",
      "mean": 0.33225633107999997,
      "stddev": 0.06162736931632491,
      "median": 0.31678236368,
      "user": 0.41001852000000005,
      "system": 0.76509926,
      "min": 0.27838977918,
      "max": 0.44738069618
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.34571289048000003,
      "stddev": 0.040029824667357654,
      "median": 0.33433476418,
      "user": 0.37009981999999997,
      "system": 0.73032476,
      "min": 0.30806014818,
      "max": 0.45196107518
    },
    {
      "command": "pnpr@main",
      "mean": 0.38721853278,
      "stddev": 0.04166970533045206,
      "median": 0.37535445468,
      "user": 0.4403322199999999,
      "system": 0.7899239599999999,
      "min": 0.32927787618,
      "max": 0.46008521018000004
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 21.4 ± 3.5 14.2 28.4 1.14 ± 0.27
pacquet@main 23.0 ± 5.0 14.0 35.5 1.23 ± 0.34
pnpr@HEAD 18.7 ± 3.3 12.8 27.9 1.00
pnpr@main 19.9 ± 3.5 13.2 28.2 1.06 ± 0.26
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.02136328197,
      "stddev": 0.0034638926785608586,
      "median": 0.021170269220000003,
      "user": 0.010442724583333335,
      "system": 0.012738912916666666,
      "min": 0.014190453220000001,
      "max": 0.02844497522
    },
    {
      "command": "pacquet@main",
      "mean": 0.023046025176896554,
      "stddev": 0.004994639508047476,
      "median": 0.022967339720000004,
      "user": 0.011848144482758614,
      "system": 0.012740428965517242,
      "min": 0.01397579822,
      "max": 0.03554923822
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.018710609742522522,
      "stddev": 0.0032997020089035704,
      "median": 0.01787069022,
      "user": 0.009683490630630634,
      "system": 0.011002841441441443,
      "min": 0.012833854220000001,
      "max": 0.027915943220000003
    },
    {
      "command": "pnpr@main",
      "mean": 0.01991089917757577,
      "stddev": 0.003461603196448378,
      "median": 0.01952855322,
      "user": 0.010483339636363633,
      "system": 0.011390971151515149,
      "min": 0.013199745220000001,
      "max": 0.028172127220000003
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 11.0 ± 1.4 8.4 16.0 1.04 ± 0.19
pacquet@main 12.2 ± 4.0 7.9 24.5 1.15 ± 0.41
pnpr@HEAD 11.4 ± 2.7 7.6 21.6 1.08 ± 0.30
pnpr@main 10.6 ± 1.5 7.9 15.0 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.010978042610526319,
      "stddev": 0.0013789911871144166,
      "median": 0.010877218400000003,
      "user": 0.006189632894736843,
      "system": 0.005815805526315791,
      "min": 0.008405468900000001,
      "max": 0.0159895619
    },
    {
      "command": "pacquet@main",
      "mean": 0.012182767286973182,
      "stddev": 0.003997969500410167,
      "median": 0.010293406900000001,
      "user": 0.007250117241379311,
      "system": 0.005935886130268195,
      "min": 0.0078550249,
      "max": 0.024513560900000002
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.011447414162068964,
      "stddev": 0.0027449171054928986,
      "median": 0.011047118900000001,
      "user": 0.007281993103448275,
      "system": 0.0052007508965517205,
      "min": 0.0075924299,
      "max": 0.0215912309
    },
    {
      "command": "pnpr@main",
      "mean": 0.010603655294531248,
      "stddev": 0.001467024342254132,
      "median": 0.010256639400000002,
      "user": 0.0061505078125,
      "system": 0.005360461406249998,
      "min": 0.0079391109,
      "max": 0.014967349900000001
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.509 ± 0.077 2.454 2.725 1.48 ± 0.14
pacquet@main 2.528 ± 0.055 2.462 2.638 1.49 ± 0.14
pnpr@HEAD 1.692 ± 0.148 1.555 2.022 1.00
pnpr@main 1.805 ± 0.096 1.651 1.944 1.07 ± 0.11
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.5092502182400005,
      "stddev": 0.07696533013250638,
      "median": 2.4909602906400004,
      "user": 1.8348333399999999,
      "system": 1.6169574799999995,
      "min": 2.4542338801400003,
      "max": 2.7249894661400003
    },
    {
      "command": "pacquet@main",
      "mean": 2.5281375398400003,
      "stddev": 0.05496870953706131,
      "median": 2.52236766514,
      "user": 1.9469861399999995,
      "system": 1.57304828,
      "min": 2.46167685114,
      "max": 2.63839918014
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.6920851600400002,
      "stddev": 0.14848839517864085,
      "median": 1.63813426914,
      "user": 1.7279502399999997,
      "system": 1.73896148,
      "min": 1.55450969314,
      "max": 2.02172624014
    },
    {
      "command": "pnpr@main",
      "mean": 1.80473221914,
      "stddev": 0.09634608781782648,
      "median": 1.8033199506400002,
      "user": 2.15746164,
      "system": 2.21446498,
      "min": 1.6509898951400002,
      "max": 1.9437214551400002
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 591.4 ± 33.6 531.2 648.0 1.46 ± 0.09
pacquet@main 660.4 ± 40.0 588.1 717.4 1.64 ± 0.11
pnpr@HEAD 403.9 ± 10.9 394.7 428.9 1.00
pnpr@main 413.6 ± 16.9 386.0 442.3 1.02 ± 0.05
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.59139078292,
      "stddev": 0.03363515859391515,
      "median": 0.5949047432200001,
      "user": 0.8541943599999999,
      "system": 1.0209747599999999,
      "min": 0.5312101152200001,
      "max": 0.64796096122
    },
    {
      "command": "pacquet@main",
      "mean": 0.6604088865200001,
      "stddev": 0.04003363657528628,
      "median": 0.66593998922,
      "user": 0.96312216,
      "system": 1.1427510599999997,
      "min": 0.58810903122,
      "max": 0.7174296952200001
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.40389970892000004,
      "stddev": 0.010934124830017858,
      "median": 0.39944658172,
      "user": 0.40291215999999996,
      "system": 0.8696964600000001,
      "min": 0.39468194522000005,
      "max": 0.42894712322000006
    },
    {
      "command": "pnpr@main",
      "mean": 0.4135912063200001,
      "stddev": 0.016891085053062194,
      "median": 0.41206518772000006,
      "user": 0.39509866000000005,
      "system": 0.8899116599999999,
      "min": 0.38604535222,
      "max": 0.44229125222000004
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.768 ± 0.052 1.693 1.874 4.83 ± 0.17
pacquet@main 1.794 ± 0.066 1.743 1.958 4.90 ± 0.21
pnpr@HEAD 0.366 ± 0.007 0.353 0.376 1.00
pnpr@main 0.368 ± 0.012 0.352 0.385 1.00 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.7681027577000001,
      "stddev": 0.05151768641888964,
      "median": 1.7705441226,
      "user": 1.17231842,
      "system": 1.20670388,
      "min": 1.6932728631,
      "max": 1.8735458881
    },
    {
      "command": "pacquet@main",
      "mean": 1.7944353044000003,
      "stddev": 0.06588354061594995,
      "median": 1.7673270931,
      "user": 1.26456452,
      "system": 1.27336158,
      "min": 1.7431142981,
      "max": 1.9576987531
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.36584527160000013,
      "stddev": 0.007321166996295408,
      "median": 0.3664355021,
      "user": 0.34763392,
      "system": 0.79157218,
      "min": 0.3534502161,
      "max": 0.37611737510000004
    },
    {
      "command": "pnpr@main",
      "mean": 0.36753110800000005,
      "stddev": 0.012120733746210404,
      "median": 0.3680755136,
      "user": 0.37065172,
      "system": 0.7722211799999998,
      "min": 0.35160511510000003,
      "max": 0.3848239631
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 262.6 ± 24.0 233.9 314.9 1.94 ± 0.20
pacquet@main 350.4 ± 25.3 304.0 381.1 2.59 ± 0.22
pnpr@HEAD 135.5 ± 6.2 121.7 146.1 1.00
pnpr@main 139.9 ± 21.6 114.2 223.2 1.03 ± 0.17
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.2626144847033333,
      "stddev": 0.024048791844033354,
      "median": 0.26033838362000006,
      "user": 0.2499519,
      "system": 0.11014882,
      "min": 0.23391853962000003,
      "max": 0.31489332562000005
    },
    {
      "command": "pacquet@main",
      "mean": 0.3503986500200001,
      "stddev": 0.025312588750961124,
      "median": 0.3544918771200001,
      "user": 0.3669294,
      "system": 0.15230441999999997,
      "min": 0.30396034162,
      "max": 0.38108668962000003
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.13548972481047616,
      "stddev": 0.006197988048354168,
      "median": 0.13520627662,
      "user": 0.06844230476190478,
      "system": 0.02590834380952381,
      "min": 0.12169337362,
      "max": 0.14613574562000003
    },
    {
      "command": "pnpr@main",
      "mean": 0.13989317949500005,
      "stddev": 0.02155963812445696,
      "median": 0.13478405862000004,
      "user": 0.06143135833333333,
      "system": 0.03288119500000001,
      "min": 0.11419022562,
      "max": 0.22319411262000002
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 248.7 ± 18.7 221.6 280.1 1.07 ± 0.13
pacquet@main 232.8 ± 22.9 203.4 274.4 1.00
pnpm@HEAD 4154.7 ± 344.5 3815.5 4774.7 17.85 ± 2.30
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.2486975506777778,
      "stddev": 0.01870236713834125,
      "median": 0.2526865369,
      "user": 0.2586524288888889,
      "system": 0.04787640444444444,
      "min": 0.22159365690000002,
      "max": 0.2801214299
    },
    {
      "command": "pacquet@main",
      "mean": 0.2327727046777778,
      "stddev": 0.02294272543036303,
      "median": 0.23156456890000002,
      "user": 0.2341906511111111,
      "system": 0.04683940444444444,
      "min": 0.20342191790000003,
      "max": 0.2743530079
    },
    {
      "command": "pnpm@HEAD",
      "mean": 4.154700881677778,
      "stddev": 0.3445452580160133,
      "median": 4.0071011559,
      "user": 6.314500095555555,
      "system": 0.45090729333333335,
      "min": 3.8155056229,
      "max": 4.7747188919
    }
  ]
}

Scenario: Isolated linker: linked-workspace resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 233.3 ± 13.8 217.6 261.4 1.00
pacquet@main 241.8 ± 13.7 215.8 266.5 1.04 ± 0.09
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.23326488624,
      "stddev": 0.01383700077234994,
      "median": 0.23143653874000003,
      "user": 0.19279306666666662,
      "system": 0.08477668999999999,
      "min": 0.21762851024000002,
      "max": 0.26135004124000005
    },
    {
      "command": "pacquet@main",
      "mean": 0.24178410660363633,
      "stddev": 0.013706884774121325,
      "median": 0.24231755424,
      "user": 0.1923579,
      "system": 0.09625462181818181,
      "min": 0.21583111024,
      "max": 0.26653524224
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 5.116 ± 0.284 4.607 5.561 1.36 ± 0.10
pacquet@main 4.725 ± 0.192 4.475 5.097 1.25 ± 0.08
pnpr@HEAD 3.824 ± 0.211 3.593 4.311 1.01 ± 0.07
pnpr@main 3.774 ± 0.183 3.557 4.143 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 5.11642651068,
      "stddev": 0.2837866838747116,
      "median": 5.18026690618,
      "user": 2.3788949800000005,
      "system": 2.21172168,
      "min": 4.6072241601799995,
      "max": 5.561163834179999
    },
    {
      "command": "pacquet@main",
      "mean": 4.72466424998,
      "stddev": 0.1919601886414577,
      "median": 4.69285026418,
      "user": 2.0008102800000005,
      "system": 1.9258864800000002,
      "min": 4.4754521151799995,
      "max": 5.09659669718
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.8240944758800004,
      "stddev": 0.21060848144769154,
      "median": 3.7810363896800006,
      "user": 2.16053818,
      "system": 1.96839468,
      "min": 3.5934911031800003,
      "max": 4.31148348418
    },
    {
      "command": "pnpr@main",
      "mean": 3.77350682848,
      "stddev": 0.1825465770599294,
      "median": 3.7363296736800002,
      "user": 1.9213238799999999,
      "system": 1.8287671799999998,
      "min": 3.5566483891800003,
      "max": 4.1430818261799995
    }
  ]
}

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

Same install as the isolated fresh-restore hot/hot scenario, into the shared virtual store, the layout pnpm 12 installs into by default. Scenarios run on separate machines, so compare main and branch within each table.

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 206.1 ± 18.6 174.0 233.9 1.00
pacquet@main 219.7 ± 24.6 192.9 263.6 1.07 ± 0.15
pnpr@HEAD 207.0 ± 20.5 186.3 241.2 1.00 ± 0.13
pnpr@main 216.4 ± 31.6 180.1 280.1 1.05 ± 0.18
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.2061226600909091,
      "stddev": 0.018617431575449365,
      "median": 0.209327381,
      "user": 0.25538474181818177,
      "system": 0.17168830545454544,
      "min": 0.17400052900000001,
      "max": 0.23394751200000002
    },
    {
      "command": "pacquet@main",
      "mean": 0.21972376050000003,
      "stddev": 0.02463927078705682,
      "median": 0.21343759550000002,
      "user": 0.26374036,
      "system": 0.17992835999999998,
      "min": 0.19285586600000001,
      "max": 0.263594665
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.20704222627272728,
      "stddev": 0.020525425774589136,
      "median": 0.19669598100000002,
      "user": 0.25115365090909086,
      "system": 0.16196385090909088,
      "min": 0.186312631,
      "max": 0.24123918800000002
    },
    {
      "command": "pnpr@main",
      "mean": 0.21635635592307698,
      "stddev": 0.03162705245115252,
      "median": 0.203794426,
      "user": 0.2589587138461539,
      "system": 0.16922375999999997,
      "min": 0.18008246500000002,
      "max": 0.280084378
    }
  ]
}

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Oct 5, 2026
pnpm v11 wrote the PNPM_HOME value in double quotes, while v12 single-
quotes it, so the exact-match migration in v12 missed every block a v11
`pnpm setup` wrote and still demanded --force. Accept both renderings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 5, 2026 23:38

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.

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@zkochan

zkochan commented Oct 5, 2026

Copy link
Copy Markdown
Member Author

On Qodo's second finding (one changeset targeting both pnpm and pacquet): not acting. AGENTS.md allows one changeset for both release lines when the same release-note text applies to every target. Here it does. Both CLIs wrote the same position-blind guard before this PR, both now keep $PNPM_HOME/bin first, and in both, re-running pnpm setup replaces the old block without --force.


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

@qodo-code-review

Copy link
Copy Markdown

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

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

@zkochan
zkochan merged commit 009521c into main Oct 5, 2026
66 checks passed
@zkochan
zkochan deleted the fix-16635 branch October 5, 2026 23:50
zkochan added a commit that referenced this pull request Nov 19, 2026
Run the generated zsh block under sh, sourced twice, and check that the
pnpm bin directory ends up first on PATH. The case from #7799
(the directory already on PATH but behind another entry) is covered,
along with the directory already first and the directory missing. The
fix itself landed in #16636; the Rust CLI already has the
equivalent test.

---------

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Zoltan Kochan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

pnpm setup PATH guard leaves $PNPM_HOME/bin behind system paths in login shells that inherit PATH, so the global node shim is bypassed

3 participants