Skip to content

fix(peers): resolve workspace catalog peer ranges - #14368

Merged
zkochan merged 6 commits into
mainfrom
fix-14361
Aug 31, 2026
Merged

zkochan merged 6 commits into
mainfrom
fix-14361

Conversation

@zkochan

@zkochan zkochan commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #14361 for the Rust pnpm CLI by resolving catalog: ranges in
workspace package peer dependencies before peer matching.

This covers both linked workspace dependencies and injected workspace
dependencies. The TypeScript CLI already resolves these ranges correctly, so
the change restores parity without requiring a TypeScript implementation
change.

Squash Commit Body

Resolve workspace package peer ranges through the effective workspace
catalogs before checking whether their consumers provide compatible versions.

Thread those catalogs through install-time and explicit peer inspection, and
apply them while constructing injected workspace dependency peer metadata.
Registry package peer ranges remain untouched.

Add regression coverage for linked and injected workspace packages.

Fixes pnpm/pnpm#14361.

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 (Codex, GPT-5).


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

Summary by CodeRabbit

  • Bug Fixes

    • Fixed pnpm peers check incorrectly reporting catalog: peer dependencies as unmet.
    • Catalog-based peer dependencies now resolve correctly for linked and injected workspace packages.
    • Improved handling of unresolved catalog configuration.
    • Standalone and ignored-workspace checks no longer require unavailable workspace catalogs.
  • Tests

    • Added coverage for catalog peer dependencies across workspace, linked-package, injected-package, and standalone scenarios.

Copilot AI lite review requested due to automatic review settings August 31, 2026 14:51

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

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: 511c4053-e043-4548-9932-757453fb3e0f

📥 Commits

Reviewing files that changed from the base of the PR and between 1bd318e and 0414392.

📒 Files selected for processing (2)
  • pnpm/crates/cli/tests/suite/peers.rs
  • pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs

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


Important

Approval pending

CodeRabbit has no unresolved comments, but it has not reviewed the latest commit.

Use the checkbox below to review the latest commit. CodeRabbit will approve the changes if it finds no blocking issues.

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change resolves catalog: peer dependency ranges during dependency-tree construction and peer inspection. Catalog context now flows through CLI and install completion paths. Regression tests cover linked, injected, ignored-workspace, and standalone scenarios.

Changes

Catalog peer resolution

Layer / File(s) Summary
Dependency-tree catalog resolution
pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/{manifest.rs,walk.rs,reuse.rs}
Peer extraction and warm-cache resolution expand catalog: ranges when catalog data is available. Resolution errors propagate through dependency-tree walking.
Catalog-aware peer inspection
pnpm/crates/deps-inspection-peers/Cargo.toml, pnpm/crates/deps-inspection-peers/src/lib.rs
Peer inspection APIs accept optional Catalogs. Linked package peer ranges use catalog resolution and return catalog resolution errors.
Install completion propagation
pnpm/crates/package-manager/src/{install.rs,peer_dependency_issues.rs}, pnpm/crates/package-manager/src/install/{apply_materialization.rs,run.rs}, pnpm/crates/package-manager/src/peer_dependency_issues/tests.rs
Install completion passes catalog context into peer reporting. InstallError wraps catalog resolution failures.
CLI wiring and regression coverage
pnpm/crates/cli/src/cli_args/peers.rs, pnpm/crates/cli/tests/suite/peers.rs, .changeset/friendly-catalog-peers.md
The peers command loads catalogs only when configured. Tests verify linked, injected, ignored-workspace, and standalone behavior. A patch changeset documents the fix.

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

Merge Risk: 🔵 Low · up to 04143

This change resolves catalog-based peer ranges for workspace dependencies, but workspace/file nodes can still bypass recorded dependency-tree reuse when no catalog child range exists, which may reduce reuse in those cases. The PR is mergeable with explicit owner awareness or follow-up on that bounded risk.

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant Install
  participant PeerInspection
  participant CatalogResolver
  participant WorkspacePackage
  CLI->>Install: run install or peers check
  Install->>PeerInspection: inspect peers with optional catalog context
  PeerInspection->>WorkspacePackage: read peer dependency range
  WorkspacePackage->>CatalogResolver: resolve catalog: range
  CatalogResolver-->>PeerInspection: resolved range or unchanged range
  PeerInspection-->>CLI: peer report or catalog resolution error
Loading

Assessment against linked issues

