Skip to content

fix(resolver): resolve catalog: only in injected workspace projects - #18290

Merged
zkochan merged 3 commits into
mainfrom
fix/catalog-in-file-dependency
Nov 21, 2026
Merged

zkochan merged 3 commits into
mainfrom
fix/catalog-in-file-dependency

Conversation

@zkochan

@zkochan zkochan commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes the main Rust CI failure in inject_workspace_packages::catalogs::ordinary_file_dependencies_do_not_inherit_importer_catalogs. The test has failed on Linux, macOS and Windows since it landed in #17295.

pnpm v12 passed the child specifiers of every file: directory package through the importer's catalogs, however the package was declared. An ordinary file: dependency outside the workspace therefore resolved its catalog: specifiers. pnpm v11 rejects them with ERR_PNPM_UNSUPPORTED_PROTOCOL, and the new test expects the same from v12.

Catalogs now apply to a directory package's children only when:

  • it was resolved through a workspace: specifier, as in pnpm v11 (resolvedVia === 'workspace'), or
  • its directory is a workspace project, or the directory a workspace project links through publishConfig.directory.

The workspace directories are collected once per importer, so each directory resolution costs a single set lookup.

The second case keeps the existing v12 behavior for a workspace project injected through a file: or bare path. The injected_freshness_matrix tests cover that case and pnpm v11 does not support it, so dropping it would be a regression.

This is a v12-only bug. pnpm v11 already rejects the case, and its half of the #17295 tests passes.

Squash Commit Body

The resolver passed the child specifiers of every file: directory package
through the importer's catalogs, however the package was declared. An
ordinary file: dependency outside the workspace therefore resolved its
catalog: specifiers instead of failing with ERR_PNPM_UNSUPPORTED_PROTOCOL,
which pnpm v11 reports. The test added in pnpm/pnpm#17295 has failed on
main since it landed.

Catalogs now apply to a directory package's children only when it was
resolved through a workspace: specifier, as in pnpm v11, or when its
directory is a workspace project or the publish directory one links. The
workspace directories are collected once per importer. The second case keeps the v12 behavior
for a workspace project injected by a file: or bare path, which the
injected freshness matrix covers and pnpm v11 does not support.

Verification

  • cargo nextest run on pnpm-resolving-deps-resolver plus every pnpm-cli test matching catalog or inject: 1241 passed, including the previously failing test, the six injected_freshness_matrix catalog cases, and a new test for a file: dependency on a workspace publish directory.
  • Full pnpm-cli and pnpm-package-manager suites: 8828 run. The 8 failures in a loaded local run all pass in isolation.
  • cargo clippy --workspace --all-targets -D warnings, dylint on the changed crate, and the pinned rustfmt: clean.

Checklist

  • I checked the referenced issue and verified that none of the PRs
    already linked to it solves it.
  • New features are implemented only in the Rust pnpm v12 CLI. Bug fixes
    are implemented in every affected version.
  • Added a changeset (pnpm changeset) if this PR changes any published
    package. Keep it short and written for pnpm users — it becomes a release note.
  • Added or updated tests.

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

🤖 Generated with Claude Code

The resolver passed the child specifiers of every file: directory package
through the importer's catalogs, however the package was declared. An
ordinary file: dependency outside the workspace therefore resolved its
catalog: specifiers instead of failing with ERR_PNPM_UNSUPPORTED_PROTOCOL,
which pnpm v11 reports. The test added in #17295
(ordinary_file_dependencies_do_not_inherit_importer_catalogs) has failed on
main since it landed.

Catalogs now apply to a directory package's children only when it was
resolved through a workspace: specifier, as in pnpm v11, or when its
directory is a workspace project. The second case keeps the v12 behavior
for a workspace project injected by a file: or bare path, which the
injected freshness matrix covers and pnpm v11 does not support.

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

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

No actionable comments were generated in the recent review.

Walkthrough

Catalog eligibility now uses workspace context. Workspace-resolved packages and directories matching configured workspace package roots qualify; other file: directories do not. The changeset records the reported install failure for non-workspace file: dependencies using catalog: specifiers.

Changes: Catalog resolution

Layer / File(s) Summary
Determine catalog eligibility from workspace context
pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk/child_seeds.rs, pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk/edge_resolution.rs, pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk/warm_children.rs, .changeset/catalog-in-file-dependency.md
Catalog eligibility checks workspace resolution or whether the declaring directory matches a normalized configured workspace package root. Dependency node construction and descendant warming pass TreeCtx to the check. The changeset records the reported install failure for non-workspace file: dependencies with catalog: specifiers.

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

Change: Bug fix

Suggested labels: product: pacquet

Suggested reviewers: ksxgithub, greptile-apps, qodo-code-review

Merge Risk: Minimal · previous review bb986

This change stops non-workspace file: dependencies from resolving catalog: specifiers, matching pnpm v11 behavior, while injected workspace projects keep working. No concrete merge-blocking risk was identified.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between ba7fa8a and bb9866c.

Files selected for processing: 4

  • .changeset/catalog-in-file-dependency.md
  • pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk/child_seeds.rs
  • pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk/edge_resolution.rs
  • pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/walk/warm_children.rs

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

@zkochan
zkochan marked this pull request as ready for review November 21, 2026 02:48
@qodo-code-review

qodo-code-review Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Restrict catalog resolution to injected workspace projects

🐞 Bug fix 🕐 10-20 Minutes

Grey Divider

AI Description

• Prevent ordinary file: dependencies from inheriting the importer's workspace catalogs.
• Preserve catalog resolution for injected workspace projects declared through workspace: or
 directory paths.
• Publish a patch changeset for the corrected install behavior.
Merge Risk 🟡 Medium

