Skip to content

fix(fetch): link virtual-store bins so dependency build scripts resolve siblings - #14178

Merged
zkochan merged 3 commits into
mainfrom
fix-14174
Aug 26, 2026
Merged

zkochan merged 3 commits into
mainfrom
fix-14174

Conversation

@zkochan

@zkochan zkochan commented Aug 25, 2026 •

Copy link
Copy Markdown
Member

Summary

pnpm fetch in 12.0.0-rc.11 failed any dependency postinstall that invokes a
sibling dependency's bin — the reporter hit it with unrs-resolver calling
napi-postinstall, which killed every Docker multi-stage build whose fetcher
stage touches oxlint/eslint tooling:

sh: napi-postinstall: command not found
× fetching dependencies
╰─▶ [email protected] postinstall: … exited with exit status: 127

pnpm install --frozen-lockfile against the same lockfile succeeded.

In the Rust CLI, run_link_phase returned early under virtual_store_only
(which pnpm fetch sets) before reaching LinkVirtualStoreBins, while
run_build_phase still ran dependency lifecycle scripts under that mode. The
scripts therefore ran with no node_modules/.bin for
pnpm_executor::extend_path's ancestor walk to find.

The per-slot bin pass now runs under virtual_store_only too: its links live
inside the virtual store, which is exactly what that mode materializes. Only
the importer-facing passes — prune, direct-dependency symlinks, root
components, hoisting, and the module-resolution sidecars — stay skipped, so
fetch still leaves the project untouched.

The TypeScript CLI is unaffected: its buildModules links a dep node's bins
itself right before running that node's scripts, which is why pnpm 11.11.0
worked. It gets the matching regression test only (plus the one-word
allowBuilds widening on FetchCommandOptions that the test needs to compile).

Closes #14174

Second commit: comment cleanup in linking.rs

linking.rs was 38% comment lines, and touching it for this fix surfaced how
much of that prose the code and the callees' own docs already carried — a call
site restating HoistedLinkerOutput's field docs, a rationale duplicated at
both the declaration and the assignment, two comments sitting above the wrong
binding, and one sentence describing a mapping the call site does not perform.
The second commit removes those. Gate and ordering rationale stays: why a pass
is skipped under nodeLinker: hoisted or virtualStoreOnly, why
reconciliation precedes relinking, why the hoist plan is computed before
SymlinkDirectDependencies. Comment lines 192 → 117, code lines unchanged at
301 — stripping comments from both revisions yields identical files.

Squash Commit Body

`run_link_phase` returned early under `virtual_store_only` before reaching
`LinkVirtualStoreBins`, while `run_build_phase` still ran dependency
lifecycle scripts under that mode. A `postinstall` that invokes a sibling
dependency's bin — `unrs-resolver` calling `napi-postinstall`, for
instance — therefore died with `command not found` (exit 127) under
`pnpm fetch`, because `pnpm_executor::extend_path`'s ancestor-`.bin` walk
had no `.bin` to find. `pnpm install --frozen-lockfile` against the same
lockfile worked: it does not set `virtual_store_only`.

The per-slot bin pass now runs under `virtual_store_only` too. Its links
live inside the virtual store, which is exactly what that mode
materializes; only the importer-facing passes (prune, direct-dependency
symlinks, root components, hoisting, sidecars) stay skipped.

The TypeScript CLI is unaffected — its `buildModules` links a dep node's
bins itself right before running the node's scripts — so it gets the
matching regression test only, plus the `allowBuilds` widening that test
needs on `FetchCommandOptions`.

Closes pnpm/pnpm#14174

Checklist

  • I checked the referenced issue and verified that none of the PRs
    already linked to it solves it.
  • 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).

Summary by CodeRabbit

  • Bug Fixes

    • pnpm fetch now links dependency binaries in the virtual store, allowing permitted lifecycle scripts to invoke sibling commands.
    • Fixed failures in manifest-less, lockfile-only fetch workflows, including Docker build stages.
    • Fetch operations now honor configured build permissions.
  • Tests

    • Added regression coverage confirming build scripts run successfully and generated binaries and files are available during fetch.

…ve siblings

`run_link_phase` returned early under `virtual_store_only` before reaching
`LinkVirtualStoreBins`, while `run_build_phase` still ran dependency
lifecycle scripts under that mode. A `postinstall` that invokes a sibling
dependency's bin — `unrs-resolver` calling `napi-postinstall`, for
instance — therefore died with `command not found` (exit 127) under
`pnpm fetch`, because `pnpm_executor::extend_path`'s ancestor-`.bin` walk
had no `.bin` to find. `pnpm install --frozen-lockfile` against the same
lockfile worked: it does not set `virtual_store_only`.

The per-slot bin pass now runs under `virtual_store_only` too. Its links
live inside the virtual store, which is exactly what that mode
materializes; only the importer-facing passes (prune, direct-dependency
symlinks, root components, hoisting, sidecars) stay skipped.

The TypeScript CLI is unaffected — its `buildModules` links a dep node's
bins itself right before running the node's scripts — so it gets the
matching regression test only, plus the `allowBuilds` widening that test
needs on `FetchCommandOptions`.

Closes #14174
Copilot AI lite review requested due to automatic review settings August 25, 2026 23:39

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 25, 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: 87e3e696-6bd9-4c7d-954d-8c73480c5690

📥 Commits

Reviewing files that changed from the base of the PR and between 1188c20 and d9d3b97.

📒 Files selected for processing (2)
  • .changeset/fetch-command-options-declare-allow-builds.md
  • pnpm/crates/deps-restorer/src/linking.rs

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

pnpm fetch now links dependency bins in the virtual store during manifest-less fetches. Allowed lifecycle scripts can invoke sibling dependency binaries. Rust and TypeScript regression tests cover the behavior, and changesets document the patch releases.

Changes

Fetch virtual-store bin linking