Objective Addressed Explanation
Expand catalog: values in workspace package peerDependencies before peer checks, including plain workspace links and injected packages [#14361] ✅

Suggested labels: product: pacquet

Suggested reviewers: jamenh

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

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

Resolve catalog peer ranges for workspace packages

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

Grey Divider

AI Description

• Resolve workspace catalog: peer ranges before compatibility checks.
• Thread effective catalogs through installs and explicit peer inspection.
• Cover linked and injected workspace dependencies with regression tests.
Diagram

graph TD
  CAT["Workspace catalogs"] --> RES["Dependency resolver"] --> INJECT["Injected peer ranges"] --> LOCK[("Lockfile")] --> INSTALL["Install reporting"] --> INSPECT["Peer inspector"] --> VERDICT["Peer verdict"]
  PEERS["Peers command"] --> INSPECT
  CAT --> INSPECT
Loading
High-Level Assessment

The current approach is appropriate: reuse the existing catalog resolver at the two workspace-specific boundaries where raw peer ranges enter matching, while leaving registry package ranges unchanged. Globally rewriting manifests or lockfile ranges would broaden behavior and lose the resolution-context distinction between workspace and registry packages.

Files changed (13) +198 / -59

Bug fix (8) +132 / -59
peers.rsSupply workspace catalogs to explicit peer checks +10/-5

Supply workspace catalogs to explicit peer checks

• Loads the effective configured catalogs and passes them into lockfile peer inspection. Catalog resolution failures now propagate through the CLI diagnostic path.

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

lib.rsResolve linked workspace peer catalog ranges +59/-29

Resolve linked workspace peer catalog ranges

• Threads catalogs through peer issue collection and dereferences 'catalog:' ranges before semver matching linked workspace package peers. Catalog misconfiguration errors are now returned to callers instead of treating raw catalog specifiers as ranges.

pnpm/crates/deps-inspection-peers/src/lib.rs

install.rsExpose catalog resolution install errors +4/-0

Expose catalog resolution install errors

• Adds a transparent install error variant so peer-reporting catalog failures retain their diagnostic context.

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

apply_materialization.rsThread catalogs into install peer reporting +7/-0

Thread catalogs into install peer reporting

• Carries the resolved workspace catalogs through resolve-only and materialized install completion paths to peer dependency reporting.

pnpm/crates/package-manager/src/install/apply_materialization.rs

peer_dependency_issues.rsApply catalogs during install peer inspection +6/-1

Apply catalogs during install peer inspection

• Passes effective catalogs into lockfile peer checks and maps catalog resolution failures into the install error model.

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

manifest.rsDereference injected workspace peer ranges +16/-10

Dereference injected workspace peer ranges

• Extends peer metadata extraction to optionally resolve catalog specifiers for workspace packages. Resolution errors now propagate through dependency-tree construction.

pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/manifest.rs

reuse.rsPreserve registry ranges during node reuse +1/-1

Preserve registry ranges during node reuse

• Adapts reused-node peer extraction to the fallible API while explicitly omitting catalog resolution for snapshot-backed registry package metadata.

pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/reuse.rs

walk.rsResolve workspace peers during tree construction +29/-13

Resolve workspace peers during tree construction

• Applies catalogs when extracting peers from file-backed workspace resolutions, including injected dependencies. Threads resolution errors through ownership assignment and level settlement while leaving non-workspace package peers untouched.

pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs

Tests (2) +57 / -0
peers.rsTest linked and injected catalog peers +53/-0

Test linked and injected catalog peers

• Adds regression scenarios proving 'peers check' accepts catalog-backed peers for both linked and injected workspace dependencies under strict peer checking.

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

tests.rsAdapt peer reporting tests for catalog context +4/-0

Adapt peer reporting tests for catalog context

• Supplies empty catalogs to existing install peer-reporting tests, preserving coverage for clean and strict failure outcomes.

pnpm/crates/package-manager/src/peer_dependency_issues/tests.rs

Documentation (1) +5 / -0
friendly-catalog-peers.mdDocument the workspace catalog peer fix +5/-0

Document the workspace catalog peer fix

• Adds a patch release note for 'pacquet' explaining that workspace package 'catalog:' peer ranges no longer produce false unmet-peer reports.

.changeset/friendly-catalog-peers.md

Other (2) +4 / -0
Cargo.lockLock catalog resolver dependencies for peer inspection +2/-0

Lock catalog resolver dependencies for peer inspection

• Records the peer inspection crate's new dependencies on the catalog resolver and catalog types crates.

Cargo.lock

Cargo.tomlAdd catalog resolution dependencies +2/-0

Add catalog resolution dependencies

• Adds workspace dependencies required to resolve catalog-backed peer ranges during lockfile inspection.

pnpm/crates/deps-inspection-peers/Cargo.toml

@greptile-apps

greptile-apps Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge.

The previous ignored-workspace failure is fixed: the CLI flag suppresses workspace discovery, catalog loading returns an empty set without validating the ignored manifest, and peer inspection receives no catalog context, leaving raw catalog ranges to be reported normally.

Reviews (6): Last reviewed commit: "perf(resolver): avoid unnecessary catalo..." | Re-trigger Greptile

Comment thread pnpm/crates/cli/src/cli_args/peers.rs Resolved
@github-actions

github-actions Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                                            main                                   pr
-----                                            ----                                   --
lockfile/parse_pnpm_lock                         1.00     14.2±0.66ms    26.3 MB/sec    1.35     19.2±1.74ms    19.5 MB/sec
packument/parse                                  1.00     46.9±0.28µs  1414.6 MB/sec    1.09     51.2±3.04µs  1296.7 MB/sec
tarball/download_dependency                      1.00      4.9±0.24ms   889.5 KB/sec    1.03      5.0±0.50ms   861.2 KB/sec
tarball_batch/cold_store_many_medium_tarballs    1.00    234.3±7.38ms 68.3 KElem/sec    1.20   282.1±35.75ms 56.7 KElem/sec
workspace_resolution/hoist_heavy                 1.00   370.9±33.22ms        ? ?/sec    1.28   473.7±48.60ms        ? ?/sec
workspace_sort/chained_projects                  1.00     21.1±4.44ms        ? ?/sec    1.18     24.9±2.57ms        ? ?/sec

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

codecov-commenter commented Aug 31, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.55782% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.71%. Comparing base (fb226cd) to head (4ded34a).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
pnpm/crates/deps-inspection-peers/src/lib.rs 91.66% 4 Missing ⚠️
...-deps-resolver/src/resolve_dependency_tree/walk.rs 95.45% 3 Missing ⚠️
pnpm/crates/cli/src/cli_args/peers.rs 88.88% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main   #14368    +/-   ##
========================================
  Coverage   88.70%   88.71%            
========================================
  Files         697      698     +1     
  Lines      124272   124418   +146     
========================================
+ Hits       110239   110380   +141     
- Misses      14033    14038     +5     

☔ 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 31, 2026 15:01

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

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[bot]
greptile-apps Bot previously approved these changes Aug 31, 2026
@qodo-code-review

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

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Action required

1. Standalone linked peers abort install ✓ Resolved 🐞 Bug ≡ Correctness
Description
Install completion unconditionally supplies even an empty catalog map, so a standalone or
--ignore-workspace install with a linked directory package declaring a catalog: peer now fails
with ERR_PNPM_CATALOG_ENTRY_NOT_FOUND_FOR_SPEC instead of leaving that raw range as an unmet peer.
The catalog error is propagated before strictPeerDependencies is checked, so this aborts ordinary
non-strict installs too.
Code

pnpm/crates/package-manager/src/peer_dependency_issues.rs[57]

+        Some(catalogs),
Relevance

●●● Strong

Recent linked-peer review accepted conservative handling of linked targets and added peer-install
regression coverage.

PR-#14360

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Standalone link: and directory file: targets absent from the workspace manifest set still add
their consumer to peer inspection. The changed reporter passes Some(catalogs) and propagates
lookup errors before strictness handling; linked-manifest ranges are then resolved through that
supplied map, while the CLI's new ignored-workspace logic deliberately passes None in the same
no-workspace situation.

pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs[2008-2029]
pnpm/crates/package-manager/src/peer_dependency_issues.rs[52-64]
pnpm/crates/deps-inspection-peers/src/lib.rs[275-286]
pnpm/crates/deps-inspection-peers/src/lib.rs[350-362]
pnpm/crates/catalogs-resolver/src/lib.rs[81-98]
pnpm/crates/cli/src/cli_args/peers.rs[81-94]

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

## Issue description
Install peer reporting converts every `Catalogs` value to `Some`, including the empty value used when no workspace catalog context exists. This makes externally linked packages with raw `catalog:` peer ranges abort standalone and `--ignore-workspace` installs.

## Issue Context
The explicit `peers check --ignore-workspace` path already preserves `None` when neither a workspace nor injected catalogs exist. Install-time reporting needs the same distinction while still passing configured or workspace catalogs when present.

## Fix Focus Areas
- pnpm/crates/package-manager/src/peer_dependency_issues.rs[34-59]
- pnpm/crates/package-manager/src/install/apply_materialization.rs[22-60]
- pnpm/crates/package-manager/src/install/run.rs[187-214]
- pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs[2008-2029]

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



Remediation recommended

2. Empty catalogs bypass child validation 🐞 Bug ≡ Correctness ⭐ New
Description
catalogs_for_children returns None for an empty catalog map, so an injected workspace package's
ordinary catalog: dependencies bypass resolve_catalog_specifier and reach the resolver chain as
raw unsupported specs. This replaces the intended ERR_PNPM_CATALOG_ENTRY_NOT_FOUND_FOR_SPEC
catalog diagnostic with the generic unsupported-resolver failure; only peer ranges need the new
empty-catalog exemption.
Code

pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs[1549]

+    (resolves_children_through_catalogs && !ctx.catalogs.is_empty()).then_some(&ctx.catalogs)
Relevance

●●● Strong

The proposed guard bypasses the existing catalog diagnostic for ordinary dependencies; this is a
deterministic correctness regression.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The changed helper converts an empty catalog map to None, and resolve_catalog_child_specs treats
None as an instruction to return raw specs. seed_node_children then constructs resolver inputs
from those raw child ranges, while the catalog helper documents and implements that a missing
catalog entry should instead become CatalogMisconfiguration; the existing CLI regression test also
codifies the expected specific catalog error rather than a generic unsupported-resolver error.

pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs[941-990]
pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs[1015-1064]
pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs[1545-1564]
pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/catalogs.rs[10-16]
pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/catalogs.rs[30-41]
pnpm/crates/cli/tests/suite/install.rs[1205-1236]

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

## Issue description
An empty catalog map must suppress catalog resolution only for workspace peer ranges. The shared `catalogs_for_children` helper also controls ordinary child dependencies, causing a workspace package's `catalog:` dependency to skip catalog validation and fall through to the generic resolver chain.

## Issue Context
Before this refactor, child specs of workspace-resolved `file:` packages always passed through `resolve_catalog_specifier`, including with an empty catalog map. Preserve that behavior for actual dependencies while allowing peer extraction to retain raw `catalog:` ranges when no catalog context exists.

## Fix Focus Areas
- pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs[504-510]
- pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs[759-763]
- pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs[987-990]
- pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs[1479-1489]
- pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs[1545-1566]

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


3. catalog: missing entries accepted 📘 Rule violation ≡ Correctness ⭐ New
Description
catalogs_for_children now disables catalog resolution whenever the workspace catalog map is empty,
so an injected workspace package's literal catalog: peer is accepted and reported as a peer issue
instead of producing pnpm's missing-catalog-entry error. This introduces user-visible Pacquet
behavior beyond pnpm for the same manifest.
Code

pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs[1549]

+    (resolves_children_through_catalogs && !ctx.catalogs.is_empty()).then_some(&ctx.catalogs)
Relevance

●●● Strong

Finding identifies a direct pnpm-parity correctness violation; no close rejection precedent supports
retaining divergent behavior.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 713429 forbids Pacquet from accepting inputs that pnpm rejects. The changed predicate at
walk.rs suppresses catalog resolution for an empty workspace catalog, while the added test
confirms that this exact no-catalog injected-peer case must succeed; TypeScript's resolver instead
treats an absent default-catalog entry as CATALOG_ENTRY_NOT_FOUND_FOR_SPEC.

Rule 713429: Pacquet must not introduce new user-visible behavior beyond pnpm
pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs[1545-1556]
pnpm/crates/cli/tests/suite/peers.rs[445-494]
pnpm11/installing/deps-resolver/src/resolveDependencyTree.ts[174-180]
pnpm11/catalogs/resolver/src/resolveFromCatalog.ts[60-75]

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

## Issue description
Pacquet bypasses catalog resolution when the active workspace has an empty catalog map, allowing a literal `catalog:` peer that pnpm rejects as a missing catalog entry.

## Issue Context
The new E2E test asserts successful installation for this divergent case. TypeScript pnpm binds its catalog resolver to `opts.catalogs ?? {}`, and `resolveFromCatalog` returns `CATALOG_ENTRY_NOT_FOUND_FOR_SPEC` when the requested entry is absent.

## Fix Focus Areas
- pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs[1545-1550]
- pnpm/crates/cli/tests/suite/peers.rs[445-498]

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


4. Stale catalog reread mismatches lockfile state 🐞 Bug ≡ Correctness
Description
pnpm peers check resolves catalog: peer ranges against the current on-disk pnpm-workspace.yaml
via configured_catalogs, not against the catalogs section persisted in the lockfile at install
time. If the workspace catalog definitions change after the lockfile was written (without a fresh
install), peer matching silently compares the installed/locked version against a different range
than what was actually resolved, producing incorrect bad/missing-peer verdicts.
Code

pnpm/crates/cli/src/cli_args/peers.rs[R81-83]

+        let catalogs = configured_catalogs(config)?;
+        let catalogs =
+            (config.workspace_dir.is_some() || config.catalogs.is_some()).then_some(&catalogs);
Relevance

●● Moderate

Catalog freshness concerns are plausible, but history supports conservative catalog/lockfile
handling without this exact peers-check behavior.

PR-#13477
PR-#13698

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
configured_catalogs() reads pnpm-workspace.yaml live from disk (catalogs.rs:21-27) rather than the
lockfile's own persisted catalogs map, and this live map is what
resolve_peer_range/resolve_from_catalog dereferences catalog: peer ranges against (lib.rs:350-363),
so a workspace manifest edited after pnpm install produces a peers-check verdict that no longer
matches the actually-installed graph.

pnpm/crates/cli/src/cli_args/catalogs.rs[14-27]
pnpm/crates/deps-inspection-peers/src/lib.rs[350-363]

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

## Issue description
`pnpm peers check` dereferences `catalog:` peer ranges using catalogs re-read live from `pnpm-workspace.yaml` on disk, rather than the `catalogs` section already persisted in the lockfile at install time. If the workspace catalog definitions change after the lockfile was written, the peers check compares the installed/locked package version against a stale or mismatched range, producing wrong bad/missing-peer verdicts that don't reflect what is actually installed.

## Issue Context
`configured_catalogs()` in `pnpm/crates/cli/src/cli_args/catalogs.rs` reads the workspace manifest from disk via `read_workspace_manifest` + `get_catalogs_from_workspace_manifest`. This map is then passed through to `check_peer_dependencies_from_lockfile` and ultimately to `resolve_peer_range`/`resolve_from_catalog` in `pnpm/crates/deps-inspection-peers/src/lib.rs`, which use it to resolve `catalog:` peer ranges before comparing against resolved versions recorded in the lockfile.

## Fix Focus Areas
- pnpm/crates/cli/src/cli_args/peers.rs[81-83]
- pnpm/crates/cli/src/cli_args/catalogs.rs[14-27]
- pnpm/crates/deps-inspection-peers/src/lib.rs[350-363]

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



Informational

5. pnpm missing from changeset 📘 Rule violation § Compliance
Description
The new changeset declares only pacquet, while every changed changeset must explicitly include
pnpm with a valid bump type. This bug fix requires a pnpm: patch entry.
Code

.changeset/friendly-catalog-peers.md[2]

+"pacquet": patch
Relevance

● Weak

Recent same-rule changeset precedents reject adding pnpm; team treats pacquet-only changesets as
acceptable.

PR-#14360
PR-#14340
PR-#14317

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 713436 requires pnpm in every changed changeset with a valid bump type. The added front
matter lists only "pacquet": patch, so the required package entry is absent.

Rule 713436: Explicitly declare pnpm package and correct bump type in changesets
.changeset/friendly-catalog-peers.md[1-3]

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

## Issue description
The changeset omits the required `pnpm` package entry.

## Issue Context
PR Compliance ID 713436 requires every new or modified changeset to explicitly declare `pnpm` with an appropriate bump. This PR is a bug fix, so use `patch`.

## Fix Focus Areas
- .changeset/friendly-catalog-peers.md[1-3]

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


6. Registry manifest with literal catalog: peer unresolved 🐞 Bug ≡ Correctness
Description
extract_peer_dependencies only resolves catalog: peer ranges when
resolves_children_through_catalogs is true (workspace-resolved, file:-id packages); any other
package shape — including a registry package whose manifest happens to declare a peerDependencies
entry using catalog: — keeps the literal unresolved string, which is then persisted to the
lockfile and later compared by walk_snapshot's satisfies() against a real found version, always
reporting it as an unmet/bad peer. This is a narrower fix than the TypeScript CLI's, which resolves
catalog ranges independent of the resolution shape.
Code

pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs[R504-508]

+            extract_peer_dependencies(
+                &result,
+                &peer_shadowed,
+                resolves_children_through_catalogs(&result).then_some(&ctx.catalogs),
+            )?
Relevance

● Weak

PR explicitly states registry package peer ranges remain untouched, matching a deliberate scope
boundary.

PR-#14360

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
resolves_children_through_catalogs() gates catalog resolution to result.resolved_via == "workspace"
&& id starts_with("file:") (walk.rs:1533-1537); any other resolution shape passes None for catalogs
into extract_peer_dependencies, which then preserves the raw catalog: string unchanged
(manifest.rs:258-265); walk_snapshot later reads that persisted string straight out of the lockfile
with no catalog re-resolution and calls satisfies() against it (lib.rs:461-468), which never matches
a real semver version.

pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs[1533-1537]
pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/manifest.rs[258-265]
pnpm/crates/deps-inspection-peers/src/lib.rs[461-468]


Grey Divider

Context sources
✅ Compliance rules (platform): 27 rules
Review mode: ⚖️ Balanced: This behavioral Rust change affects catalog resolution in both install and warm-child paths, creating real correctness risk across peer dependency resolution, but the latest push is not broad or defect-dense enough to justify redundant extended review.

Grey Divider

Tip of the day
💡 Did you know, you can type 'qodo, fix this' on a finding and the fix lands right on your PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous reviews

Review updated until commit 4ded34a

Results up to commit 7e58958 🧠 Deep


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


Action required
1. Standalone linked peers abort install ✓ Resolved 🐞 Bug ≡ Correctness
Description
Install completion unconditionally supplies even an empty catalog map, so a standalone or
--ignore-workspace install with a linked directory package declaring a catalog: peer now fails
with ERR_PNPM_CATALOG_ENTRY_NOT_FOUND_FOR_SPEC instead of leaving that raw range as an unmet peer.
The catalog error is propagated before strictPeerDependencies is checked, so this aborts ordinary
non-strict installs too.
Code

pnpm/crates/package-manager/src/peer_dependency_issues.rs[57]

+        Some(catalogs),
Relevance

●●● Strong

Recent linked-peer review accepted conservative handling of linked targets and added peer-install
regression coverage.

PR-#14360

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Standalone link: and directory file: targets absent from the workspace manifest set still add
their consumer to peer inspection. The changed reporter passes Some(catalogs) and propagates
lookup errors before strictness handling; linked-manifest ranges are then resolved through that
supplied map, while the CLI's new ignored-workspace logic deliberately passes None in the same
no-workspace situation.

pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs[2008-2029]
pnpm/crates/package-manager/src/peer_dependency_issues.rs[52-64]
pnpm/crates/deps-inspection-peers/src/lib.rs[275-286]
pnpm/crates/deps-inspection-peers/src/lib.rs[350-362]
pnpm/crates/catalogs-resolver/src/lib.rs[81-98]
pnpm/crates/cli/src/cli_args/peers.rs[81-94]

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

## Issue description
Install peer reporting converts every `Catalogs` value to `Some`, including the empty value used when no workspace catalog context exists. This makes externally linked packages with raw `catalog:` peer ranges abort standalone and `--ignore-workspace` installs.

## Issue Context
The explicit `peers check --ignore-workspace` path already preserves `None` when neither a workspace nor injected catalogs exist. Install-time reporting needs the same distinction while still passing configured or workspace catalogs when present.

## Fix Focus Areas
- pnpm/crates/package-manager/src/peer_dependency_issues.rs[34-59]
- pnpm/crates/package-manager/src/install/apply_materialization.rs[22-60]
- pnpm/crates/package-manager/src/install/run.rs[187-214]
- pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs[2008-2029]

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



Remediation recommended
2. Stale catalog reread mismatches lockfile state 🐞 Bug ≡ Correctness
Description
pnpm peers check resolves catalog: peer ranges against the current on-disk pnpm-workspace.yaml
via configured_catalogs, not against the catalogs section persisted in the lockfile at install
time. If the workspace catalog definitions change after the lockfile was written (without a fresh
install), peer matching silently compares the installed/locked version against a different range
than what was actually resolved, producing incorrect bad/missing-peer verdicts.
Code

pnpm/crates/cli/src/cli_args/peers.rs[R81-83]

+        let catalogs = configured_catalogs(config)?;
+        let catalogs =
+            (config.workspace_dir.is_some() || config.catalogs.is_some()).then_some(&catalogs);
Relevance

●● Moderate

Catalog freshness concerns are plausible, but history supports conservative catalog/lockfile
handling without this exact peers-check behavior.

PR-#13477
PR-#13698

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
configured_catalogs() reads pnpm-workspace.yaml live from disk (catalogs.rs:21-27) rather than the
lockfile's own persisted catalogs map, and this live map is what
resolve_peer_range/resolve_from_catalog dereferences catalog: peer ranges against (lib.rs:350-363),
so a workspace manifest edited after pnpm install produces a peers-check verdict that no longer
matches the actually-installed graph.

pnpm/crates/cli/src/cli_args/catalogs.rs[14-27]
pnpm/crates/deps-inspection-peers/src/lib.rs[350-363]

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

## Issue description
`pnpm peers check` dereferences `catalog:` peer ranges using catalogs re-read live from `pnpm-workspace.yaml` on disk, rather than the `catalogs` section already persisted in the lockfile at install time. If the workspace catalog definitions change after the lockfile was written, the peers check compares the installed/locked package version against a stale or mismatched range, producing wrong bad/missing-peer verdicts that don't reflect what is actually installed.

## Issue Context
`configured_catalogs()` in `pnpm/crates/cli/src/cli_args/catalogs.rs` reads the workspace manifest from disk via `read_workspace_manifest` + `get_catalogs_from_workspace_manifest`. This map is then passed through to `check_peer_dependencies_from_lockfile` and ultimately to `resolve_peer_range`/`resolve_from_catalog` in `pnpm/crates/deps-inspection-peers/src/lib.rs`, which use it to resolve `catalog:` peer ranges before comparing against resolved versions recorded in the lockfile.

## Fix Focus Areas
- pnpm/crates/cli/src/cli_args/peers.rs[81-83]
- pnpm/crates/cli/src/cli_args/catalogs.rs[14-27]
- pnpm/crates/deps-inspection-peers/src/lib.rs[350-363]

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



Informational
3. pnpm missing from changeset 📘 Rule violation § Compliance
Description
The new changeset declares only pacquet, while every changed changeset must explicitly include
pnpm with a valid bump type. This bug fix requires a pnpm: patch entry.
Code

.changeset/friendly-catalog-peers.md[2]

+"pacquet": patch
Relevance

● Weak

Recent same-rule changeset precedents reject adding pnpm; team treats pacquet-only changesets as
acceptable.

PR-#14360
PR-#14340
PR-#14317

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 713436 requires pnpm in every changed changeset with a valid bump type. The added front
matter lists only "pacquet": patch, so the required package entry is absent.

Rule 713436: Explicitly declare pnpm package and correct bump type in changesets
.changeset/friendly-catalog-peers.md[1-3]

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

## Issue description
The changeset omits the required `pnpm` package entry.

## Issue Context
PR Compliance ID 713436 requires every new or modified changeset to explicitly declare `pnpm` with an appropriate bump. This PR is a bug fix, so use `patch`.

## Fix Focus Areas
- .changeset/friendly-catalog-peers.md[1-3]

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


4. Registry manifest with literal catalog: peer unresolved 🐞 Bug ≡ Correctness
Description
extract_peer_dependencies only resolves catalog: peer ranges when
resolves_children_through_catalogs is true (workspace-resolved, file:-id packages); any other
package shape — including a registry package whose manifest happens to declare a peerDependencies
entry using catalog: — keeps the literal unresolved string, which is then persisted to the
lockfile and later compared by walk_snapshot's satisfies() against a real found version, always
reporting it as an unmet/bad peer. This is a narrower fix than the TypeScript CLI's, which resolves
catalog ranges independent of the resolution shape.
Code

pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs[R504-508]

+            extract_peer_dependencies(
+                &result,
+                &peer_shadowed,
+                resolves_children_through_catalogs(&result).then_some(&ctx.catalogs),
+            )?
Relevance

● Weak

PR explicitly states registry package peer ranges remain untouched, matching a deliberate scope
boundary.

PR-#14360

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
resolves_children_through_catalogs() gates catalog resolution to result.resolved_via == "workspace"
&& id starts_with("file:") (walk.rs:1533-1537); any other resolution shape passes None for catalogs
into extract_peer_dependencies, which then preserves the raw catalog: string unchanged
(manifest.rs:258-265); walk_snapshot later reads that persisted string straight out of the lockfile
with no catalog re-resolution and calls satisfies() against it (lib.rs:461-468), which never matches
a real semver version.

pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk.rs[1533-1537]
pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/manifest.rs[258-265]
pnpm/crates/deps-inspection-peers/src/lib.rs[461-468]


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 Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 0414392d06ae

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.461 ± 0.115 2.341 2.762 1.61 ± 0.16
pacquet@main 2.460 ± 0.124 2.324 2.676 1.61 ± 0.16
pnpr@HEAD 1.524 ± 0.130 1.409 1.750 1.00
pnpr@main 1.567 ± 0.076 1.452 1.699 1.03 ± 0.10
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.4611765665,
      "stddev": 0.11530987164757305,
      "median": 2.4441494528,
      "user": 2.2281242199999998,
      "system": 2.05717622,
      "min": 2.3410735253,
      "max": 2.7616616353
    },
    {
      "command": "pacquet@main",
      "mean": 2.4598780161000002,
      "stddev": 0.12443683607334266,
      "median": 2.4319183043,
      "user": 2.0066959199999994,
      "system": 1.8876069199999996,
      "min": 2.3238223953,
      "max": 2.6760849723
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5243869794,
      "stddev": 0.12963909683949698,
      "median": 1.4610318123000001,
      "user": 2.022838019999999,
      "system": 1.8956698199999997,
      "min": 1.4094944053,
      "max": 1.7497742193
    },
    {
      "command": "pnpr@main",
      "mean": 1.5669670874000001,
      "stddev": 0.07602289635649766,
      "median": 1.5526214653000001,
      "user": 2.2073310199999994,
      "system": 2.03641462,
      "min": 1.4520284363,
      "max": 1.6989269403000002
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 372.3 ± 29.9 307.1 406.1 1.06 ± 0.10
pacquet@main 350.4 ± 15.6 326.2 368.4 1.00
pnpr@HEAD 369.8 ± 20.1 341.7 398.7 1.06 ± 0.07
pnpr@main 350.8 ± 38.5 291.5 396.5 1.00 ± 0.12
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.37226511854,
      "stddev": 0.029882270190133613,
      "median": 0.37197620004,
      "user": 0.38318877999999995,
      "system": 0.71460704,
      "min": 0.30713746004000003,
      "max": 0.40605540504000004
    },
    {
      "command": "pacquet@main",
      "mean": 0.35044782454,
      "stddev": 0.01560939696934889,
      "median": 0.35102339754,
      "user": 0.34178328,
      "system": 0.74665274,
      "min": 0.32619771904,
      "max": 0.36842434104
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.36983363043999995,
      "stddev": 0.020145532120337168,
      "median": 0.36676112104,
      "user": 0.3336462800000001,
      "system": 0.7320805399999999,
      "min": 0.34171262004,
      "max": 0.39867190404
    },
    {
      "command": "pnpr@main",
      "mean": 0.35078374694000003,
      "stddev": 0.03846303419612376,
      "median": 0.36594305154,
      "user": 0.31912778,
      "system": 0.6815625399999999,
      "min": 0.29147520204,
      "max": 0.39654661504
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 15.6 ± 2.4 10.8 21.0 1.04 ± 0.27
pacquet@main 15.1 ± 2.5 10.0 20.6 1.01 ± 0.27
pnpr@HEAD 15.9 ± 2.8 10.4 23.7 1.06 ± 0.29
pnpr@main 15.0 ± 3.1 9.1 22.1 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.015602809806338798,
      "stddev": 0.00235498912869536,
      "median": 0.016319027320000002,
      "user": 0.0074193965027322395,
      "system": 0.008267421857923495,
      "min": 0.01080340832,
      "max": 0.020962126320000003
    },
    {
      "command": "pacquet@main",
      "mean": 0.015055919891428578,
      "stddev": 0.0024760315288086376,
      "median": 0.015077303320000002,
      "user": 0.008088149931972786,
      "system": 0.007066589115646258,
      "min": 0.009977074320000001,
      "max": 0.02055824532
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.015861186246315793,
      "stddev": 0.002783737566017491,
      "median": 0.015419095320000001,
      "user": 0.008112567368421052,
      "system": 0.007814448842105264,
      "min": 0.010379177319999999,
      "max": 0.023742168320000003
    },
    {
      "command": "pnpr@main",
      "mean": 0.014961267913749993,
      "stddev": 0.0031320599175994365,
      "median": 0.014939406320000003,
      "user": 0.00785553875,
      "system": 0.007187988437499996,
      "min": 0.009059960320000001,
      "max": 0.02212136332
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 13.3 ± 2.9 8.7 25.0 1.00
pacquet@main 13.9 ± 2.9 8.9 26.0 1.05 ± 0.31
pnpr@HEAD 14.8 ± 3.5 9.2 34.4 1.11 ± 0.35
pnpr@main 14.4 ± 2.7 8.9 21.1 1.08 ± 0.31
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.01330981324239521,
      "stddev": 0.0028740169481378266,
      "median": 0.01292401844,
      "user": 0.006165781317365268,
      "system": 0.007220527185628739,
      "min": 0.00868027044,
      "max": 0.025049008440000003
    },
    {
      "command": "pacquet@main",
      "mean": 0.013931816917124189,
      "stddev": 0.0028878569129943514,
      "median": 0.01364921444,
      "user": 0.00720635516339869,
      "system": 0.006798841830065357,
      "min": 0.008925919440000001,
      "max": 0.02599608444
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.014753896603934433,
      "stddev": 0.0034700617734572054,
      "median": 0.014117171440000001,
      "user": 0.007304741748633881,
      "system": 0.0075188825136612075,
      "min": 0.00924833044,
      "max": 0.03438218044000001
    },
    {
      "command": "pnpr@main",
      "mean": 0.014435526024210521,
      "stddev": 0.002655625136515241,
      "median": 0.01435483694,
      "user": 0.007861801052631576,
      "system": 0.006676831157894734,
      "min": 0.00891328144,
      "max": 0.02110811344
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 3.045 ± 0.066 2.932 3.129 1.80 ± 0.11
pacquet@main 3.044 ± 0.044 2.972 3.124 1.80 ± 0.11
pnpr@HEAD 1.706 ± 0.152 1.545 1.902 1.01 ± 0.11
pnpr@main 1.687 ± 0.097 1.546 1.834 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 3.04484051186,
      "stddev": 0.06563593749871745,
      "median": 3.0566913379600003,
      "user": 2.8145681799999998,
      "system": 2.12281924,
      "min": 2.93187121046,
      "max": 3.1291786264600003
    },
    {
      "command": "pacquet@main",
      "mean": 3.0444296032600007,
      "stddev": 0.04417046557209686,
      "median": 3.03820715146,
      "user": 2.86378398,
      "system": 2.13720204,
      "min": 2.9721196784600004,
      "max": 3.12369888046
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.7055579300600001,
      "stddev": 0.15179199989279402,
      "median": 1.66598425596,
      "user": 2.07960238,
      "system": 2.0404661400000004,
      "min": 1.54506218546,
      "max": 1.90196853546
    },
    {
      "command": "pnpr@main",
      "mean": 1.6872047343600003,
      "stddev": 0.0971938469070894,
      "median": 1.6738326534599999,
      "user": 1.9740160799999997,
      "system": 1.99514374,
      "min": 1.54615032246,
      "max": 1.83356307446
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 658.4 ± 62.8 546.6 776.0 1.62 ± 0.16
pacquet@main 605.8 ± 50.2 487.7 652.0 1.49 ± 0.13
pnpr@HEAD 414.2 ± 35.4 348.7 451.8 1.02 ± 0.09
pnpr@main 405.3 ± 10.7 387.2 421.2 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.6584455383200001,
      "stddev": 0.06282478778398293,
      "median": 0.6564413022200001,
      "user": 0.83570756,
      "system": 0.985854,
      "min": 0.5465732802200001,
      "max": 0.77603970322
    },
    {
      "command": "pacquet@main",
      "mean": 0.6058018166200001,
      "stddev": 0.05023486933061646,
      "median": 0.6237853237200001,
      "user": 0.7823437599999999,
      "system": 0.9746282,
      "min": 0.48774555322,
      "max": 0.6520346182200001
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.41419898682000006,
      "stddev": 0.0353775272938521,
      "median": 0.42104183872,
      "user": 0.32314946,
      "system": 0.7169263000000001,
      "min": 0.34874861422000003,
      "max": 0.45176932022
    },
    {
      "command": "pnpr@main",
      "mean": 0.40530216542,
      "stddev": 0.010653842924289447,
      "median": 0.40725787622,
      "user": 0.33350526,
      "system": 0.7114757,
      "min": 0.38720597222,
      "max": 0.42122491022
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.321 ± 0.057 2.222 2.397 4.41 ± 0.27
pacquet@main 2.598 ± 0.085 2.444 2.735 4.94 ± 0.32
pnpr@HEAD 0.526 ± 0.029 0.482 0.566 1.00
pnpr@main 0.556 ± 0.250 0.408 1.261 1.06 ± 0.48
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.32091397282,
      "stddev": 0.057422499470011684,
      "median": 2.32800034422,
      "user": 1.3667231800000004,
      "system": 1.1584932799999998,
      "min": 2.22166722322,
      "max": 2.39727722122
    },
    {
      "command": "pacquet@main",
      "mean": 2.59786328472,
      "stddev": 0.0849924018655739,
      "median": 2.62224342272,
      "user": 1.53446038,
      "system": 1.27775718,
      "min": 2.44361481222,
      "max": 2.73492775622
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.52592390012,
      "stddev": 0.02900170626073431,
      "median": 0.52131511922,
      "user": 0.41919058,
      "system": 0.78484658,
      "min": 0.48185131322,
      "max": 0.56555968922
    },
    {
      "command": "pnpr@main",
      "mean": 0.55634253002,
      "stddev": 0.24997609488697226,
      "median": 0.4930453007200001,
      "user": 0.46355968000000003,
      "system": 0.99774338,
      "min": 0.40833864422000005,
      "max": 1.2614348642200002
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 505.0 ± 76.9 368.6 651.8 3.06 ± 0.61
pacquet@main 519.5 ± 55.5 411.5 603.0 3.14 ± 0.52
pnpr@HEAD 180.0 ± 19.1 137.8 204.9 1.09 ± 0.18
pnpr@main 165.3 ± 21.0 135.6 204.6 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.5050385696000002,
      "stddev": 0.076903969642686,
      "median": 0.5058741250000001,
      "user": 0.46613276,
      "system": 0.14251447999999997,
      "min": 0.368570714,
      "max": 0.6517856880000001
    },
    {
      "command": "pacquet@main",
      "mean": 0.5195340108000001,
      "stddev": 0.055465987048036,
      "median": 0.5236378035000001,
      "user": 0.47004086,
      "system": 0.14986908,
      "min": 0.411519301,
      "max": 0.6030426640000001
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.18003927386666665,
      "stddev": 0.019146003309435205,
      "median": 0.18546257700000002,
      "user": 0.07206939333333333,
      "system": 0.03723124666666666,
      "min": 0.13775975000000001,
      "max": 0.204861764
    },
    {
      "command": "pnpr@main",
      "mean": 0.1652522436666667,
      "stddev": 0.02098913415568216,
      "median": 0.16663831,
      "user": 0.06623859333333333,
      "system": 0.029501579999999993,
      "min": 0.135567674,
      "max": 0.20464768
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 849.5 ± 124.3 656.1 1097.7 1.09 ± 0.22
pacquet@main 778.9 ± 106.4 608.3 903.2 1.00
pnpm@HEAD 3753.2 ± 292.5 3324.3 4255.9 4.82 ± 0.76
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.8494820013933333,
      "stddev": 0.12434926677618734,
      "median": 0.8484098640600001,
      "user": 0.79610738,
      "system": 0.19841351777777777,
      "min": 0.65608329606,
      "max": 1.09771478906
    },
    {
      "command": "pacquet@main",
      "mean": 0.7789488737266667,
      "stddev": 0.10635303567840325,
      "median": 0.8179506050600001,
      "user": 0.7423114911111112,
      "system": 0.19251629555555555,
      "min": 0.60833986906,
      "max": 0.90317354506
    },
    {
      "command": "pnpm@HEAD",
      "mean": 3.75323038306,
      "stddev": 0.29250261347496626,
      "median": 3.72492471206,
      "user": 5.394956046666667,
      "system": 0.37221340666666664,
      "min": 3.3243080850599998,
      "max": 4.25591762706
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.660 ± 0.137 4.534 4.950 1.29 ± 0.07
pacquet@main 5.002 ± 0.512 4.525 6.276 1.39 ± 0.15
pnpr@HEAD 4.079 ± 0.392 3.679 4.839 1.13 ± 0.12
pnpr@main 3.602 ± 0.160 3.444 3.898 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.6603924361599995,
      "stddev": 0.1372360470024798,
      "median": 4.6009853846599995,
      "user": 2.44474884,
      "system": 2.31338108,
      "min": 4.53362331916,
      "max": 4.94994808416
    },
    {
      "command": "pacquet@main",
      "mean": 5.00184443846,
      "stddev": 0.5118556208434965,
      "median": 4.879674616659999,
      "user": 2.6318705400000004,
      "system": 2.58706108,
      "min": 4.52481727316,
      "max": 6.27639089616
    },
    {
      "command": "pnpr@HEAD",
      "mean": 4.07908441106,
      "stddev": 0.392440653508223,
      "median": 3.9793570546600003,
      "user": 2.88893134,
      "system": 2.67790238,
      "min": 3.6791246011600003,
      "max": 4.83911225816
    },
    {
      "command": "pnpr@main",
      "mean": 3.6022568958600005,
      "stddev": 0.1601252515893565,
      "median": 3.55337852116,
      "user": 2.07027364,
      "system": 1.93480578,
      "min": 3.44407927216,
      "max": 3.8982986701600004
    }
  ]
}

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 150.9 ± 8.8 139.8 168.9 1.00
pacquet@main 175.7 ± 25.1 137.8 215.7 1.16 ± 0.18
pnpr@HEAD 198.1 ± 19.1 173.7 236.5 1.31 ± 0.15
pnpr@main 175.5 ± 16.6 159.0 219.8 1.16 ± 0.13
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.15087542055647057,
      "stddev": 0.008847663671904758,
      "median": 0.14824293038,
      "user": 0.18966080470588234,
      "system": 0.17422689882352937,
      "min": 0.13980645338,
      "max": 0.16894502538
    },
    {
      "command": "pacquet@main",
      "mean": 0.1757317502261539,
      "stddev": 0.025090361221526313,
      "median": 0.18015329538,
      "user": 0.21989165538461536,
      "system": 0.19619599384615385,
      "min": 0.13777606538,
      "max": 0.21572916738
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.19809785884153847,
      "stddev": 0.019056196255934868,
      "median": 0.19733267038000002,
      "user": 0.21725180923076925,
      "system": 0.20957037846153842,
      "min": 0.17371549538,
      "max": 0.23651901938
    },
    {
      "command": "pnpr@main",
      "mean": 0.17545253171333333,
      "stddev": 0.01655592178475613,
      "median": 0.16936586038,
      "user": 0.20317764,
      "system": 0.18642950666666666,
      "min": 0.15900140938000001,
      "max": 0.21984351038
    }
  ]
}