Blast radius 🟢 Low 💥 1 capability

  • 1 affected end-to-end capability after fault-specific containment; implementation boundaries do not widen its functional scope.
  • The changed classification determines whether a local or injected workspace package's own catalog specifiers are transformed before its dependency graph is resolved.
  • Fresh node seeding and warmed-child traversal are propagation hops of this same bounded resolver behavior, not independent capabilities.
  • This remains the same bounded local/workspace dependency-resolution behavior: the fault changes whether a package's catalog child specs are expanded, and the changed identity and warm-child code are propagation hops rather than separate capabilities.
Behavioral complexity 🟡 Medium 🧩 Interacting branches, Compatibility cases

  • Before, the resolver distinguished workspace and file-directory cases using the package root membership check.
  • After, it additionally derives and caches both workspace roots and resolved publish/link directories, and the classification remains consumed by fresh and warmed traversal.
  • The new correctness condition is that the directory exposed by a file dependency, including a publish directory, must agree with the workspace package membership set while external file packages remain unsupported.
  • The delta narrows the prior compatibility gap for publish directories but retains the interacting classification states; it introduces no new algorithm or concurrency protocol.
Potential damage 🟡 Medium 🩹 Temporary loss

  • A false negative leaves catalog: child specifiers unsupported and can make installation fail.
  • The added publish-directory membership handling removes that particular false-negative case, but an unresolved path-representation mismatch could still prevent recognition of another workspace path.
  • Reverting the code does not automatically repair an already failed or partially written install.
  • Recoverable by rerunning resolution/install with the corrected resolver.
  • If a lockfile or modules directory was partially written, cleanup or regeneration may be required; automatic state repair is not established.
Assessed commit 0a9f1ed
Diagram

graph TD
  A["Resolved package"] --> B{"Local directory?"} -->|yes| C{"Workspace origin?"} -->|yes| D["Apply catalogs"] --> E["Resolve child specs"]
  C -->|no| F["Leave catalog intact"] --> E
  B -->|no| E
Loading
High-Level Assessment

Keep the shared workspace-eligibility check: it preserves catalog resolution for path-injected workspace projects while applying the same rule to normal and speculative resolution. Restricting it to workspace: specifiers would regress those path-injected projects.

Files changed (4) +32 / -8

Bug fix (3) +27 / -8
child_seeds.rsLimit child catalog lookup to workspace directories +19/-4

Limit child catalog lookup to workspace directories

• Requires a file-shaped directory resolution and either 'workspace:' resolution or membership in the configured workspace projects before applying importer catalogs to children.

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

edge_resolution.rsPass workspace context into node identity +7/-3

Pass workspace context into node identity

• Supplies tree context when creating a pending node so its child-catalog eligibility uses the workspace-aware check.

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

warm_children.rsApply the same catalog rule during speculative warming +1/-1

Apply the same catalog rule during speculative warming

• Passes tree context to the child-catalog eligibility check when warming grandchildren, keeping speculative resolution consistent with the normal walk.

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

Documentation (1) +5 / -0
catalog-in-file-dependency.mdDocument the corrected catalog behavior +5/-0

Document the corrected catalog behavior

• Adds a pacquet patch changeset explaining that non-workspace 'file:' dependencies with 'catalog:' children now fail, while injected workspace projects remain supported.

.changeset/catalog-in-file-dependency.md

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

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Reviews (2) · Last reviewed commit: "fix(resolver): recognize workspace publi..." · Reviewed by Greptile

@qodo-code-review

qodo-code-review Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Remediation recommended

1. Unnamed workspace projects reject catalogs ✓ Resolved

Resolving commit: 0a9f1ed

Resolution reason
The membership check no longer scans workspace_packages directly. It now uses a directory-keyed
HashSet (workspace_project_dirs, cached per importer via OnceLock) built from
ctx.options.base.project.workspace_packages, which contains each package's root_dir and its resolved
publish-directory link (resolve_workspace_package_dir). resolves_children_through_catalogs checks
membership in that set. This addresses the premise that the index misses publish-directory projects,
and the added test covers a file: dependency on a publishConfig.directory project with catalog:
children. The suggested fix asks for inclusion of unnamed projects; the diff builds the set from
workspace_packages, which the finding says skips unnamed projects, so the unnamed-project case is
not explicitly handled, and the test uses a named package "lib". Still, the commit reworks the same
membership check to a directory-keyed set and adds a catalog-through-file-dependency test, which is
a different but related fix.
Description
is_workspace_project_dir checks only workspace_packages, whose builder skips projects without a
name and can replace entries with the same name and version. When one of those discovered projects
is injected through a file: path, its catalog: children no longer receive the workspace catalogs
and resolution fails.

2. Workspace installs repeatedly scan projects ✓ Resolved

Resolving commit: 0a9f1ed

Resolution reason
Replaced the per-call linear scan with a lazily built, per-importer cached HashSet of normalized
workspace project directories (plus their publishConfig-linked directories), so each
directory-result check becomes a set membership lookup.
Description
is_workspace_project_dir traverses the entire workspace name/version map and normalizes each
candidate path on every directory-result check. Fresh resolution and speculative warm-up both call
this predicate, so an install with many injected projects repeats the scan for each such dependency
even when no catalogs are configured.

Grey Divider

Context sources
✅ Compliance rules (platform): 44 rules
✅ Cross-repo context — repo relationships
  Explored: repo: pnpm/update (sha: 2457663d) — View relationship
  Explored: repo: pnpm/xray (sha: e98dca73) — View relationship
Review mode: Auto: ⚖️ Balanced: Resolver behavior and workspace path matching carry meaningful correctness and performance risk.
✅ Fix-loop round: fix loop