Layer / File(s) Summary
Virtual-store link phase
pnpm/crates/deps-restorer/src/install_frozen_lockfile/build_phase.rs, pnpm/crates/deps-restorer/src/linking.rs
virtual_store_only runs the virtual-store bin pass, skips importer-level linking, and returns empty outputs. Hoist-link operations use extracted private helpers.
Fetch wiring and regression validation
pnpm11/installing/commands/src/fetch.ts, pnpm/crates/cli/tests/suite/fetch.rs, pnpm11/installing/commands/test/fetch.ts, .changeset/*
fetch carries allowBuilds into installation processing. Regression tests verify sibling dependency bin resolution and postinstall output without a project manifest. Changesets document the patch releases.

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

Merge Risk: ⚪ Minimal · up to d9d3b

The change makes dependency build scripts resolve sibling binaries during fetch without changing importer-facing installation behavior; no actionable merge-blocking risk remains beyond normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant FetchCommand
  participant LinkPhase
  participant LifecycleScript
  FetchCommand->>LinkPhase: run virtual_store_only linking
  LinkPhase->>LinkPhase: create virtual-store dependency bin links
  LinkPhase->>LifecycleScript: expose sibling dependency bin
  LifecycleScript->>LifecycleScript: run allowed build script
Loading

Assessment against linked issues

Objective Addressed Explanation
Allow pnpm fetch to resolve a dependency's own bin in lifecycle scripts without a project importer [#14174] ✅
Preserve lifecycle script execution for allowed builds during manifest-less fetches [#14174] ✅

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

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

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 fetch lifecycle scripts resolving sibling dependency bins

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

Grey Divider

AI Description

• Link virtual-store dependency bins before fetch runs lifecycle scripts.
• Keep importer-facing links and sidecars skipped in virtual-store-only mode.
• Cover lockfile-only fetch behavior in Rust and TypeScript CLIs.
Diagram

graph TD
  A["pnpm fetch"] --> G{"Store-only mode?"}; G -->|Yes| B["Virtual store"] --> C["Per-slot bins"] --> D["Build phase"] --> E["Lifecycle script"] --> F["Sibling bin"]; G -->|Yes| H["Skip importer links"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Link bins immediately before each build
  • ➕ Narrows linking to packages whose scripts actually run
  • ➕ Matches the TypeScript buildModules strategy
  • ➖ Duplicates link orchestration inside the Rust build phase
  • ➖ Couples script execution more tightly to virtual-store layout
2. Inject sibling bin paths dynamically
  • ➕ Avoids writing per-slot bin links during fetch
  • ➖ Requires reconstructing dependency PATH entries for every script
  • ➖ Risks diverging from normal Node module bin resolution

Recommendation: Keep the PR's centralized LinkVirtualStoreBins pass before the build phase. It preserves normal dependency PATH semantics, confines writes to the virtual store, and cleanly separates store-internal linking from importer-facing materialization.

Files changed (6) +129 / -30

Bug fix (2) +32 / -27
linking.rsRun per-slot bin linking in virtual-store-only mode +31/-26

Run per-slot bin linking in virtual-store-only mode

• Moves the virtual-store-only return after LinkVirtualStoreBins while continuing to skip pruning, direct links, root components, hoisting, and sidecars. This makes sibling binaries available to dependency lifecycle scripts without touching the importer-visible tree.

pnpm/crates/deps-restorer/src/linking.rs

fetch.tsAccept allowBuilds in fetch options +1/-1

Accept allowBuilds in fetch options

• Widens FetchCommandOptions to include allowBuilds so trusted dependency builds can be configured by the regression scenario.

pnpm11/installing/commands/src/fetch.ts

Tests (2) +88 / -0
fetch.rsTest sibling-bin lifecycle scripts during Rust fetch +52/-0

Test sibling-bin lifecycle scripts during Rust fetch

• Adds an end-to-end Rust CLI regression test reproducing a Docker fetcher stage with no project manifest. It verifies both the virtual-store bin link and successful postinstall output.

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

fetch.tsTest sibling-bin lifecycle scripts in TypeScript fetch +36/-0

Test sibling-bin lifecycle scripts in TypeScript fetch

• Adds matching TypeScript CLI coverage for lockfile-only fetch, asserting the dependency bin link exists and postinstall completes.

pnpm11/installing/commands/test/fetch.ts

Documentation (2) +9 / -3
fetch-links-virtual-store-bins.mdDocument virtual-store bin linking fix +5/-0

Document virtual-store bin linking fix

• Adds a patch changeset explaining that fetch now supports lifecycle scripts invoking sibling dependency binaries and references issue #14174.

.changeset/fetch-links-virtual-store-bins.md

build_phase.rsClarify store-only post-build linking behavior +4/-3

Clarify store-only post-build linking behavior

• Updates comments to distinguish skipped importer-bin relinking from dependency builds that still run during fetch.

pnpm/crates/deps-restorer/src/install_frozen_lockfile/build_phase.rs

@qodo-code-review

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

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Remediation recommended

1. Hoist helpers are unrelated 📘 Rule violation ⚙ Maintainability ⭐ New
Description
The new write_hoist_links and relink_importer_bins_after_hoisting extractions only move
pre-existing hoisting and importer-bin logic out of run_link_phase; they are not needed to make
LinkVirtualStoreBins run during virtual_store_only. This broadens a targeted fetch bug fix
with unrelated refactoring.
Code

pnpm/crates/deps-restorer/src/linking.rs[R359-361]

+    let HoistLinks { hoisted_dependencies, publicly_hoisted_with_bins } = match pre_hoist {
+        Some(plan) => write_hoist_links(plan, config, layout, link_options)?,
+        None => HoistLinks::none(),
Evidence
Rule 2255067 requires bug-fix changes to be necessary for the fix. The cited call and helper regions
replace the prior inline symlink_hoisted_dependencies, link_direct_dep_bins_resolved, and
importer-bin loop without contributing to the virtual_store_only gate change at lines 309-330.

Rule 2255067: Bug fix changes must not include unrelated refactors or reformatting
pnpm/crates/deps-restorer/src/linking.rs[359-361]
pnpm/crates/deps-restorer/src/linking.rs[381-386]
pnpm/crates/deps-restorer/src/linking.rs[395-467]

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 extracts existing hoist-link and importer-bin behavior into helpers even though those refactors are unrelated to enabling virtual-store bin linking for `pnpm fetch`.

## Issue Context
The bug fix only requires allowing `LinkVirtualStoreBins` to run before the `virtual_store_only` return. Preserve the prior inline hoisting and importer-bin code so this bug-fix PR remains narrowly scoped.

## Fix Focus Areas
- pnpm/crates/deps-restorer/src/linking.rs[359-361]
- pnpm/crates/deps-restorer/src/linking.rs[381-386]
- pnpm/crates/deps-restorer/src/linking.rs[395-467]

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


2. Unrelated comment refactors included ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
This bug-fix update rewrites generic LinkPhaseInputs and hoisting documentation without changing
behavior or documenting the virtual_store_only bin-link fix. The comment-only churn is unrelated
to issue #14174 and expands the review surface contrary to the bug-fix scope rule.
Code

pnpm/crates/deps-restorer/src/linking.rs[R87-89]

+/// Both install paths supply this. What differs between them is carried
+/// as a field value rather than a branch inside the phase; each such
+/// field documents its per-path value.
Relevance

●●● Strong

Recent history accepts trimming redundant or drift-prone comments, matching this bug-fix scope
concern.

PR-#14142
PR-#14012
PR-#13934

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 2255067 requires every non-whitespace change in a bug-fix PR to be necessary for the fix or its
compilation/testing. The cited regions only rephrase existing documentation about input structure
and hoisting, while the actual issue concerns allowing LinkVirtualStoreBins during
virtual_store_only.

Rule 2255067: Bug fix changes must not include unrelated refactors or reformatting
pnpm/crates/deps-restorer/src/linking.rs[87-89]
pnpm/crates/deps-restorer/src/linking.rs[190-200]
pnpm/crates/deps-restorer/src/linking.rs[311-318]
pnpm/crates/deps-restorer/src/linking.rs[345-365]

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 includes comment-only rewrites unrelated to the `virtual_store_only` bin-linking fix.

## Issue Context
Keep documentation updates that explain the changed fetch/link behavior, but restore unrelated struct and hoisting comments to avoid broadening this bug-fix PR.

## Fix Focus Areas
- pnpm/crates/deps-restorer/src/linking.rs[87-89]
- pnpm/crates/deps-restorer/src/linking.rs[190-200]
- pnpm/crates/deps-restorer/src/linking.rs[311-318]
- pnpm/crates/deps-restorer/src/linking.rs[345-365]

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


3. pnpm missing from changeset 📘 Rule violation § Compliance
Description
The new changeset lists only pacquet and does not declare the required pnpm bump. Add `pnpm:
patch`, which matches this bug-fix release.
Code

.changeset/fetch-links-virtual-store-bins.md[2]

+"pacquet": patch
Relevance

●● Moderate

Recent history is mixed: pnpm-entry requests were accepted and rejected; latest exact compliance
precedent rejected it.

PR-#14142
PR-#13885
PR-#14162

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 713436 requires an explicit pnpm entry with a valid bump type. The new front matter contains
only pacquet: patch, while pnpm11/pnpm/package.json confirms the release package is named
pnpm.

Rule 713436: Explicitly declare pnpm package and correct bump type in changesets
.changeset/fetch-links-virtual-store-bins.md[1-3]
pnpm11/pnpm/package.json[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 omits the required `pnpm` package entry.

## Issue Context
This PR fixes `pnpm fetch`, and compliance rule 713436 requires every changed or added changeset to explicitly declare `pnpm` with a valid bump. The bug fix warrants a `patch` bump.

## Fix Focus Areas
- .changeset/fetch-links-virtual-store-bins.md[1-3]

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


View medium (1)
4. Published TS package omitted 📘 Rule violation § Compliance
Description
The PR changes source in the published @pnpm/installing.commands package, but the new changeset
does not list that package. This leaves the TypeScript package change without the required patch
release declaration.
Code

.changeset/fetch-links-virtual-store-bins.md[2]

+"pacquet": patch
Relevance

●● Moderate

Published-package changeset omissions have both accepted and rejected precedents, including recent
cross-stack cases.

PR-#14114
PR-#14073
PR-#11555

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 713441 requires each affected published TypeScript package to be listed. The changed fetch.ts
belongs to the package named @pnpm/installing.commands, but the new changeset lists only
pacquet.

Rule 713441: Require changeset for TypeScript package changes
.changeset/fetch-links-virtual-store-bins.md[1-3]
pnpm11/installing/commands/src/fetch.ts[49-49]
pnpm11/installing/commands/package.json[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 does not include the affected published TypeScript package `@pnpm/installing.commands`.

## Issue Context
The PR modifies `pnpm11/installing/commands/src/fetch.ts`, and that package's manifest names it `@pnpm/installing.commands`. Compliance rule 713441 requires every changed published TypeScript package to appear in a new changeset with a valid bump; this compile-supporting bug-fix change should use `patch`.

## Fix Focus Areas
- .changeset/fetch-links-virtual-store-bins.md[1-3]
- pnpm11/installing/commands/src/fetch.ts[49-49]

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



Informational

5. Private-hoist path documentation is false ✓ Resolved 🐞 Bug ⚙ Maintainability
Description
The comment says the private-hoist target is always <root>/node_modules/.pnpm/node_modules, but
the next line derives it from configurable config.virtual_store_dir, which may be a user-pinned
path. This false invariant can lead future linking changes to mishandle custom virtual-store
layouts.
Code

pnpm/crates/deps-restorer/src/linking.rs[R362-365]

+        // — so the private-hoist target is always
+        // `<root>/node_modules/.pnpm/node_modules`. Only the symlink
+        // *target* under the slot dir is GVS-aware, which `layout`
+        // resolves.
Relevance

●●● Strong

Recent history accepts fixes for inaccurate documentation and misleading current-behavior
invariants.

PR-#13644
PR-#14152
PR-#14012

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The implementation immediately computes the target from config.virtual_store_dir, while Config
documents that field as configurable and its GVS derivation explicitly preserves user-pinned values
separately from global_virtual_store_dir.

pnpm/crates/deps-restorer/src/linking.rs[359-366]
pnpm/crates/config/src/lib.rs[1071-1083]
pnpm/crates/config/src/lib.rs[2739-2779]

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

## Issue description
Correct the private-hoist comment: the target is not always the default `<root>/node_modules/.pnpm/node_modules`; it is derived from configurable `config.virtual_store_dir`.

## Issue Context
Pacquet keeps the project-local and global virtual-store fields separate, but `virtual_store_dir` itself may be explicitly configured by the user.

## Fix Focus Areas
- pnpm/crates/deps-restorer/src/linking.rs[359-365]

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


Grey Divider

Context sources
✅ Compliance rules (platform): 27 rules
Review mode: ⚖️ Balanced: The push changes runtime Rust linking behavior across virtual-store, hoisting, importer-bin relinking, and fetch/build interactions, creating real correctness and performance risk across several paths, but not enough independent logic to warrant extended review.

Grey Divider

Tip of the day
💡 Did you know, you can start a comment with 'qodo' or '@qodo' to chat about any finding

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous reviews

Review updated until commit d9d3b97

Results up to commit 9548322 ⚖️ Balanced


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


Remediation recommended
1. pnpm missing from changeset 📘 Rule violation § Compliance
Description
The new changeset lists only pacquet and does not declare the required pnpm bump. Add `pnpm:
patch`, which matches this bug-fix release.
Code

.changeset/fetch-links-virtual-store-bins.md[2]

+"pacquet": patch
Relevance

●● Moderate

Recent history is mixed: pnpm-entry requests were accepted and rejected; latest exact compliance
precedent rejected it.

PR-#14142
PR-#13885
PR-#14162

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 713436 requires an explicit pnpm entry with a valid bump type. The new front matter contains
only pacquet: patch, while pnpm11/pnpm/package.json confirms the release package is named
pnpm.

Rule 713436: Explicitly declare pnpm package and correct bump type in changesets
.changeset/fetch-links-virtual-store-bins.md[1-3]
pnpm11/pnpm/package.json[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 omits the required `pnpm` package entry.

## Issue Context
This PR fixes `pnpm fetch`, and compliance rule 713436 requires every changed or added changeset to explicitly declare `pnpm` with a valid bump. The bug fix warrants a `patch` bump.

## Fix Focus Areas
- .changeset/fetch-links-virtual-store-bins.md[1-3]

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


2. Published TS package omitted 📘 Rule violation § Compliance
Description
The PR changes source in the published @pnpm/installing.commands package, but the new changeset
does not list that package. This leaves the TypeScript package change without the required patch
release declaration.
Code

.changeset/fetch-links-virtual-store-bins.md[2]

+"pacquet": patch
Relevance

●● Moderate

Published-package changeset omissions have both accepted and rejected precedents, including recent
cross-stack cases.

PR-#14114
PR-#14073
PR-#11555

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 713441 requires each affected published TypeScript package to be listed. The changed fetch.ts
belongs to the package named @pnpm/installing.commands, but the new changeset lists only
pacquet.

Rule 713441: Require changeset for TypeScript package changes
.changeset/fetch-links-virtual-store-bins.md[1-3]
pnpm11/installing/commands/src/fetch.ts[49-49]
pnpm11/installing/commands/package.json[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 does not include the affected published TypeScript package `@pnpm/installing.commands`.

## Issue Context
The PR modifies `pnpm11/installing/commands/src/fetch.ts`, and that package's manifest names it `@pnpm/installing.commands`. Compliance rule 713441 requires every changed published TypeScript package to appear in a new changeset with a valid bump; this compile-supporting bug-fix change should use `patch`.

## Fix Focus Areas
- .changeset/fetch-links-virtual-store-bins.md[1-3]
- pnpm11/installing/commands/src/fetch.ts[49-49]

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


Results up to commit 1188c20 ⚖️ Balanced


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


Remediation recommended
1. Unrelated comment refactors included ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
This bug-fix update rewrites generic LinkPhaseInputs and hoisting documentation without changing
behavior or documenting the virtual_store_only bin-link fix. The comment-only churn is unrelated
to issue #14174 and expands the review surface contrary to the bug-fix scope rule.
Code

pnpm/crates/deps-restorer/src/linking.rs[R87-89]

+/// Both install paths supply this. What differs between them is carried
+/// as a field value rather than a branch inside the phase; each such
+/// field documents its per-path value.
Relevance

●●● Strong

Recent history accepts trimming redundant or drift-prone comments, matching this bug-fix scope
concern.

PR-#14142
PR-#14012
PR-#13934

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 2255067 requires every non-whitespace change in a bug-fix PR to be necessary for the fix or its
compilation/testing. The cited regions only rephrase existing documentation about input structure
and hoisting, while the actual issue concerns allowing LinkVirtualStoreBins during
virtual_store_only.

Rule 2255067: Bug fix changes must not include unrelated refactors or reformatting
pnpm/crates/deps-restorer/src/linking.rs[87-89]
pnpm/crates/deps-restorer/src/linking.rs[190-200]
pnpm/crates/deps-restorer/src/linking.rs[311-318]
pnpm/crates/deps-restorer/src/linking.rs[345-365]

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 includes comment-only rewrites unrelated to the `virtual_store_only` bin-linking fix.

## Issue Context
Keep documentation updates that explain the changed fetch/link behavior, but restore unrelated struct and hoisting comments to avoid broadening this bug-fix PR.

## Fix Focus Areas
- pnpm/crates/deps-restorer/src/linking.rs[87-89]
- pnpm/crates/deps-restorer/src/linking.rs[190-200]
- pnpm/crates/deps-restorer/src/linking.rs[311-318]
- pnpm/crates/deps-restorer/src/linking.rs[345-365]

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



Informational
2. Private-hoist path documentation is false ✓ Resolved 🐞 Bug ⚙ Maintainability
Description
The comment says the private-hoist target is always <root>/node_modules/.pnpm/node_modules, but
the next line derives it from configurable config.virtual_store_dir, which may be a user-pinned
path. This false invariant can lead future linking changes to mishandle custom virtual-store
layouts.
Code

pnpm/crates/deps-restorer/src/linking.rs[R362-365]

+        // — so the private-hoist target is always
+        // `<root>/node_modules/.pnpm/node_modules`. Only the symlink
+        // *target* under the slot dir is GVS-aware, which `layout`
+        // resolves.
Relevance

●●● Strong

Recent history accepts fixes for inaccurate documentation and misleading current-behavior
invariants.

PR-#13644
PR-#14152
PR-#14012

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The implementation immediately computes the target from config.virtual_store_dir, while Config
documents that field as configurable and its GVS derivation explicitly preserves user-pinned values
separately from global_virtual_store_dir.

pnpm/crates/deps-restorer/src/linking.rs[359-366]
pnpm/crates/config/src/lib.rs[1071-1083]
pnpm/crates/config/src/lib.rs[2739-2779]

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

## Issue description
Correct the private-hoist comment: the target is not always the default `<root>/node_modules/.pnpm/node_modules`; it is derived from configurable `config.virtual_store_dir`.

## Issue Context
Pacquet keeps the project-local and global virtual-store fields separate, but `virtual_store_dir` itself may be explicitly configured by the user.

## Fix Focus Areas
- pnpm/crates/deps-restorer/src/linking.rs[359-365]

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


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.

@greptile-apps

greptile-apps Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (3): Last reviewed commit: "refactor(deps-restorer): name the link p..." | Re-trigger Greptile

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Aug 25, 2026
`linking.rs` was 38% comment lines. Much of that was prose the code, the
types, or the callee's own docs already carried:

- the `LinkPhaseInputs` doc enumerated the fields that document
  themselves right below it;
- the `link_root_component_members` call site re-explained the callee and
  closed with a sentence describing a `project_manifests` → importer-id
  mapping that this call site does not perform;
- the `run_hoisted_linker` call site restated both `HoistedLinkerOutput`
  field docs, including the paragraph its own "see
  `BuildModules::pkg_roots_by_key`" pointer already delegated;
- the hoist-pass guard was documented against a condition that lives in
  `compute_hoist_plan`, not here;
- the public-hoist stash rationale appeared twice, at the declaration and
  again at the assignment;
- two comments sat above the wrong binding, describing a statement one or
  two lines further down.

Gate and ordering rationale is kept — why a pass is skipped under
`nodeLinker: hoisted` or `virtualStoreOnly`, why reconciliation precedes
relinking, why the hoist plan is computed before
`SymlinkDirectDependencies` — since none of it is recoverable from the
code and all of it is what a refactor silently breaks.

Comment lines 192 → 117; code lines unchanged at 301. Stripping comments
from both revisions yields identical files.
Copilot AI review requested due to automatic review settings August 25, 2026 23:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 1188c20

@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 25, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                                            main                                   pr
-----                                            ----                                   --
lockfile/parse_pnpm_lock                         1.04     16.3±1.34ms    23.0 MB/sec    1.00     15.6±1.07ms    24.0 MB/sec
packument/parse                                  1.03     47.3±2.47µs  1402.1 MB/sec    1.00     45.9±0.84µs  1444.4 MB/sec
tarball/download_dependency                      1.18      6.8±1.29ms   638.3 KB/sec    1.00      5.8±0.85ms   753.3 KB/sec
tarball_batch/cold_store_many_medium_tarballs    1.06   279.6±21.92ms 57.2 KElem/sec    1.00   263.8±17.63ms 60.7 KElem/sec
workspace_resolution/hoist_heavy                 1.00   415.5±59.93ms        ? ?/sec    1.19   495.6±31.24ms        ? ?/sec
workspace_sort/chained_projects                  1.00     20.5±0.91ms        ? ?/sec    1.17     24.0±3.89ms        ? ?/sec

…ting them

Follow-up to the comment pass: replace prose with names and structure
where a name can carry what the comment said.

- `write_hoist_links` takes over the hoist-plan materialization, so the
  `let mut publicly_hoisted_for_post_build` + assign-40-lines-later
  pattern collapses into one destructuring `let`, and the GVS caveat
  moves onto the function it constrains.
- `relink_importer_bins_after_hoisting` replaces a bare block whose only
  job was to scope one variable; its "why re-walk" note is now the
  function's contract.
- The two gates become `has_virtual_store` and `links_importer_tree`,
  which say what `!is_hoisted` and `!is_hoisted && !virtual_store_only`
  meant.
- `LinkPhaseOutput::empty()` replaces the four-field empty literal and
  the sentence explaining that every field is empty.
- The public-hoist / pnpm/pacquet#342 rationale moves onto
  `LinkPhaseOutput::publicly_hoisted_for_post_build`, the public field it
  describes, instead of sitting on a local.
- The `run_hoisted_linker` call site loses its comment: the function is
  named, documented, and the `if is_hoisted` branch reads as itself.

Also corrects a false invariant introduced in the previous commit: the
private-hoist target is not always `<root>/node_modules/.pnpm/node_modules`
— `virtualStoreDir` is a user-settable path. What GVS does not do is move
it, which is the part worth stating.

Comment lines 117 -> 102 on top of the previous 192 -> 117.
@codecov-commenter

codecov-commenter commented Aug 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.76543% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.64%. Comparing base (74f9236) to head (d9d3b97).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pnpm/crates/deps-restorer/src/linking.rs 98.76% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14178      +/-   ##
==========================================
- Coverage   88.67%   88.64%   -0.03%     
==========================================
  Files         679      679              
  Lines      115540   116155     +615     
==========================================
+ Hits       102454   102967     +513     
- Misses      13086    13188     +102     

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

Copilot AI review requested due to automatic review settings August 25, 2026 23:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@zkochan

zkochan commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

Notes on the two remaining Qodo compliance findings, both about changesets.

"Published TS package omitted" — addressed in d9d3b97. src/fetch.ts does
change, so @pnpm/installing.commands now has its own changeset
(.changeset/fetch-command-options-declare-allow-builds.md, patch + pnpm: patch) describing what actually changed there: the command's options type
declares allowBuilds, a setting the handler already forwarded. No runtime
change.

"pnpm missing from changeset" — this one is expected to stay open, and
should. It is reported against the other changeset, which is Rust-only.
CLAUDE.md is explicit that such a changeset must omit pnpm:

Do not add "pnpm" to a Rust-only changeset: in changesets, pnpm always
means the TypeScript CLI package. A changeset whose implementation is
Rust-only and targets pacquet must omit "pnpm".

Rule 713436 is a generic "always declare pnpm" check that does not model that
carve-out. Adding pnpm: patch there would also put "fetch now links
virtual-store bins" into the pnpm 11 release notes, where it is false — 11
never had this bug, because buildModules links a dep node's bins immediately
before running that node's scripts, independent of the virtualStoreOnly gate.

Two changesets keeps both release notes accurate rather than merging a Rust fix
and a TypeScript type change under one description.

Separately, thanks for the private-hoist catch (finding 4) — that comment was
wrong and is fixed in d9d3b97. virtualStoreDir is user-settable; what GVS
does not do is move it.


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

@qodo-code-review

Copy link
Copy Markdown

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

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

No code suggestions found for the PR.

@github-actions

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: d9d3b970b564

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.392 ± 0.141 2.279 2.659 1.64 ± 0.18
pacquet@main 2.475 ± 0.174 2.279 2.680 1.70 ± 0.20
pnpr@HEAD 1.454 ± 0.136 1.304 1.645 1.00
pnpr@main 1.508 ± 0.132 1.337 1.719 1.04 ± 0.13
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.3918956104199998,
      "stddev": 0.14104272786521854,
      "median": 2.31378780292,
      "user": 1.3728550599999996,
      "system": 1.46813058,
      "min": 2.27891514292,
      "max": 2.65888568892
    },
    {
      "command": "pacquet@main",
      "mean": 2.4745616570199997,
      "stddev": 0.17418942106372215,
      "median": 2.46710369992,
      "user": 1.3826361600000001,
      "system": 1.4433204800000001,
      "min": 2.27907406192,
      "max": 2.67984054892
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.45424035552,
      "stddev": 0.13569025122573813,
      "median": 1.3827730789200001,
      "user": 1.34601676,
      "system": 1.4245689799999999,
      "min": 1.30390489792,
      "max": 1.6454825449200001
    },
    {
      "command": "pnpr@main",
      "mean": 1.5084384619200002,
      "stddev": 0.13223368843540753,
      "median": 1.47998166592,
      "user": 1.4959436599999998,
      "system": 1.4633712799999996,
      "min": 1.3372743789200001,
      "max": 1.7192777889200002
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 321.5 ± 17.0 295.5 343.3 1.02 ± 0.08
pacquet@main 317.3 ± 13.0 298.7 339.5 1.01 ± 0.07
pnpr@HEAD 327.2 ± 18.6 306.6 359.3 1.04 ± 0.09
pnpr@main 315.4 ± 18.6 284.1 340.0 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.32145391632,
      "stddev": 0.01703117712648456,
      "median": 0.31480174952,
      "user": 0.25781102,
      "system": 0.5704859799999998,
      "min": 0.29548925302,
      "max": 0.34325325002
    },
    {
      "command": "pacquet@main",
      "mean": 0.31725058222,
      "stddev": 0.013048536034784916,
      "median": 0.31726625102,
      "user": 0.25795561999999994,
      "system": 0.54303228,
      "min": 0.29868050102,
      "max": 0.33951538402
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.32724994012,
      "stddev": 0.01863234699142704,
      "median": 0.32896723701999997,
      "user": 0.26635222000000003,
      "system": 0.5582279800000001,
      "min": 0.30656483902,
      "max": 0.35927275702
    },
    {
      "command": "pnpr@main",
      "mean": 0.31542454782,
      "stddev": 0.018642055286270418,
      "median": 0.31904500402,
      "user": 0.25518872,
      "system": 0.5329738799999999,
      "min": 0.28406912002,
      "max": 0.33995116402
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 8.0 ± 1.0 6.5 12.4 1.00 ± 0.18
pacquet@main 7.9 ± 1.0 6.3 11.6 1.00
pnpr@HEAD 8.3 ± 0.9 6.1 11.1 1.04 ± 0.18
pnpr@main 8.4 ± 1.1 6.3 13.4 1.05 ± 0.19
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.007951707559534883,
      "stddev": 0.0010087457745923056,
      "median": 0.0077325634200000005,
      "user": 0.004344473023255812,
      "system": 0.0036755802790697637,
      "min": 0.006527689420000001,
      "max": 0.01239658942
    },
    {
      "command": "pacquet@main",
      "mean": 0.007928301386542751,
      "stddev": 0.0010412129943060144,
      "median": 0.00761349942,
      "user": 0.004551608996282531,
      "system": 0.0034470587360594766,
      "min": 0.006320739420000001,
      "max": 0.01158385142
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.00827955087733788,
      "stddev": 0.0008766486736008474,
      "median": 0.00832178942,
      "user": 0.0045470803412969345,
      "system": 0.0038000070989761127,
      "min": 0.00610874142,
      "max": 0.01106964542
    },
    {
      "command": "pnpr@main",
      "mean": 0.008363745380122701,
      "stddev": 0.0010822869691874321,
      "median": 0.008146335420000001,
      "user": 0.004676737730061351,
      "system": 0.003760193496932515,
      "min": 0.00625357342,
      "max": 0.01341141542
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 8.1 ± 1.0 6.0 12.3 1.03 ± 0.18
pacquet@main 8.1 ± 1.3 5.6 12.7 1.03 ± 0.21
pnpr@HEAD 8.0 ± 1.2 5.8 11.8 1.01 ± 0.20
pnpr@main 7.8 ± 1.0 5.7 11.8 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.008086905469195408,
      "stddev": 0.0010098255831996973,
      "median": 0.007913410860000001,
      "user": 0.004672814559386973,
      "system": 0.0034517709578544054,
      "min": 0.0059544288599999995,
      "max": 0.012276341860000001
    },
    {
      "command": "pacquet@main",
      "mean": 0.008062965243685806,
      "stddev": 0.0012925664093111093,
      "median": 0.008000114860000001,
      "user": 0.004495865861027189,
      "system": 0.0036021387311178234,
      "min": 0.005613067859999999,
      "max": 0.012652277860000002
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.00795015067602374,
      "stddev": 0.001157940301285396,
      "median": 0.00805846386,
      "user": 0.004306232047477746,
      "system": 0.0036826166172106833,
      "min": 0.00578726486,
      "max": 0.011842304860000001
    },
    {
      "command": "pnpr@main",
      "mean": 0.007834962079858157,
      "stddev": 0.0009941612103558037,
      "median": 0.007802999360000001,
      "user": 0.004546948936170215,
      "system": 0.003330508510638296,
      "min": 0.005736941860000001,
      "max": 0.01175589286
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.865 ± 0.047 2.809 2.957 1.92 ± 0.09
pacquet@main 2.853 ± 0.042 2.778 2.898 1.92 ± 0.09
pnpr@HEAD 1.519 ± 0.127 1.413 1.789 1.02 ± 0.10
pnpr@main 1.488 ± 0.065 1.398 1.579 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.8647786752800006,
      "stddev": 0.04743389716022515,
      "median": 2.8458779415800004,
      "user": 2.00636992,
      "system": 1.5457700599999997,
      "min": 2.80932231958,
      "max": 2.95689662858
    },
    {
      "command": "pacquet@main",
      "mean": 2.8531636812800003,
      "stddev": 0.04182201778936097,
      "median": 2.86985265858,
      "user": 1.9747811199999998,
      "system": 1.5651881599999997,
      "min": 2.7784717595800004,
      "max": 2.8984549845800003
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.51942589558,
      "stddev": 0.12657258704714652,
      "median": 1.4777122620799998,
      "user": 1.15500442,
      "system": 1.3932802599999998,
      "min": 1.41328795258,
      "max": 1.78935602958
    },
    {
      "command": "pnpr@main",
      "mean": 1.48847628008,
      "stddev": 0.06475844291691243,
      "median": 1.50258590358,
      "user": 1.14819152,
      "system": 1.3687142599999997,
      "min": 1.39849689658,
      "max": 1.57914267858
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 433.9 ± 30.5 389.2 495.8 1.22 ± 0.12
pacquet@main 418.7 ± 21.4 394.3 456.5 1.18 ± 0.10
pnpr@HEAD 355.1 ± 25.4 326.2 401.7 1.00
pnpr@main 361.3 ± 33.5 333.0 441.7 1.02 ± 0.12
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.4338541148800001,
      "stddev": 0.030547472326440256,
      "median": 0.43480773538,
      "user": 0.4820576,
      "system": 0.6506973199999999,
      "min": 0.38916724888,
      "max": 0.49583535588
    },
    {
      "command": "pacquet@main",
      "mean": 0.41867897967999995,
      "stddev": 0.02135080620886848,
      "median": 0.41064597888,
      "user": 0.46810809999999997,
      "system": 0.61982272,
      "min": 0.39427845588,
      "max": 0.45646511988
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.35506572698000005,
      "stddev": 0.025413955186627545,
      "median": 0.34618617788,
      "user": 0.23447219999999996,
      "system": 0.5502952200000001,
      "min": 0.32617043287999997,
      "max": 0.40173089088
    },
    {
      "command": "pnpr@main",
      "mean": 0.36128410698,
      "stddev": 0.033466762081200675,
      "median": 0.35198162388,
      "user": 0.2599117,
      "system": 0.52176132,
      "min": 0.33296733688,
      "max": 0.44170803788
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.947 ± 0.022 1.911 1.991 5.17 ± 0.38
pacquet@main 1.978 ± 0.060 1.898 2.074 5.25 ± 0.41
pnpr@HEAD 0.377 ± 0.028 0.336 0.410 1.00
pnpr@main 0.386 ± 0.038 0.340 0.468 1.03 ± 0.13
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.9468859038000002,
      "stddev": 0.02204683117456033,
      "median": 1.9441097069,
      "user": 0.8045290799999998,
      "system": 0.7582244200000001,
      "min": 1.9107865984,
      "max": 1.9911597404
    },
    {
      "command": "pacquet@main",
      "mean": 1.9784965771,
      "stddev": 0.0596175548208481,
      "median": 1.9514359594000001,
      "user": 0.8402662799999998,
      "system": 0.7964999199999999,
      "min": 1.8983230064,
      "max": 2.0741221984
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.37687723139999996,
      "stddev": 0.027517082962688223,
      "median": 0.38314626790000006,
      "user": 0.24904948,
      "system": 0.55380372,
      "min": 0.3358532724,
      "max": 0.40983643540000003
    },
    {
      "command": "pnpr@main",
      "mean": 0.38646565060000004,
      "stddev": 0.03843052408814558,
      "median": 0.37771219040000004,
      "user": 0.26763968,
      "system": 0.5526351199999999,
      "min": 0.3403487714,
      "max": 0.4681093744
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 254.7 ± 17.0 224.5 278.2 2.34 ± 0.18
pacquet@main 256.6 ± 26.7 220.8 302.7 2.36 ± 0.26
pnpr@HEAD 108.8 ± 3.7 102.6 118.1 1.00
pnpr@main 109.6 ± 4.9 101.4 121.6 1.01 ± 0.06
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.25470474234,
      "stddev": 0.01696652234026932,
      "median": 0.25705830934,
      "user": 0.20845362909090906,
      "system": 0.07002266545454547,
      "min": 0.22450867034,
      "max": 0.27820290434000006
    },
    {
      "command": "pacquet@main",
      "mean": 0.2566342976127273,
      "stddev": 0.02669535202858637,
      "median": 0.25144688434,
      "user": 0.20704790181818178,
      "system": 0.06513121090909091,
      "min": 0.22084899334,
      "max": 0.30268349034
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.10881939567333337,
      "stddev": 0.0036949665361411385,
      "median": 0.10846014634000001,
      "user": 0.035560275555555555,
      "system": 0.014806712592592593,
      "min": 0.10256885534000001,
      "max": 0.11813946634000001
    },
    {
      "command": "pnpr@main",
      "mean": 0.10956263616608697,
      "stddev": 0.004908024703576728,
      "median": 0.10816187634,
      "user": 0.035235024347826084,
      "system": 0.01530485913043478,
      "min": 0.10139409734,
      "max": 0.12159616234000001
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 785.8 ± 145.2 613.5 972.3 1.00
pacquet@main 850.1 ± 136.1 680.2 1046.0 1.08 ± 0.26
pnpm@HEAD 3425.6 ± 137.9 3212.2 3674.8 4.36 ± 0.82
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.7858333936466667,
      "stddev": 0.1452274203194059,
      "median": 0.7308037539800001,
      "user": 0.7826036022222222,
      "system": 0.14646005111111107,
      "min": 0.61348147598,
      "max": 0.97227496798
    },
    {
      "command": "pacquet@main",
      "mean": 0.8500627523133333,
      "stddev": 0.1361161440019607,
      "median": 0.85463855998,
      "user": 0.8634978244444445,
      "system": 0.15984038444444443,
      "min": 0.68019380498,
      "max": 1.04595563298
    },
    {
      "command": "pnpm@HEAD",
      "mean": 3.4256479926466668,
      "stddev": 0.13788434297424884,
      "median": 3.41833809398,
      "user": 5.202604491111111,
      "system": 0.3265946066666667,
      "min": 3.21219622198,
      "max": 3.67475475298
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.398 ± 0.104 4.303 4.627 1.27 ± 0.05
pacquet@main 4.491 ± 0.149 4.342 4.768 1.30 ± 0.06
pnpr@HEAD 3.461 ± 0.094 3.381 3.706 1.00
pnpr@main 3.510 ± 0.151 3.361 3.803 1.01 ± 0.05
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.39841411782,
      "stddev": 0.10396555603432807,
      "median": 4.35955686312,
      "user": 1.42446144,
      "system": 1.4789384399999999,
      "min": 4.30327116912,
      "max": 4.62694194912
    },
    {
      "command": "pacquet@main",
      "mean": 4.490617095819999,
      "stddev": 0.14860212313563234,
      "median": 4.45805890312,
      "user": 1.51984474,
      "system": 1.6122688399999998,
      "min": 4.34216833612,
      "max": 4.76812465612
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.46090956062,
      "stddev": 0.09368351014809605,
      "median": 3.4373439366199996,
      "user": 1.34226004,
      "system": 1.41147614,
      "min": 3.3806406921199996,
      "max": 3.7061968841199997
    },
    {
      "command": "pnpr@main",
      "mean": 3.5095114865199997,
      "stddev": 0.151484966809873,
      "median": 3.46724196062,
      "user": 1.32459714,
      "system": 1.4110120400000001,
      "min": 3.3610147201199996,
      "max": 3.80276583212
    }
  ]
}

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. Comparable to that scenario head-to-head.

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 170.6 ± 6.5 164.7 189.5 1.01 ± 0.04
pacquet@main 169.1 ± 4.0 162.3 175.4 1.00
pnpr@HEAD 201.2 ± 26.9 174.9 268.2 1.19 ± 0.16
pnpr@main 177.6 ± 4.0 168.0 182.9 1.05 ± 0.03
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.17059493816000001,
      "stddev": 0.006455311189973632,
      "median": 0.16846234316000003,
      "user": 0.19471860000000002,
      "system": 0.19965516857142857,
      "min": 0.16470693016000001,
      "max": 0.18948290116000002
    },
    {
      "command": "pacquet@main",
      "mean": 0.16914208129333333,
      "stddev": 0.003979251505796161,
      "median": 0.16898986016,
      "user": 0.2050996333333333,
      "system": 0.19045737333333335,
      "min": 0.16227659316,
      "max": 0.17542935216000002
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.20115623416,
      "stddev": 0.026864665137818537,
      "median": 0.19433419816000003,
      "user": 0.22176956666666664,
      "system": 0.2142341733333334,
      "min": 0.17489731216,
      "max": 0.26824099116
    },
    {
      "command": "pnpr@main",
      "mean": 0.17762460616000003,
      "stddev": 0.003961635438304524,
      "median": 0.17780987416000002,
      "user": 0.20893050000000002,
      "system": 0.18339010666666664,
      "min": 0.16803028516000001,
      "max": 0.18293317316000002
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/14178
Testbedpacquet
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
gvs-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
164.71 ms
(-10.27%)Baseline: 183.55 ms
220.26 ms
(74.78%)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,809.32 ms
(+1.05%)Baseline: 2,780.09 ms
3,336.11 ms
(84.21%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,910.79 ms
(-0.73%)Baseline: 1,924.82 ms
2,309.78 ms
(82.73%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
389.17 ms
(-10.54%)Baseline: 435.01 ms
522.01 ms
(74.55%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
224.51 ms
(-2.88%)Baseline: 231.18 ms
277.41 ms
(80.93%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,278.92 ms
(-2.26%)Baseline: 2,331.64 ms
2,797.97 ms
(81.45%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,303.27 ms
(-1.56%)Baseline: 4,371.31 ms
5,245.57 ms
(82.04%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
295.49 ms
(-1.76%)Baseline: 300.79 ms
360.94 ms
(81.87%)
isolated-linker.peer-heavy-resolve.hot-cache.offline📈 view plot
🚷 view threshold
613.48 ms
(+10.68%)Baseline: 554.29 ms
665.15 ms
(92.23%)
isolated-linker.repeat-install.cold-cache.hot-store📈 view plot
🚷 view threshold
5.95 ms
(-11.80%)Baseline: 6.75 ms
8.10 ms
(73.50%)
isolated-linker.repeat-install.hot-cache.hot-store📈 view plot
🚷 view threshold
6.53 ms
(-5.04%)Baseline: 6.87 ms
8.25 ms
(79.13%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/14178
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)
gvs-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
174.90 ms
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,413.29 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
335.85 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
326.17 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
102.57 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,303.90 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,380.64 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
306.56 ms
isolated-linker.repeat-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
5.79 ms
isolated-linker.repeat-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
6.11 ms
🐰 View full continuous benchmarking report in Bencher

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 fetch fails to resolve a dependency's bin in lifecycle scripts (regression in 12.0.0-rc.11)

3 participants