@github-actions

github-actions Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/14368
Testbedpacquet

🚨 7 Alerts

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
isolated-linker.fresh-install.cold-cache.hot-storeLatency
seconds (s)
📈 plot
🚷 threshold
🚨 alert (🔔)
2.22 s
(+20.75%)Baseline: 1.84 s
2.21 s
(100.63%)

isolated-linker.fresh-install.hot-cache.hot-storeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
546.57 ms
(+50.69%)Baseline: 362.72 ms
435.26 ms
(125.57%)

isolated-linker.fresh-resolve.hot-cache.offlineLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
368.57 ms
(+77.46%)Baseline: 207.70 ms
249.24 ms
(147.88%)

isolated-linker.fresh-restore.hot-cache.hot-storeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
307.14 ms
(+41.40%)Baseline: 217.21 ms
260.65 ms
(117.84%)

isolated-linker.peer-heavy-resolve.hot-cache.offlineLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
656.08 ms
(+38.36%)Baseline: 474.17 ms
569.01 ms
(115.30%)

isolated-linker.repeat-install.cold-cache.hot-storeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
8.68 ms
(+46.84%)Baseline: 5.91 ms
7.09 ms
(122.37%)

isolated-linker.repeat-install.hot-cache.hot-storeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
10.80 ms
(+83.62%)Baseline: 5.88 ms
7.06 ms
(153.01%)

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
139.81 ms
(-10.07%)Baseline: 155.45 ms
186.55 ms
(74.95%)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,931.87 ms
(+8.58%)Baseline: 2,700.08 ms
3,240.09 ms
(90.49%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
2,221.67 ms
(+20.75%)Baseline: 1,839.89 ms
2,207.87 ms
(100.63%)

isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
546.57 ms
(+50.69%)Baseline: 362.72 ms
435.26 ms
(125.57%)

isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
🚨 view alert (🔔)
368.57 ms
(+77.46%)Baseline: 207.70 ms
249.24 ms
(147.88%)

isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,341.07 ms
(+2.65%)Baseline: 2,280.65 ms
2,736.78 ms
(85.54%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,533.62 ms
(+4.47%)Baseline: 4,339.54 ms
5,207.45 ms
(87.06%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
307.14 ms
(+41.40%)Baseline: 217.21 ms
260.65 ms
(117.84%)

isolated-linker.peer-heavy-resolve.hot-cache.offline📈 view plot
🚷 view threshold
🚨 view alert (🔔)
656.08 ms
(+38.36%)Baseline: 474.17 ms
569.01 ms
(115.30%)

isolated-linker.repeat-install.cold-cache.hot-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
8.68 ms
(+46.84%)Baseline: 5.91 ms
7.09 ms
(122.37%)

isolated-linker.repeat-install.hot-cache.hot-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
10.80 ms
(+83.62%)Baseline: 5.88 ms
7.06 ms
(153.01%)

🐰 View full continuous benchmarking report in Bencher

Copilot AI review requested due to automatic review settings August 31, 2026 15:56
@greptile-apps
greptile-apps Bot dismissed their stale review August 31, 2026 15:56

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

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[bot]
greptile-apps Bot previously approved these changes Aug 31, 2026
@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 940c07d

Copilot AI review requested due to automatic review settings August 31, 2026 17:53
@greptile-apps
greptile-apps Bot dismissed their stale review August 31, 2026 17:53

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

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[bot]
greptile-apps Bot previously approved these changes Aug 31, 2026
@qodo-code-review

Copy link
Copy Markdown

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

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

Copilot AI review requested due to automatic review settings August 31, 2026 18:34
@greptile-apps
greptile-apps Bot dismissed their stale review August 31, 2026 18:35

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

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 4ded34a

@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 6da427c into main Aug 31, 2026
35 checks passed
@zkochan
zkochan deleted the fix-14361 branch August 31, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pacquet reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

catalog: in peerDependencies is not resolved on pnpm 12 (plain workspace link, not injected)

3 participants