Grey Divider

Tip of the day
💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous reviews

Review updated until commit 0a9f1ed ⚖️ Balanced

Results up to commit bb9866c ⚖️ Balanced


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


Remediation recommended
1. Unnamed workspace projects reject catalogs ✓ Resolved

Resolving commit: 0a9f1ed

Resolution reason
The membership check no longer scans workspace_packages directly. It now uses a directory-keyed
HashSet (workspace_project_dirs, cached per importer via OnceLock) built from
ctx.options.base.project.workspace_packages, which contains each package's root_dir and its resolved
publish-directory link (resolve_workspace_package_dir). resolves_children_through_catalogs checks
membership in that set. This addresses the premise that the index misses publish-directory projects,
and the added test covers a file: dependency on a publishConfig.directory project with catalog:
children. The suggested fix asks for inclusion of unnamed projects; the diff builds the set from
workspace_packages, which the finding says skips unnamed projects, so the unnamed-project case is
not explicitly handled, and the test uses a named package "lib". Still, the commit reworks the same
membership check to a directory-keyed set and adds a catalog-through-file-dependency test, which is
a different but related fix.
Description
is_workspace_project_dir checks only workspace_packages, whose builder skips projects without a
name and can replace entries with the same name and version. When one of those discovered projects
is injected through a file: path, its catalog: children no longer receive the workspace catalogs
and resolution fails.

2. Workspace installs repeatedly scan projects ✓ Resolved

Resolving commit: 0a9f1ed

Resolution reason
Replaced the per-call linear scan with a lazily built, per-importer cached HashSet of normalized
workspace project directories (plus their publishConfig-linked directories), so each
directory-result check becomes a set membership lookup.
Description
is_workspace_project_dir traverses the entire workspace name/version map and normalizes each
candidate path on every directory-result check. Fresh resolution and speculative warm-up both call
this predicate, so an install with many injected projects repeats the scan for each such dependency
even when no catalogs are configured.

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 added the reviewed: coderabbit CodeRabbit submitted an approving review label Nov 21, 2026
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                                            main                                    pr
-----                                            ----                                    --
lockfile/parse_pnpm_lock                         1.00      4.3±0.90ms    86.5 MB/sec     1.05      4.5±0.48ms    82.6 MB/sec
packument/parse                                  1.00     42.9±0.43µs  1545.5 MB/sec     1.07     46.0±0.44µs  1441.0 MB/sec
tarball/download_dependency                      1.15  1006.6±264.42µs     4.2 MB/sec    1.00  878.7±120.46µs     4.8 MB/sec
tarball_batch/cold_store_many_medium_tarballs    1.00    231.8±3.84ms 69.0 KElem/sec     1.01    233.8±9.91ms 68.4 KElem/sec
version_pick/repeated_ranges_file                1.00      5.1±0.05ms  6.2 KElem/sec     1.03      5.2±0.08ms  6.0 KElem/sec
version_pick/repeated_ranges_raw                 1.00      5.1±0.06ms  6.1 KElem/sec     1.02      5.2±0.09ms  6.0 KElem/sec
version_pick/wildcard_lowest                     1.01     43.8±0.70µs 22.3 KElem/sec     1.00     43.3±0.75µs 22.6 KElem/sec
workspace_resolution/hoist_heavy                 1.00   268.4±18.25ms        ? ?/sec     1.04    278.4±4.06ms        ? ?/sec
workspace_sort/chained_projects                  1.00     14.1±1.41ms        ? ?/sec     1.21     17.0±1.43ms        ? ?/sec

@github-actions

Copy link
Copy Markdown
Contributor

Same-run regression check

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

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

Scenario Engine main median HEAD median Change Tolerance Result
isolated-fresh-restore-cold-cache-cold-store pacquet 2428.16 ms 2344.16 ms -3.5% 121.41 ms Within tolerance
isolated-fresh-restore-cold-cache-cold-store pnpr 1385.64 ms 1374.02 ms -0.8% 69.28 ms Within tolerance
isolated-fresh-restore-hot-cache-hot-store pacquet 193.78 ms 209.60 ms 8.2% 9.69 ms Inconclusive (overlapping samples)
isolated-fresh-restore-hot-cache-hot-store pnpr 210.04 ms 212.84 ms 1.3% 10.50 ms Within tolerance
isolated-repeat-install-hot-cache-hot-store pacquet 9.95 ms 10.15 ms 2.0% 2.00 ms Within tolerance
isolated-repeat-install-hot-cache-hot-store pnpr 10.04 ms 10.09 ms 0.4% 2.00 ms Within tolerance
isolated-repeat-install-cold-cache-hot-store pacquet 9.67 ms 9.57 ms -1.1% 2.00 ms Within tolerance
isolated-repeat-install-cold-cache-hot-store pnpr 9.73 ms 9.70 ms -0.3% 2.00 ms Within tolerance
isolated-fresh-install-cold-cache-cold-store pacquet 2390.05 ms 2396.71 ms 0.3% 119.50 ms Within tolerance
isolated-fresh-install-cold-cache-cold-store pnpr 1578.34 ms 1602.99 ms 1.6% 78.92 ms Within tolerance
isolated-fresh-install-hot-cache-hot-store pacquet 556.77 ms 537.43 ms -3.5% 27.84 ms Within tolerance
isolated-fresh-install-hot-cache-hot-store pnpr 297.76 ms 317.39 ms 6.6% 14.89 ms Inconclusive (overlapping samples)
isolated-fresh-install-cold-cache-hot-store pacquet 1530.70 ms 1516.60 ms -0.9% 76.54 ms Within tolerance
isolated-fresh-install-cold-cache-hot-store pnpr 310.95 ms 312.89 ms 0.6% 15.55 ms Within tolerance
isolated-fresh-install-cold-cache-hot-store-cold-pnpr-resolve pacquet 1556.44 ms 1540.94 ms -1.0% 77.82 ms Within tolerance
isolated-fresh-install-cold-cache-hot-store-cold-pnpr-resolve pnpr 798.34 ms 767.88 ms -3.8% 39.92 ms Within tolerance
isolated-fresh-resolve-hot-cache-offline pacquet 260.53 ms 263.85 ms 1.3% 13.03 ms Within tolerance
isolated-fresh-resolve-hot-cache-offline pnpr 92.29 ms 92.80 ms 0.6% 4.61 ms Within tolerance
isolated-peer-heavy-resolve-hot-cache-offline pacquet 201.38 ms 207.26 ms 2.9% 10.07 ms Within tolerance
isolated-linked-workspace-resolve-hot-cache-offline pacquet 73.48 ms 76.65 ms 4.3% 3.67 ms Within tolerance
isolated-injected-workspace-repeat-install-hot-cache-hot-store pacquet 105.39 ms 110.80 ms 5.1% 5.27 ms Inconclusive (overlapping samples)
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pacquet 4454.11 ms 4507.29 ms 1.2% 222.71 ms Within tolerance
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pnpr 3477.95 ms 3551.74 ms 2.1% 173.90 ms Within tolerance
gvs-fresh-restore-hot-cache-hot-store pacquet 137.06 ms 152.71 ms 11.4% 6.85 ms Inconclusive (overlapping samples)
gvs-fresh-restore-hot-cache-hot-store pnpr 148.28 ms 138.63 ms -6.5% 7.41 ms Within tolerance
store-only-unlocked-direct-deps-cold-cache-hot-store pacquet 1128.86 ms 1189.08 ms 5.3% 56.44 ms Inconclusive (overlapping samples)
cargo-repeat-install-hot-cache-hot-store pacquet 34.06 ms 35.81 ms 5.1% 2.00 ms Within tolerance

Same-run syscall check

Each install runs 2 more times per revision, untimed, under strace --follow-forks --summary-only. A file syscall regresses when HEAD's fewest calls exceed main's most by more than 2% of main or 50 calls, whichever is larger. mkdir and mkdirat count only the calls that created a directory, since concurrent installs fail a varying number with EEXIST. A syscall whose identical runs differ by more than that tolerance is reported unstable and not gated, unless HEAD's fewest calls also exceed main's most by more than the tolerance plus that difference. Each scenario lists its largest change relative to its tolerance and every row that is not within tolerance.

Scenario Engine Syscall main calls (max) HEAD calls (min) Change Tolerance Identical-run spread Result
isolated-fresh-restore-cold-cache-cold-store pacquet access 11 11 +0.0% 50 0 Within tolerance
isolated-fresh-restore-cold-cache-cold-store pnpr access 11 11 +0.0% 50 0 Within tolerance
isolated-fresh-restore-hot-cache-hot-store pacquet access 11 11 +0.0% 50 0 Within tolerance
isolated-fresh-restore-hot-cache-hot-store pnpr statx 47012 47015 +0.0% 940 5 Within tolerance
isolated-repeat-install-hot-cache-hot-store pacquet access 8 8 +0.0% 50 0 Within tolerance
isolated-repeat-install-hot-cache-hot-store pnpr access 8 8 +0.0% 50 0 Within tolerance
isolated-repeat-install-cold-cache-hot-store pacquet access 8 8 +0.0% 50 0 Within tolerance
isolated-repeat-install-cold-cache-hot-store pnpr access 8 8 +0.0% 50 0 Within tolerance
isolated-fresh-install-cold-cache-cold-store pacquet openat 63511 63528 +0.0% 1270 15 Within tolerance
isolated-fresh-install-cold-cache-cold-store pacquet readlink 16195 15918 -1.7% 323 786 Unstable (identical runs differ by 786, not gated)
isolated-fresh-install-cold-cache-cold-store pnpr access 11 11 +0.0% 50 0 Within tolerance
isolated-fresh-install-hot-cache-hot-store pacquet access 11 11 +0.0% 50 0 Within tolerance
isolated-fresh-install-hot-cache-hot-store pnpr access 11 11 +0.0% 50 0 Within tolerance
isolated-fresh-install-cold-cache-hot-store pacquet access 11 11 +0.0% 50 0 Within tolerance
isolated-fresh-install-cold-cache-hot-store pnpr access 11 11 +0.0% 50 0 Within tolerance
isolated-fresh-install-cold-cache-hot-store-cold-pnpr-resolve pacquet access 11 11 +0.0% 50 0 Within tolerance
isolated-fresh-install-cold-cache-hot-store-cold-pnpr-resolve pnpr statx 81429 81441 +0.0% 1628 20 Within tolerance
isolated-fresh-resolve-hot-cache-offline pacquet access 8 8 +0.0% 50 0 Within tolerance
isolated-fresh-resolve-hot-cache-offline pnpr access 8 8 +0.0% 50 0 Within tolerance
isolated-peer-heavy-resolve-hot-cache-offline pacquet access 8 8 +0.0% 50 0 Within tolerance
isolated-linked-workspace-resolve-hot-cache-offline pacquet access 8 8 +0.0% 50 0 Within tolerance
isolated-injected-workspace-repeat-install-hot-cache-hot-store pacquet access 11 11 +0.0% 50 0 Within tolerance
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pacquet access 11 11 +0.0% 50 0 Within tolerance
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pnpr access 11 11 +0.0% 50 0 Within tolerance
gvs-fresh-restore-hot-cache-hot-store pacquet access 11 11 +0.0% 50 0 Within tolerance
gvs-fresh-restore-hot-cache-hot-store pnpr access 11 11 +0.0% 50 0 Within tolerance
store-only-unlocked-direct-deps-cold-cache-hot-store pacquet access 8 8 +0.0% 50 0 Within tolerance
cargo-repeat-install-hot-cache-hot-store pacquet access 10 10 +0.0% 50 0 Within tolerance

Integrated-Benchmark Report (Linux)

Commit: bb9866c6bc92

Compared against main at: ba7fa8acafff

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

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

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.356 ± 0.090 2.260 2.518 1.69 ± 0.13
pacquet@main 2.420 ± 0.120 2.257 2.568 1.74 ± 0.15
pnpr@HEAD 1.390 ± 0.096 1.280 1.612 1.00
pnpr@main 1.407 ± 0.121 1.269 1.632 1.01 ± 0.11
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.35553009512,
      "stddev": 0.08954308102693186,
      "median": 2.3441557840200002,
      "user": 2.02392924,
      "system": 1.3936856599999998,
      "min": 2.2600104940200003,
      "max": 2.5183107010200003
    },
    {
      "command": "pacquet@main",
      "mean": 2.41952148742,
      "stddev": 0.1197086116532966,
      "median": 2.4281607355200006,
      "user": 1.9697500399999999,
      "system": 1.45452816,
      "min": 2.25728917702,
      "max": 2.5684597950200003
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.3899106450199998,
      "stddev": 0.09575461376574922,
      "median": 1.37402417152,
      "user": 1.8586499399999998,
      "system": 1.3383273599999999,
      "min": 1.27956041102,
      "max": 1.61206804202
    },
    {
      "command": "pnpr@main",
      "mean": 1.40697111912,
      "stddev": 0.12071346493534374,
      "median": 1.38564420002,
      "user": 1.8650119399999998,
      "system": 1.34953306,
      "min": 1.26944517502,
      "max": 1.63237840102
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 209.0 ± 13.2 191.7 229.1 1.07 ± 0.08
pacquet@main 194.4 ± 7.4 185.4 210.5 1.00
pnpr@HEAD 211.8 ± 4.7 206.1 217.9 1.09 ± 0.05
pnpr@main 210.0 ± 5.1 201.7 216.2 1.08 ± 0.05
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.20898136688000002,
      "stddev": 0.013199483704836866,
      "median": 0.20960125598,
      "user": 0.26946238,
      "system": 0.5201195200000001,
      "min": 0.19169235498,
      "max": 0.22906025098000002
    },
    {
      "command": "pacquet@main",
      "mean": 0.19442292898000002,
      "stddev": 0.007358855802942756,
      "median": 0.19377827798000002,
      "user": 0.24668598000000003,
      "system": 0.48901932,
      "min": 0.18540652598000001,
      "max": 0.21051481198000002
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.21180116198000004,
      "stddev": 0.004712932074702917,
      "median": 0.21283932448,
      "user": 0.26420398,
      "system": 0.49220162000000006,
      "min": 0.20612463498000003,
      "max": 0.21788924498
    },
    {
      "command": "pnpr@main",
      "mean": 0.20995719788000003,
      "stddev": 0.0050817904073068056,
      "median": 0.21003863798000003,
      "user": 0.24848158000000004,
      "system": 0.5086503199999999,
      "min": 0.20173672298,
      "max": 0.21623320398
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 10.2 ± 0.5 9.4 14.5 1.02 ± 0.07
pacquet@main 10.0 ± 0.4 9.2 12.5 1.00
pnpr@HEAD 10.1 ± 0.4 9.4 13.7 1.01 ± 0.06
pnpr@main 10.1 ± 0.4 9.4 11.8 1.01 ± 0.05
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.010198714275390946,
      "stddev": 0.0005216161938966516,
      "median": 0.01015185744,
      "user": 0.0057288155555555555,
      "system": 0.0054807226337448564,
      "min": 0.00942156744,
      "max": 0.01454456944
    },
    {
      "command": "pacquet@main",
      "mean": 0.010001011382084951,
      "stddev": 0.0003990840898859455,
      "median": 0.00995029644,
      "user": 0.005501190501930504,
      "system": 0.005526572509652512,
      "min": 0.00921755644,
      "max": 0.01252904744
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.010122308578775514,
      "stddev": 0.00039906339336193966,
      "median": 0.010086877440000001,
      "user": 0.006673435510204078,
      "system": 0.004484759510204082,
      "min": 0.00939360644,
      "max": 0.01374878844
    },
    {
      "command": "pnpr@main",
      "mean": 0.010092296808217053,
      "stddev": 0.00036862437005571525,
      "median": 0.010042756940000001,
      "user": 0.006121868527131783,
      "system": 0.0050195751937984505,
      "min": 0.00935724644,
      "max": 0.01181293744
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 9.7 ± 0.6 8.9 13.2 1.00 ± 0.07
pacquet@main 9.7 ± 0.3 9.1 12.3 1.00
pnpr@HEAD 9.7 ± 0.4 9.0 11.5 1.00 ± 0.05
pnpr@main 9.8 ± 1.0 9.1 24.7 1.01 ± 0.11
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.009712863267004225,
      "stddev": 0.00058114711703791,
      "median": 0.00956566244,
      "user": 0.00607579924050633,
      "system": 0.00448780751054852,
      "min": 0.008941142439999999,
      "max": 0.01315019444
    },
    {
      "command": "pacquet@main",
      "mean": 0.009699782984354836,
      "stddev": 0.00032576462496569907,
      "median": 0.009670687939999999,
      "user": 0.005590752741935484,
      "system": 0.005027866370967741,
      "min": 0.00913049244,
      "max": 0.01232604444
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.009733484587679333,
      "stddev": 0.0003647517942007882,
      "median": 0.00970313244,
      "user": 0.006132128354430381,
      "system": 0.004530618902953585,
      "min": 0.008979323439999999,
      "max": 0.01149255244
    },
    {
      "command": "pnpr@main",
      "mean": 0.009814285585161293,
      "stddev": 0.0010227190717450269,
      "median": 0.009729637440000001,
      "user": 0.005570418064516127,
      "system": 0.005082074838709675,
      "min": 0.00907045244,
      "max": 0.024734748440000003
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.407 ± 0.038 2.370 2.499 1.53 ± 0.15
pacquet@main 2.408 ± 0.053 2.358 2.548 1.53 ± 0.15
pnpr@HEAD 1.582 ± 0.095 1.441 1.720 1.01 ± 0.12
pnpr@main 1.572 ± 0.153 1.397 1.771 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.40652163868,
      "stddev": 0.03831872621989739,
      "median": 2.39671397248,
      "user": 2.24802766,
      "system": 1.5543341,
      "min": 2.36959537348,
      "max": 2.49869328748
    },
    {
      "command": "pacquet@main",
      "mean": 2.40821930378,
      "stddev": 0.052791657339214086,
      "median": 2.39005148198,
      "user": 2.28079086,
      "system": 1.5916674,
      "min": 2.3580474824800004,
      "max": 2.5482683924800003
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.58157063198,
      "stddev": 0.0950778392369313,
      "median": 1.60298841598,
      "user": 1.7985665600000005,
      "system": 1.5295311000000003,
      "min": 1.4410405984799999,
      "max": 1.7203309434799998
    },
    {
      "command": "pnpr@main",
      "mean": 1.5716275550799998,
      "stddev": 0.1529097938778414,
      "median": 1.57834080448,
      "user": 1.8146533599999999,
      "system": 1.4683102,
      "min": 1.39660731648,
      "max": 1.77092713548
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 538.4 ± 22.1 497.7 572.9 1.79 ± 0.09
pacquet@main 555.2 ± 17.8 518.5 577.4 1.85 ± 0.08
pnpr@HEAD 313.5 ± 14.3 289.7 331.2 1.05 ± 0.06
pnpr@main 300.0 ± 8.0 289.0 317.3 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.5383705213,
      "stddev": 0.022083975244101602,
      "median": 0.5374278286,
      "user": 0.7992788399999999,
      "system": 0.9338845600000001,
      "min": 0.4976756781,
      "max": 0.5729082501
    },
    {
      "command": "pacquet@main",
      "mean": 0.5551566300000002,
      "stddev": 0.01779264135315377,
      "median": 0.5567737986000001,
      "user": 0.8473661399999999,
      "system": 0.9949389599999998,
      "min": 0.5185422441,
      "max": 0.5773684081
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.3135359366,
      "stddev": 0.01430351154726872,
      "median": 0.31739492859999996,
      "user": 0.29270194,
      "system": 0.6174184599999999,
      "min": 0.2896621171,
      "max": 0.3312373101
    },
    {
      "command": "pnpr@main",
      "mean": 0.2999552899,
      "stddev": 0.007970643361947704,
      "median": 0.2977625916,
      "user": 0.26587214000000003,
      "system": 0.6109549599999999,
      "min": 0.2889851651,
      "max": 0.3172985101
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.526 ± 0.034 1.496 1.617 4.93 ± 0.17
pacquet@main 1.547 ± 0.044 1.518 1.663 4.99 ± 0.20
pnpr@HEAD 0.317 ± 0.008 0.309 0.330 1.03 ± 0.04
pnpr@main 0.310 ± 0.008 0.289 0.318 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.5258410699599998,
      "stddev": 0.033587622724767084,
      "median": 1.51659648026,
      "user": 0.8379177199999999,
      "system": 0.8313330999999999,
      "min": 1.4958848632600001,
      "max": 1.6171857442600002
    },
    {
      "command": "pacquet@main",
      "mean": 1.5465419151600002,
      "stddev": 0.04409537977680514,
      "median": 1.5307004317600001,
      "user": 0.8681430200000001,
      "system": 0.9229611999999999,
      "min": 1.51755086826,
      "max": 1.66285636926
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.31739407495999994,
      "stddev": 0.008191993181284883,
      "median": 0.31289236976,
      "user": 0.29017732,
      "system": 0.6324042,
      "min": 0.30919709626,
      "max": 0.32977582726
    },
    {
      "command": "pnpr@main",
      "mean": 0.30962318316,
      "stddev": 0.008335556175383178,
      "median": 0.31094521326,
      "user": 0.28106332,
      "system": 0.6360366999999999,
      "min": 0.28874877526,
      "max": 0.31797338526
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.557 ± 0.037 1.524 1.646 2.03 ± 0.07
pacquet@main 1.570 ± 0.045 1.533 1.675 2.05 ± 0.08
pnpr@HEAD 0.765 ± 0.022 0.724 0.796 1.00
pnpr@main 0.792 ± 0.017 0.767 0.811 1.03 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.55677779508,
      "stddev": 0.03694973689783359,
      "median": 1.54093874338,
      "user": 0.90599428,
      "system": 0.87086294,
      "min": 1.5243236033799998,
      "max": 1.64567646038
    },
    {
      "command": "pacquet@main",
      "mean": 1.56999648048,
      "stddev": 0.04520481194816682,
      "median": 1.55644034788,
      "user": 0.92688408,
      "system": 0.9626695399999999,
      "min": 1.5327539883799999,
      "max": 1.67495710138
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.76541386168,
      "stddev": 0.0215260847587009,
      "median": 0.76787790988,
      "user": 0.5416584799999999,
      "system": 0.7602406399999999,
      "min": 0.7242508573800001,
      "max": 0.7957787153800001
    },
    {
      "command": "pnpr@main",
      "mean": 0.7920238740800001,
      "stddev": 0.017428455569553167,
      "median": 0.7983439253800001,
      "user": 0.54734158,
      "system": 0.81136194,
      "min": 0.76733874038,
      "max": 0.81145684238
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 266.9 ± 18.8 230.2 299.1 2.89 ± 0.21
pacquet@main 264.9 ± 17.6 238.8 292.6 2.87 ± 0.20
pnpr@HEAD 93.0 ± 2.4 87.8 97.9 1.01 ± 0.03
pnpr@main 92.3 ± 2.0 88.1 96.5 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.2668575424333333,
      "stddev": 0.01875374900088233,
      "median": 0.26385347610000004,
      "user": 0.2713787766666666,
      "system": 0.18314862666666665,
      "min": 0.2301515991,
      "max": 0.29907971510000003
    },
    {
      "command": "pacquet@main",
      "mean": 0.26489597579999996,
      "stddev": 0.01761440651033274,
      "median": 0.2605304761,
      "user": 0.28165756,
      "system": 0.16873176,
      "min": 0.2388328431,
      "max": 0.2925592651
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.09303979793333335,
      "stddev": 0.002411867862394452,
      "median": 0.09279896060000001,
      "user": 0.035976326666666655,
      "system": 0.017212494666666668,
      "min": 0.0878045031,
      "max": 0.0979419591
    },
    {
      "command": "pnpr@main",
      "mean": 0.09226132022499998,
      "stddev": 0.0019889441511321423,
      "median": 0.0922902351,
      "user": 0.039329109999999994,
      "system": 0.013836524999999997,
      "min": 0.0880514141,
      "max": 0.0965164971
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 208.0 ± 10.9 189.2 226.2 1.02 ± 0.07
pacquet@main 203.5 ± 10.4 193.2 221.5 1.00
pnpm@HEAD 3845.7 ± 139.8 3653.5 4083.0 18.90 ± 1.18
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.20795862472666668,
      "stddev": 0.010945537777408886,
      "median": 0.20726219806,
      "user": 0.21989814222222223,
      "system": 0.05647016222222222,
      "min": 0.18924420206,
      "max": 0.22619758406
    },
    {
      "command": "pacquet@main",
      "mean": 0.20345495461555557,
      "stddev": 0.010354809040430105,
      "median": 0.20138240606000002,
      "user": 0.21376992,
      "system": 0.05507416222222222,
      "min": 0.19324460306000002,
      "max": 0.22154595306000002
    },
    {
      "command": "pnpm@HEAD",
      "mean": 3.8457233271711115,
      "stddev": 0.13980736702219737,
      "median": 3.8467410020600004,
      "user": 6.02804480888889,
      "system": 0.3333376066666667,
      "min": 3.6534808610600003,
      "max": 4.08296819306
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 78.0 ± 5.2 71.4 91.5 1.05 ± 0.07
pacquet@main 74.2 ± 1.9 72.5 80.4 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.07801496438774196,
      "stddev": 0.0051912292282427835,
      "median": 0.07664917042000001,
      "user": 0.08123175806451613,
      "system": 0.03346276193548387,
      "min": 0.07139303342,
      "max": 0.09145236342
    },
    {
      "command": "pacquet@main",
      "mean": 0.07420643526210527,
      "stddev": 0.0018572077318684266,
      "median": 0.07347758092000001,
      "user": 0.07512652631578948,
      "system": 0.034159967368421036,
      "min": 0.07247922442,
      "max": 0.08037131642
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 112.4 ± 11.9 98.5 147.0 1.03 ± 0.14
pacquet@main 109.2 ± 9.6 97.7 128.4 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.11235483121913045,
      "stddev": 0.011941785617421055,
      "median": 0.11079916548,
      "user": 0.046291200000000005,
      "system": 0.0805159808695652,
      "min": 0.09845342648000001,
      "max": 0.14699231148
    },
    {
      "command": "pacquet@main",
      "mean": 0.10916941574086955,
      "stddev": 0.009567079077492406,
      "median": 0.10539438648,
      "user": 0.046939852173913034,
      "system": 0.07602076347826087,
      "min": 0.09771183648000001,
      "max": 0.12835626548
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.565 ± 0.180 4.389 4.845 1.31 ± 0.05
pacquet@main 4.508 ± 0.154 4.430 4.933 1.29 ± 0.05
pnpr@HEAD 3.551 ± 0.083 3.441 3.700 1.02 ± 0.03
pnpr@main 3.485 ± 0.044 3.438 3.574 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.5647402778,
      "stddev": 0.17991193664221478,
      "median": 4.5072870390999995,
      "user": 2.07485004,
      "system": 1.55407718,
      "min": 4.3892515326,
      "max": 4.8449705786
    },
    {
      "command": "pacquet@main",
      "mean": 4.5080239155,
      "stddev": 0.15408910133040463,
      "median": 4.4541118666,
      "user": 2.2366147399999994,
      "system": 1.62809228,
      "min": 4.4303835256,
      "max": 4.9330410216
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.5514654635,
      "stddev": 0.08330350514104587,
      "median": 3.5517406306,
      "user": 2.04438074,
      "system": 1.5604335799999998,
      "min": 3.4410389366,
      "max": 3.7003189736
    },
    {
      "command": "pnpr@main",
      "mean": 3.4848166313,
      "stddev": 0.04359231424614665,
      "median": 3.4779451916,
      "user": 2.02784644,
      "system": 1.5211060799999998,
      "min": 3.4382227546,
      "max": 3.5743126056
    }
  ]
}

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

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 153.4 ± 14.4 133.2 181.9 1.12 ± 0.15
pacquet@main 137.6 ± 13.3 116.5 172.7 1.00
pnpr@HEAD 139.7 ± 9.6 127.4 166.4 1.02 ± 0.12
pnpr@main 148.6 ± 9.7 132.1 173.6 1.08 ± 0.13
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.15344969449714288,
      "stddev": 0.014428752619959427,
      "median": 0.15270861864000002,
      "user": 0.2130288914285714,
      "system": 0.15488562285714286,
      "min": 0.13319785414000002,
      "max": 0.18189953214000001
    },
    {
      "command": "pacquet@main",
      "mean": 0.1375922067511111,
      "stddev": 0.013272643842088712,
      "median": 0.13705584764,
      "user": 0.18936604222222223,
      "system": 0.14253975777777778,
      "min": 0.11650815814000001,
      "max": 0.17265498414000002
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.13971855298210528,
      "stddev": 0.009648699587635545,
      "median": 0.13862648214,
      "user": 0.17812982000000002,
      "system": 0.13715471684210523,
      "min": 0.12738097614000002,
      "max": 0.16642534614
    },
    {
      "command": "pnpr@main",
      "mean": 0.14859805441777776,
      "stddev": 0.009675901632397923,
      "median": 0.14828468464,
      "user": 0.1872897644444444,
      "system": 0.14808764666666666,
      "min": 0.13206877414,
      "max": 0.17361044414000001
    }
  ]
}

Scenario: Store only: unlocked direct deps, cold cache + hot store

Store-only install (enableModulesDir: false, per-file store index, trusted lockfile) against a lockfile missing the direct dependencies that have peers, with the metadata cache wiped per iteration: the install resolves those from the registry, reuses their subtrees from the lockfile and checks the store, linking nothing. Direct installs only.

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.186 ± 0.060 1.117 1.254 1.04 ± 0.07
pacquet@main 1.137 ± 0.056 1.067 1.233 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.1857517862800002,
      "stddev": 0.06017319133096804,
      "median": 1.18907740118,
      "user": 0.58211684,
      "system": 0.2448474,
      "min": 1.11708145418,
      "max": 1.2541328521800001
    },
    {
      "command": "pacquet@main",
      "mean": 1.1370409720799999,
      "stddev": 0.055589439105912124,
      "median": 1.12885942518,
      "user": 0.5718326399999999,
      "system": 0.2467829,
      "min": 1.06732765818,
      "max": 1.23323893318
    }
  ]
}

Scenario: Cargo: repeat install, hot cache + hot store

Frozen repeat install of a Cargo workspace (cargo.enabled: true) whose crates are already materialized in <storeDir>/v11/crates/ and linked into .pnpm/crates/crates-io. Direct installs only.

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 35.9 ± 2.0 32.1 40.7 1.05 ± 0.08
pacquet@main 34.2 ± 1.9 31.4 39.1 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.03589074671469879,
      "stddev": 0.002043280677809908,
      "median": 0.03581301904,
      "user": 0.02846164240963855,
      "system": 0.01933117060240964,
      "min": 0.03210364604,
      "max": 0.04070679504
    },
    {
      "command": "pacquet@main",
      "mean": 0.03424508704000002,
      "stddev": 0.0018724234480117423,
      "median": 0.03406147404,
      "user": 0.02589376151898733,
      "system": 0.019986216202531652,
      "min": 0.03137106404,
      "max": 0.039139870040000004
    }
  ]
}

A workspace project with publishConfig.directory links that directory, so
a file: dependency on it resolves there rather than at the project root.
The workspace check compared the directory only with project roots, so
such a dependency lost its catalog: resolution.

The workspace directories, each project's root and the directory it
links, are now collected once per importer instead of scanning every
workspace package on each directory resolution.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@zkochan
zkochan merged commit 5918e45 into main Nov 21, 2026
21 checks passed
@zkochan
zkochan deleted the fix/catalog-in-file-dependency branch November 21, 2026 03:06
@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 0a9f1ed

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

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.09%. Comparing base (41e8a13) to head (0a9f1ed).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18290      +/-   ##
==========================================
- Coverage   92.23%   92.09%   -0.15%     
==========================================
  Files        2504     2507       +3     
  Lines      315522   316515     +993     
==========================================
+ Hits       291034   291485     +451     
- Misses      24488    25030     +542     

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

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

zkochan added a commit that referenced this pull request Nov 23, 2026
Related to pnpm/tasks#310.

## Summary

#18290 narrowed catalog inheritance to injected workspace
projects. As a side effect, an ordinary `file:` dependency's taken
`catalog:` peer range reached the resolver unresolved, and install
failed with:

```
ERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER
"@pnpm.e2e/foo@catalog:" isn't supported by any available resolver
```

pnpm 11 resolves this after #17753, and #18129 left
the v12 behavior explicitly unverified. This change passes the importer
catalogs for peer extraction whenever the resolution declares a manifest
directory, which covers ordinary `file:` directories as well as injected
workspace projects. Child specifiers of ordinary file dependencies still
do not inherit importer catalogs, as #18290 requires, and the
resolver output format is unchanged.

The v12 freshness half of pnpm/tasks#310 was verified separately: once
resolution succeeds, editing the catalog is picked up by a normal
install, and a frozen install reports
`ERR_PNPM_LOCKFILE_CONFIG_MISMATCH` until the lockfile is re-resolved.
This PR is therefore related to, not closing, pnpm/tasks#310.

---------

Co-authored-by: Zoltan Kochan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pacquet reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants