Skip to content

fix(catalogs): re-resolve a project the catalog entry moved past - #13860

Merged
zkochan merged 2 commits into
mainfrom
fix/catalog-stale-sibling
Aug 14, 2026
Merged

zkochan merged 2 commits into
mainfrom
fix/catalog-stale-sibling

Conversation

@zkochan

@zkochan zkochan commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

Summary

A catalog entry resolves to one version for every project that references it. Only the projects
in the install that moves the entry follow it, though — and the ones left behind were never
corrected.

catalog:
  '@pnpm.e2e/foo': ^1.0.0     # resolved to 1.0.0, used by project1 and project2

pnpm update @pnpm.e2e/foo in project1 bumps the entry to ^1.3.0/1.3.0 and moves
project1. project2 keeps 1.0.0 — a version ^1.3.0 does not allow — and stays there:

  • a later full install does not correct it, because by then the entry's specifier matches
    what the lockfile recorded, so the up-to-date check reads project2 as current and skips
    resolution altogether;
  • a frozen install passes, so CI doesn't catch it either.

The workspace ends up on two versions of one catalog entry, indefinitely and silently.

The up-to-date check now also compares each catalog: dependency's recorded version against the
version its entry resolved to, and the resolution the install forgets is chosen by the same
predicate, so a project left behind re-resolves through the catalog on its next install.\n\nExplicit frozen installs now reject the inconsistency.\n\nAn alias (npm: in the entry) records <name>@<version> rather than a bare version, and a
non-registry resolution records a protocol; neither compares to a version, so both are left
alone.

Found while working on #13841 and #13853; measured on main before and after
those landed.

Squash Commit Body

A catalog entry resolves to one version for every project that references it, but only the
projects in the install that moves the entry follow it. The rest kept the version they had — one
the entry no longer allowed — and nothing corrected it afterwards: by then the entry's specifier
matched what the lockfile recorded, so the up-to-date check read those projects as current and
skipped resolution entirely. A frozen install accepted the result too, so a workspace could sit
on two versions of one catalog entry indefinitely.

The up-to-date check now also compares each `catalog:` dependency's recorded version against the
version its entry resolved to, and the resolution the install forgets is chosen by the same
predicate, so a project left behind re-resolves through the catalog on its next install.\n\nExplicit frozen installs now reject the inconsistency.

An alias (`npm:` in the entry) records `<name>@<version>` rather than a bare version, and a
non-registry resolution records a protocol; neither compares to a version, so both are left
alone.

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.

pacquet needs no change. It resolves the whole workspace on every install, so both projects
already follow the entry together — measured: after --dir packages/a update <pkg>, packages/a
and packages/b move to 1.3.0. This closes a divergence rather than opening one.

deps-installer's catalogs.ts (54) and lockfile.verification (30) pass, along with
test/lockfile.ts, test/install/updatingPkgJson.ts, test/install/misc.ts and
test/install/frozenLockfile.ts. The one failure in that sweep,
packages installed via tarball URL from the default registry are normalized, fails identically
on a worktree without these changes — it reaches the network.


Written by agents (Claude Code, claude-opus-5; Codex, gpt-5.6-sol).


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
    • Catalog-backed dependencies now detect outdated lockfile resolutions during installation.
    • Projects follow updated catalog entries on their next install instead of retaining obsolete versions.
    • Full, fast, frozen, and partial workspace installs now consistently refresh stale catalog resolutions.
    • Frozen installs fail when the lockfile contains stale catalog resolutions.
    • Linked dependencies continue to be preserved while catalog updates are applied.

A catalog entry resolves to one version for every project that references
it, but only the projects in the install that moves the entry follow it.
The rest kept the version they had — one the entry no longer allowed — and
nothing corrected it afterwards: by then the entry's specifier matched what
the lockfile recorded, so the up-to-date check read those projects as
current and skipped resolution entirely. A frozen install accepted the
result too, so a workspace could sit on two versions of one catalog entry
indefinitely.

The up-to-date check now also compares each `catalog:` dependency's
recorded version against the version its entry resolved to, and the
resolution the install forgets is chosen by the same predicate, so a
project left behind re-resolves through the catalog on its next install.

An alias (`npm:` in the entry) records `<name>@<version>` rather than a
bare version, and a non-registry resolution records a protocol; neither
compares to a version, so both are left alone.

pacquet resolves the whole workspace on every install and already keeps
every project on the entry's version, so this closes a divergence rather
than opening one.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI lite review requested due to automatic review settings August 12, 2026 11:37

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 Summary by Qodo

Fix stale catalog resolutions for projects not included in a catalog update

🐞 Bug fix 🧪 Tests ⚙️ Configuration changes 🕐 40+ Minutes

Grey Divider

AI Description

• Detect when an importer’s catalog: dependency version diverges from the catalog entry.
• Force re-resolution for projects left behind after a catalog entry update.
• Add regression test ensuring all projects converge to the same catalog-resolved version.
Diagram

graph TD
  A["deps-installer: mutateModules()"] --> B["forgetResolutionsOfPrevWantedDeps()"] --> C["catalogResolutionIsStale()"]
  D["lockfile.verification: allProjectsAreUpToDate()"] --> E["catalogResolutionsAreUpToDate()"] --> C
  C --> F[("wantedLockfile.catalogs")]
  C --> G[("importer snapshot")]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Eager workspace-wide re-resolution on catalog change
  • ➕ Guarantees convergence immediately after any catalog edit/update
  • ➕ Avoids per-project drift without relying on later installs
  • ➖ Potentially much more expensive (forces broader resolution even for unaffected projects)
  • ➖ Harder to preserve current fast-path behavior for large workspaces
2. Lockfile schema link from importer dep to catalog entry
  • ➕ Makes drift detection explicit and robust (importer points to catalog entry ID/version)
  • ➕ Could simplify comparison logic and avoid parsing catalog: specifiers
  • ➖ Requires lockfile format changes and migration logic
  • ➖ Higher compatibility and tooling surface area
3. Always treat `catalog:` deps as out-of-date unless project participated in last catalog move
  • ➕ Simple conceptual model
  • ➕ Avoids false positives/negatives from version parsing edge cases
  • ➖ Needs additional state to track participation
  • ➖ Can cause repeated unnecessary resolutions

Recommendation: Current approach is the best tradeoff: it keeps the install fast-path, but extends the up-to-date predicate to include catalog-resolved version drift and uses the same predicate to drop stale importer resolutions. The result is eventual convergence (next install of the left-behind project) without forcing expensive full-workspace re-resolution.

Files changed (9) +135 / -13

Enhancement (2) +44 / -0
catalogResolutionsAreUpToDate.tsAdd catalog resolution drift detection helpers +43/-0

Add catalog resolution drift detection helpers

• Introduces 'catalogResolutionsAreUpToDate' and 'catalogResolutionIsStale' to detect when a project’s recorded dependency ref no longer matches the catalog snapshot’s resolved version. Skips comparisons for alias ('npm:') refs and non-registry/protocol refs where a bare version comparison is not valid.

pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts

index.tsExport catalog resolution drift checks +1/-0

Export catalog resolution drift checks

• Exports the new catalog drift detection functions so they can be used by the installer and verification entrypoints.

pnpm11/lockfile/verification/src/index.ts

Bug fix (2) +29 / -13
index.tsForget stale catalog resolutions during install mutations +27/-13

Forget stale catalog resolutions during install mutations

• Extends the logic that drops previous importer resolutions to also drop resolutions when a 'catalog:' dependency’s recorded version no longer matches the catalog entry’s resolved version. Wires in 'catalogResolutionIsStale' and passes catalogs context so left-behind projects get re-resolved on subsequent installs.

pnpm11/installing/deps-installer/src/install/index.ts

allProjectsAreUpToDate.tsInclude catalog resolution drift in up-to-date gate +2/-0

Include catalog resolution drift in up-to-date gate

• Updates the fast-path up-to-date check to also require that each importer’s 'catalog:' dependency version matches the catalog entry’s resolved version, preventing silent divergence.

pnpm11/lockfile/verification/src/allProjectsAreUpToDate.ts

Tests (1) +48 / -0
catalogs.tsAdd regression test for left-behind project after catalog update +48/-0

Add regression test for left-behind project after catalog update

• Introduces a workspace test where updating a catalog entry via one project previously left a sibling project pinned to an invalid older version. Verifies both importers converge to the catalog’s resolved version after the fix.

pnpm11/installing/deps-installer/test/catalogs.ts

Documentation (1) +7 / -0
catalog-stale-sibling.mdDocument patch releases for stale catalog sibling fix +7/-0

Document patch releases for stale catalog sibling fix

• Adds a changeset describing the bug where projects could silently diverge on a single catalog entry and the new behavior that re-aligns left-behind projects on their next install.

.changeset/catalog-stale-sibling.md

Other (3) +7 / -0
pnpm-lock.yamlUpdate lockfile for new verification workspace dependency +3/-0

Update lockfile for new verification workspace dependency

• Adds '@pnpm/catalogs.protocol-parser' as a workspace-linked dependency for the lockfile verification package to support parsing 'catalog:' specifiers.

pnpm-lock.yaml

package.jsonAdd protocol-parser dependency for catalog stale checks +1/-0

Add protocol-parser dependency for catalog stale checks

• Adds '@pnpm/catalogs.protocol-parser' to enable detection of 'catalog:' specifiers when validating project up-to-date status.

pnpm11/lockfile/verification/package.json

tsconfig.jsonReference protocol-parser workspace project in TS config +3/-0

Reference protocol-parser workspace project in TS config

• Adds a TypeScript project reference to 'catalogs/protocol-parser' so the verification package can compile against the new dependency.

pnpm11/lockfile/verification/tsconfig.json

@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e694df36-8544-4695-8b1a-685df4a952ca

📥 Commits

Reviewing files that changed from the base of the PR and between 7621656 and 84b4080.

📒 Files selected for processing (5)
  • .changeset/catalog-stale-sibling.md
  • pnpm11/installing/deps-installer/src/install/index.ts
  • pnpm11/installing/deps-installer/test/install/frozenLockfile.ts
  • pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts
  • pnpm11/lockfile/verification/test/catalogResolutionsAreUpToDate.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • .changeset/catalog-stale-sibling.md
  • pnpm11/installing/deps-installer/src/install/index.ts

📝 Walkthrough

Walkthrough

Catalog freshness checks now compare lockfile resolutions with current catalog entries. Install paths invalidate stale catalog-backed resolutions, frozen installs reject stale lockfiles, and regression tests cover multi-project updates and peer-suffixed versions.

Changes

Catalog resolution freshness

Layer / File(s) Summary
Catalog freshness verification
pnpm11/lockfile/verification/...
The lockfile verifier parses catalog: specifiers, compares normalized recorded versions with catalog snapshots, and includes catalog freshness in project status checks.
Install-time stale resolution invalidation
pnpm11/installing/deps-installer/src/install/index.ts, pnpm11/installing/deps-installer/test/install/frozenLockfile.ts
Install and workspace partial-install paths invalidate stale catalog-backed resolutions. Frozen installation rejects stale catalog resolutions. link: dependencies remain preserved.
Regression coverage and release metadata
pnpm11/installing/deps-installer/test/catalogs.ts, pnpm11/lockfile/verification/test/catalogResolutionsAreUpToDate.test.ts, .changeset/catalog-stale-sibling.md
Tests cover multi-project catalog updates and peer-suffixed resolutions. The changeset records patch releases for the affected packages.

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

Mergeability Score: ⚪ Minimal · up to 84b40

The change is localized to catalog resolution and frozen-install validation, with no reported failed checks or concrete current-head correctness risks; no actionable merge-blocking risk remains beyond normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant installCase
  participant forgetResolutionsOfPrevWantedDeps
  participant catalogResolutionIsStale
  participant CatalogSnapshots
  installCase->>forgetResolutionsOfPrevWantedDeps: pass importer and catalog context
  forgetResolutionsOfPrevWantedDeps->>catalogResolutionIsStale: check catalog-backed dependency
  catalogResolutionIsStale->>CatalogSnapshots: read current catalog version
  CatalogSnapshots-->>catalogResolutionIsStale: return catalog version
  CatalogSnapshots-->>catalogResolutionIsStale: provide catalog snapshot
  catalogResolutionIsStale-->>forgetResolutionsOfPrevWantedDeps: report stale resolution
  forgetResolutionsOfPrevWantedDeps-->>installCase: retain or remove resolution
Loading

Possibly related PRs

  • pnpm/pnpm#13464: Both changes integrate lockfile freshness checks with fast-update install paths.
  • pnpm/pnpm#13477: Both changes update catalog resolution invalidation and fast-update behavior.
  • pnpm/pnpm#13841: Both changes modify catalog resolution invalidation and related install behavior.

Suggested labels: product: pnpm@11

Suggested reviewers: greptile-apps

✨ 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/catalog-stale-sibling

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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.

@greptile-apps

greptile-apps Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 4/5

The peer-suffixed catalog case must be fixed before merging because the new check can still accept and retain stale catalog resolutions.

Catalog dependencies with peers have importer references containing @, so the new early return bypasses the version comparison before the existing suffix-removal helper can normalize them.

Files Needing Attention: pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts, pnpm11/installing/deps-installer/src/install/index.ts

Reviews (1): Last reviewed commit: "fix(catalogs): re-resolve a project the ..." | Re-trigger Greptile

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

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

Inline comments:
In @.changeset/catalog-stale-sibling.md:
- Line 3: Change the release type for `@pnpm/lockfile.verification` in the
changeset from patch to minor, reflecting its newly exported public APIs
catalogResolutionIsStale and catalogResolutionsAreUpToDate.

In `@pnpm11/lockfile/verification/src/allProjectsAreUpToDate.ts`:
- Line 70: Update the explicit frozen-install validation in tryFrozenInstall()
to call catalogResolutionsAreUpToDate() for each importer alongside
satisfiesPackageManifest(), and throw the existing outdated-lockfile error when
it fails. Preserve the automatic frozen-like path and add a regression test
covering a manifest catalog: entry whose recorded lockfile version is stale.

In `@pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts`:
- Around line 39-42: In the catalog resolution check, normalize ref with
dp.removeSuffix before testing for alias or protocol markers, then compare the
normalized value with catalogVersion while preserving the null handling. Add a
regression case covering a peer-suffixed registry dependency such as
1.3.0([email protected]) so stale resolutions are not reused.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f893aec3-af96-4f36-ab50-e42d67b84c15

📥 Commits

Reviewing files that changed from the base of the PR and between 26f45df and 7621656.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !pnpm-lock.yaml
📒 Files selected for processing (8)
  • .changeset/catalog-stale-sibling.md
  • pnpm11/installing/deps-installer/src/install/index.ts
  • pnpm11/installing/deps-installer/test/catalogs.ts
  • pnpm11/lockfile/verification/package.json
  • pnpm11/lockfile/verification/src/allProjectsAreUpToDate.ts
  • pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts
  • pnpm11/lockfile/verification/src/index.ts
  • pnpm11/lockfile/verification/tsconfig.json

Comment thread .changeset/catalog-stale-sibling.md Resolved
@qodo-code-review

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

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Action required

1. Peer suffix skips staleness ✓ Resolved 🐞 Bug ≡ Correctness
Description
catalogResolutionIsStale() returns false for any recorded importer ref containing '@', which also
matches normal peer-suffixed versions like 1.0.0([email protected]). As a result, catalog dependencies
that resolved with peer suffixes will never be considered stale, so affected projects can remain on
the old catalog-resolved version and still pass the up-to-date check.
Code

pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts[R40-42]

+  // version, and a non-registry resolution records a protocol. Neither compares to a version.
+  if (ref == null || ref.includes('@') || ref.includes(':')) return false
+  return dp.removeSuffix(ref) !== catalogVersion
Relevance

●●● Strong

Looks like a concrete correctness bug (peer-suffix '@' case) that can break staleness detection.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The new code treats any ref containing '@' as non-comparable, but importer refs commonly include '@'
inside peer suffixes. The repo’s own tests assert these peer-suffixed importer versions, and the
deps.path utilities are designed to strip such suffixes before comparing versions (as other lockfile
verification code already does).

pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts[38-42]
pnpm11/installing/deps-installer/test/install/peerDependencies.ts[1989-1992]
pnpm11/deps/path/test/index.ts[152-154]
pnpm11/lockfile/verification/src/satisfiesPackageManifest.ts[113-116]

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

## Issue description
`catalogResolutionIsStale()` currently bails out when `ref.includes('@')`, but peer-suffixed lockfile versions (e.g. `1.0.0([email protected])` or nested peer forms) also contain `@`. That prevents the new stale-catalog detection from ever triggering for catalog dependencies that resolved with peers.

## Issue Context
- Peer suffixes are a normal lockfile encoding and are explicitly intended to be removed via `dp.removeSuffix()`.
- The current guard runs *before* `removeSuffix()`, so the normalization never happens.

## Fix Focus Areas
- pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts[33-42]

## Proposed fix
1. Keep the early returns for `specifier == null`, non-catalog specifiers, and missing catalog snapshots.
2. Replace the `ref.includes('@') || ref.includes(':')` heuristic with a semver check on the normalized reference:
  - `const normalized = dp.removeSuffix(ref)`
  - If `semver.valid(normalized) == null`, return `false` (alias/non-registry/other non-semver resolutions remain ignored).
  - Otherwise compare `normalized !== catalogVersion`.

This preserves the intent (only compare bare versions) while correctly handling peer suffixes.

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



Remediation recommended

2. Registry ref bypasses staleness 🐞 Bug ≡ Correctness ⭐ New
Description
catalogResolutionIsStale() treats any non-bare-semver importer ref as “not stale”, so
registry-qualified refs like <registry>:<version> will never be compared against the catalog
snapshot and stale catalog resolutions can slip through.
Code

pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts[R32-35]

+  if (ref == null) return false
+  const resolvedVersion = dp.removeSuffix(ref)
+  if (semver.valid(resolvedVersion) == null) return false
+  return resolvedVersion !== catalogVersion
Relevance

●●● Strong

Registry-qualified refs are supported; bypassing staleness check is a real correctness bug they
likely fix.

PR-#13779
PR-#13680

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The new logic gates comparison on semver.valid(resolvedVersion), which will be false for
registry-qualified refs. The repo explicitly supports <registry>:<version> refs and already strips
them in other code, demonstrating this is a real format that would bypass the new check.

pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts[31-35]
pnpm11/deps/path/src/index.ts[49-64]
pnpm11/installing/env-installer/src/resolvePackageManagerIntegrities.ts[165-170]

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

### Issue description
`catalogResolutionIsStale()` currently compares `dp.removeSuffix(ref)` only when it is a bare semver string. This misses the supported lockfile representation `<registry>:<version>` (named registries), because `semver.valid('work:1.0.0')` is null, so the function returns `false` and never flags staleness.

### Issue Context
`@pnpm/deps.path` supports registry-qualified versions and other code paths strip the registry prefix before interpreting refs.

### Fix Focus Areas
- pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts[31-35]

### Suggested change
- After `dp.removeSuffix(ref)`, extract the underlying semver when the ref is registry-qualified (e.g. `dp.parseRegistryQualifiedVersion(resolved)?.version ?? resolved`).
- Compare normalized/clean semver values (and optionally short-circuit when `catalogVersion` is not a valid semver, to preserve the “don’t compare non-version refs” behavior).
- Add a regression test that uses an importer ref like `work:1.3.0(peer@...)` (or `work:1.3.0`) and verifies staleness is detected when the catalog snapshot version differs.

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


3. Wrong bump for lockfile.verification 📘 Rule violation § Compliance ⭐ New
Description
The changeset marks @pnpm/lockfile.verification as a minor bump even though the PR description
and changeset text describe a bug fix to catalog staleness handling. This can cause unnecessary
semver-minor releases and miscommunicate the change’s impact to users.
Code

.changeset/catalog-stale-sibling.md[3]

+"@pnpm/lockfile.verification": minor
Relevance

●●● Strong

They often adjust changeset bump levels to match actual change impact; bugfix shouldn’t be minor.

PR-#12884
PR-#13671

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 713436 requires the changeset bump type to match the described change. The
changeset currently declares @pnpm/lockfile.verification: minor even though the change is
described as a fix for incorrect catalog resolution behavior, which aligns with a patch bump.

Rule 713436: Explicitly declare pnpm package and correct bump type in changesets
.changeset/catalog-stale-sibling.md[3-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 declares a `minor` bump for `@pnpm/lockfile.verification`, but this PR is a bug fix (catalog staleness correctness + stricter frozen-lockfile validation), which should be released as a `patch`.

## Issue Context
Compliance requires changeset bump types to match the change impact. This PR’s summary describes correcting incorrect/stale catalog resolutions rather than adding new user-facing features.

## Fix Focus Areas
- .changeset/catalog-stale-sibling.md[3-3]

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


4. Empty frozen failure reason 🐞 Bug ◔ Observability ⭐ New
Description
When --frozen-lockfile fails only due to stale catalog resolutions, the thrown error prints an
empty “Failure reason” because detailedReason is sourced solely from satisfiesPackageManifest()
and isn’t set for catalog-staleness failures.
Code

pnpm11/installing/deps-installer/src/install/index.ts[R1410-1412]

+        const importer = ctx.wantedLockfile.importers[id]
+        const { satisfies, detailedReason } = _satisfiesPackageManifest(importer, manifest)
+        if (!satisfies || (importer != null && !catalogResolutionsAreUpToDate(importer, ctx.wantedLockfile.catalogs))) {
Relevance

●●● Strong

Frozen-lockfile diagnostics/verification messaging fixes are usually accepted; empty failure reason
is a clear UX bug.

PR-#11705
PR-#12144

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The new condition can fail independently of satisfiesPackageManifest(), but the error’s reason
text is still based on detailedReason from that function, which is only set on manifest mismatch
failures.

pnpm11/installing/deps-installer/src/install/index.ts[1410-1427]
pnpm11/lockfile/verification/src/satisfiesPackageManifest.ts[14-24]
pnpm11/lockfile/verification/src/satisfiesPackageManifest.ts[54-58]

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 frozen-lockfile failure path now includes `!catalogResolutionsAreUpToDate(...)`, but the error message’s “Failure reason” is still populated only from `satisfiesPackageManifest()`. If the manifest satisfies the importer and only the catalog resolution is stale, users get a failure with an empty reason, making CI failures hard to triage.

### Issue Context
`satisfiesPackageManifest()` returns `detailedReason` only when it returns `satisfies: false`; on success it commonly returns no reason.

### Fix Focus Areas
- pnpm11/installing/deps-installer/src/install/index.ts[1410-1427]

### Suggested change
- Compute a `failureReason` that covers both cases:
 - If `!satisfies`, use `detailedReason`.
 - Else if catalog resolutions are stale, set something like: `Catalog dependency resolutions in pnpm-lock.yaml are stale (importer resolved version differs from lockfile catalogs snapshot).`.
- Use `failureReason` in the hint, and avoid printing the “Failure reason:” header when the reason is empty.

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


View medium (2)
5. JSDoc describes old behavior ⊘ Outdated 📘 Rule violation ⚙ Maintainability
Description
The new JSDoc explains historical/previous behavior (projects "keep the version they had") rather
than the current contract, which can mislead readers after the fix.
Code

pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts[R9-12]

+ * A catalog entry resolves to one version for the whole workspace, but only the projects in
+ * an install that moves the entry follow it. The rest keep the version they had, and their
+ * entry's specifier matches by then, so nothing else reads them as out of date.
+ */
Relevance

●●● Strong

Updating misleading JSDoc to match current behavior is a low-risk maintainability fix.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The added comment uses historical phrasing about what projects did before this fix (“only the
projects in an install that moves the entry follow it… The rest keep the version they had”), which
violates the requirement to keep comments focused on current behavior.

Rule 772199: Comments must describe current behavior, not historical implementations
pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts[5-12]

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

## Issue description
A new JSDoc block documents past behavior and the previous failure mode instead of describing the current contract/guarantees of the function.

## Issue Context
Inline docs should describe current behavior and function contracts; historical explanations belong in PR descriptions, issues, or changelogs.

## Fix Focus Areas
- pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts[5-12]

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


6. Catalog staleness check TS-only 📘 Rule violation ⌂ Architecture
Description
The PR changes pnpm TypeScript up-to-date semantics by adding a catalog: resolution-staleness
gate, but there is no equivalent Pacquet Rust freshness check shown in this PR, risking divergent
user-visible install behavior between implementations.
Code

pnpm11/lockfile/verification/src/allProjectsAreUpToDate.ts[70]

+      catalogResolutionsAreUpToDate(importer, opts.wantedLockfile.catalogs) &&
Relevance

●● Moderate

Cross-implementation parity change is architectural; no close prior acceptance/rejection precedent
found.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The TypeScript implementation now treats projects as out-of-date when a catalog: dependency’s
recorded resolved version differs from the catalog entry’s resolved version. The Pacquet Rust
freshness code shown only validates catalog specifiers (not per-importer resolved versions), so
without a corresponding Rust change (or explicit divergence note) pnpm and pacquet can disagree on
whether an install is up-to-date.

Rule 713428: Keep pnpm TypeScript and pacquet Rust user-visible behavior changes in sync
pnpm11/lockfile/verification/src/allProjectsAreUpToDate.ts[67-71]
pnpm/crates/lockfile/src/freshness.rs[549-561]

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

## Issue description
This PR adds a new user-visible freshness rule in pnpm TypeScript (`catalogResolutionsAreUpToDate`) but the Pacquet Rust lockfile freshness logic does not appear to include an equivalent check, creating a pnpm/pacquet behavior divergence.

## Issue Context
Rule 713428 requires user-visible behavior changes to be implemented in both pnpm (TypeScript) and pacquet (Rust) in the same PR, or explicitly called out as a known divergence.

## Fix Focus Areas
- pnpm11/lockfile/verification/src/allProjectsAreUpToDate.ts[70-70]
- pnpm/crates/lockfile/src/freshness.rs[549-561]
- pnpm/crates/package-manager/src/install/lockfile_freshness.rs[129-195]

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


Grey Divider

Context
✅ Compliance rules (platform): 18 rules

Grey Divider

Tip of the day
💡 Did you know, you can describe a rule in plain language on the Rules page and Qodo drafts it for you

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous review results

Review updated until commit 84b4080

Results up to commit 7621656 ⚖️ Balanced


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


Action required
1. Peer suffix skips staleness ✓ Resolved 🐞 Bug ≡ Correctness
Description
catalogResolutionIsStale() returns false for any recorded importer ref containing '@', which also
matches normal peer-suffixed versions like 1.0.0([email protected]). As a result, catalog dependencies
that resolved with peer suffixes will never be considered stale, so affected projects can remain on
the old catalog-resolved version and still pass the up-to-date check.
Code

pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts[R40-42]

+  // version, and a non-registry resolution records a protocol. Neither compares to a version.
+  if (ref == null || ref.includes('@') || ref.includes(':')) return false
+  return dp.removeSuffix(ref) !== catalogVersion
Relevance

●●● Strong

Looks like a concrete correctness bug (peer-suffix '@' case) that can break staleness detection.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The new code treats any ref containing '@' as non-comparable, but importer refs commonly include '@'
inside peer suffixes. The repo’s own tests assert these peer-suffixed importer versions, and the
deps.path utilities are designed to strip such suffixes before comparing versions (as other lockfile
verification code already does).

pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts[38-42]
pnpm11/installing/deps-installer/test/install/peerDependencies.ts[1989-1992]
pnpm11/deps/path/test/index.ts[152-154]
pnpm11/lockfile/verification/src/satisfiesPackageManifest.ts[113-116]

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

## Issue description
`catalogResolutionIsStale()` currently bails out when `ref.includes('@')`, but peer-suffixed lockfile versions (e.g. `1.0.0([email protected])` or nested peer forms) also contain `@`. That prevents the new stale-catalog detection from ever triggering for catalog dependencies that resolved with peers.

## Issue Context
- Peer suffixes are a normal lockfile encoding and are explicitly intended to be removed via `dp.removeSuffix()`.
- The current guard runs *before* `removeSuffix()`, so the normalization never happens.

## Fix Focus Areas
- pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts[33-42]

## Proposed fix
1. Keep the early returns for `specifier == null`, non-catalog specifiers, and missing catalog snapshots.
2. Replace the `ref.includes('@') || ref.includes(':')` heuristic with a semver check on the normalized reference:
  - `const normalized = dp.removeSuffix(ref)`
  - If `semver.valid(normalized) == null`, return `false` (alias/non-registry/other non-semver resolutions remain ignored).
  - Otherwise compare `normalized !== catalogVersion`.

This preserves the intent (only compare bare versions) while correctly handling peer suffixes.

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



Remediation recommended
2. JSDoc describes old behavior ⊘ Outdated 📘 Rule violation ⚙ Maintainability
Description
The new JSDoc explains historical/previous behavior (projects "keep the version they had") rather
than the current contract, which can mislead readers after the fix.
Code

pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts[R9-12]

+ * A catalog entry resolves to one version for the whole workspace, but only the projects in
+ * an install that moves the entry follow it. The rest keep the version they had, and their
+ * entry's specifier matches by then, so nothing else reads them as out of date.
+ */
Relevance

●●● Strong

Updating misleading JSDoc to match current behavior is a low-risk maintainability fix.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The added comment uses historical phrasing about what projects did before this fix (“only the
projects in an install that moves the entry follow it… The rest keep the version they had”), which
violates the requirement to keep comments focused on current behavior.

Rule 772199: Comments must describe current behavior, not historical implementations
pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts[5-12]

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

## Issue description
A new JSDoc block documents past behavior and the previous failure mode instead of describing the current contract/guarantees of the function.

## Issue Context
Inline docs should describe current behavior and function contracts; historical explanations belong in PR descriptions, issues, or changelogs.

## Fix Focus Areas
- pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts[5-12]

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


3. Catalog staleness check TS-only 📘 Rule violation ⌂ Architecture
Description
The PR changes pnpm TypeScript up-to-date semantics by adding a catalog: resolution-staleness
gate, but there is no equivalent Pacquet Rust freshness check shown in this PR, risking divergent
user-visible install behavior between implementations.
Code

pnpm11/lockfile/verification/src/allProjectsAreUpToDate.ts[70]

+      catalogResolutionsAreUpToDate(importer, opts.wantedLockfile.catalogs) &&
Relevance

●● Moderate

Cross-implementation parity change is architectural; no close prior acceptance/rejection precedent
found.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The TypeScript implementation now treats projects as out-of-date when a catalog: dependency’s
recorded resolved version differs from the catalog entry’s resolved version. The Pacquet Rust
freshness code shown only validates catalog specifiers (not per-importer resolved versions), so
without a corresponding Rust change (or explicit divergence note) pnpm and pacquet can disagree on
whether an install is up-to-date.

Rule 713428: Keep pnpm TypeScript and pacquet Rust user-visible behavior changes in sync
pnpm11/lockfile/verification/src/allProjectsAreUpToDate.ts[67-71]
pnpm/crates/lockfile/src/freshness.rs[549-561]

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

## Issue description
This PR adds a new user-visible freshness rule in pnpm TypeScript (`catalogResolutionsAreUpToDate`) but the Pacquet Rust lockfile freshness logic does not appear to include an equivalent check, creating a pnpm/pacquet behavior divergence.

## Issue Context
Rule 713428 requires user-visible behavior changes to be implemented in both pnpm (TypeScript) and pacquet (Rust) in the same PR, or explicitly called out as a known divergence.

## Fix Focus Areas
- pnpm11/lockfile/verification/src/allProjectsAreUpToDate.ts[70-70]
- pnpm/crates/lockfile/src/freshness.rs[549-561]
- pnpm/crates/package-manager/src/install/lockfile_freshness.rs[129-195]

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


Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

No code suggestions found for the PR.

@github-actions

github-actions Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 84b4080eceac

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.822 ± 0.291 2.569 3.248 1.70 ± 0.23
pacquet@main 2.787 ± 0.161 2.600 3.006 1.68 ± 0.18
pnpr@HEAD 1.688 ± 0.136 1.483 1.911 1.02 ± 0.12
pnpr@main 1.662 ± 0.146 1.504 1.922 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.8221813981600006,
      "stddev": 0.2908483535521582,
      "median": 2.67174655136,
      "user": 2.7471560399999997,
      "system": 2.26415988,
      "min": 2.56887640536,
      "max": 3.2475251543600003,
      "times": [
        2.5819360163600003,
        2.64413642436,
        2.6988209423600003,
        2.6446721603600003,
        2.8054771903600004,
        3.2405092523600003,
        3.2475251543600003,
        3.2065766193600003,
        2.5832838163600003,
        2.56887640536
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.78713876666,
      "stddev": 0.1606504895330483,
      "median": 2.79496296336,
      "user": 2.67694204,
      "system": 2.21451678,
      "min": 2.5998475773600003,
      "max": 3.00561234636,
      "times": [
        2.95797743636,
        2.6365843153600004,
        3.00561234636,
        2.87640943336,
        2.6130541233600004,
        2.96136685136,
        2.84166462636,
        2.7482613003600003,
        2.5998475773600003,
        2.6306096563600003
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.6877792438600001,
      "stddev": 0.1355550601347754,
      "median": 1.70464736036,
      "user": 1.5949041399999997,
      "system": 1.65437828,
      "min": 1.48313039336,
      "max": 1.9113523183599999,
      "times": [
        1.48313039336,
        1.54277330036,
        1.68798404936,
        1.9113523183599999,
        1.62051505936,
        1.7665578073600001,
        1.76292734136,
        1.72131067136,
        1.8228430193599998,
        1.55839847836
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.66169110256,
      "stddev": 0.145706672959344,
      "median": 1.62838498536,
      "user": 1.6683149399999997,
      "system": 1.7330436799999998,
      "min": 1.50430036436,
      "max": 1.92206865436,
      "times": [
        1.50430036436,
        1.63966342136,
        1.8243714283599999,
        1.92206865436,
        1.51433338236,
        1.6902302353599998,
        1.80014390936,
        1.59682845436,
        1.50786462636,
        1.61710654936
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 387.8 ± 21.2 356.0 416.7 1.07 ± 0.07
pacquet@main 457.1 ± 45.1 368.6 507.0 1.26 ± 0.13
pnpr@HEAD 384.8 ± 44.7 333.9 484.3 1.06 ± 0.13
pnpr@main 363.1 ± 12.9 342.0 381.2 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.38781133672000007,
      "stddev": 0.021153205904267038,
      "median": 0.39263290342,
      "user": 0.34267924,
      "system": 0.7630198399999999,
      "min": 0.35602696342,
      "max": 0.41668042542,
      "times": [
        0.41668042542,
        0.41391707642,
        0.39307791942,
        0.39637032042,
        0.40388967942,
        0.39218788742,
        0.36492069142,
        0.37135881942,
        0.36968358442,
        0.35602696342
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.45711544761999995,
      "stddev": 0.045115905661175494,
      "median": 0.47320751542,
      "user": 0.39942024,
      "system": 0.8711039399999999,
      "min": 0.36861538742,
      "max": 0.50697165542,
      "times": [
        0.49046303842,
        0.46795314442,
        0.47846188642,
        0.41494142942,
        0.43804686242,
        0.36861538742,
        0.49457873742,
        0.50697165542,
        0.49274534442,
        0.41837699042
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.3848104862200001,
      "stddev": 0.04465874398716474,
      "median": 0.37445042892,
      "user": 0.34255983999999995,
      "system": 0.71895024,
      "min": 0.33392610542,
      "max": 0.48433478342,
      "times": [
        0.48433478342,
        0.37355748742,
        0.36093930542,
        0.42225669542,
        0.36236279842,
        0.41243644742,
        0.33392610542,
        0.38281327542,
        0.37534337042,
        0.34013459342
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.36310284832000006,
      "stddev": 0.012899295042540875,
      "median": 0.36339820242,
      "user": 0.30104804,
      "system": 0.6879334399999999,
      "min": 0.34199287242,
      "max": 0.38115940142,
      "times": [
        0.37515396542,
        0.34199287242,
        0.35128473842,
        0.36579038442,
        0.37812378141999997,
        0.35547221142,
        0.36865177742,
        0.35239333042,
        0.36100602042,
        0.38115940142
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.917 ± 0.050 2.853 3.018 1.75 ± 0.12
pacquet@main 2.985 ± 0.075 2.866 3.112 1.79 ± 0.13
pnpr@HEAD 1.669 ± 0.110 1.527 1.928 1.00
pnpr@main 1.883 ± 0.137 1.670 2.059 1.13 ± 0.11
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.9169280552000005,
      "stddev": 0.049674147832121256,
      "median": 2.8994685279000003,
      "user": 2.2311226999999993,
      "system": 1.94399014,
      "min": 2.8531213429,
      "max": 3.0177162149,
      "times": [
        2.9023168309000003,
        2.8941590349000004,
        2.8531213429,
        2.9409955349000003,
        2.9712806779000003,
        2.8956212799000003,
        2.8966202249000004,
        2.8656818459,
        2.9317675649000003,
        3.0177162149
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.9854464549,
      "stddev": 0.07469486338957576,
      "median": 2.9788341004000003,
      "user": 2.3151384,
      "system": 2.0274433400000005,
      "min": 2.8655140749,
      "max": 3.1115741399,
      "times": [
        2.8655140749,
        2.9380973749000003,
        2.9455396379,
        2.9361921279,
        2.9261684769,
        3.0595153249,
        3.0310926399,
        3.0286421889,
        3.0121285629,
        3.1115741399
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.6694690585999996,
      "stddev": 0.11031353251478564,
      "median": 1.6584049189,
      "user": 1.6875202999999999,
      "system": 1.8253927399999998,
      "min": 1.5271462419,
      "max": 1.9282592078999998,
      "times": [
        1.6178891879,
        1.6549782349,
        1.6940723369,
        1.7427717129,
        1.9282592078999998,
        1.6479166069,
        1.5559324809,
        1.5271462419,
        1.6618316029,
        1.6638929729
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.8827184425000003,
      "stddev": 0.1365071073495424,
      "median": 1.8840768379,
      "user": 1.7730361000000001,
      "system": 2.04548294,
      "min": 1.6702158458999998,
      "max": 2.0587415169,
      "times": [
        1.9640341979,
        1.9025507388999998,
        1.8656029369,
        2.0494674649,
        2.0587415169,
        1.7901915969,
        1.7675768459,
        2.0109723079,
        1.6702158458999998,
        1.7478309729
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 651.7 ± 60.7 572.0 785.4 1.53 ± 0.16
pacquet@main 649.9 ± 49.5 557.3 704.1 1.53 ± 0.14
pnpr@HEAD 425.3 ± 19.7 404.9 460.8 1.00
pnpr@main 432.1 ± 23.3 387.4 461.8 1.02 ± 0.07
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.6517304698,
      "stddev": 0.06067376076736138,
      "median": 0.6267278636,
      "user": 0.89982436,
      "system": 1.0896922199999999,
      "min": 0.5720052991,
      "max": 0.7854086481,
      "times": [
        0.5720052991,
        0.6213644541,
        0.7854086481,
        0.6815796311,
        0.6968915001,
        0.6799333001,
        0.6214440521,
        0.6320116751,
        0.6121114601000001,
        0.6145546781
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.6498623496,
      "stddev": 0.04950053471405869,
      "median": 0.6505825065999999,
      "user": 0.89681726,
      "system": 1.07650682,
      "min": 0.5572816221,
      "max": 0.7041289451,
      "times": [
        0.7041289451,
        0.6529482781,
        0.5572816221,
        0.5943068421,
        0.7034070591,
        0.6992944281,
        0.6390864911,
        0.6482167351,
        0.6816886511,
        0.6182644441
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.42526802380000006,
      "stddev": 0.019736009876084103,
      "median": 0.41917445510000007,
      "user": 0.29259256,
      "system": 0.7483643200000001,
      "min": 0.40494763810000006,
      "max": 0.46080784210000003,
      "times": [
        0.4111259481,
        0.41523429210000007,
        0.42311461810000006,
        0.42868752210000005,
        0.41430224210000005,
        0.45740603510000005,
        0.4301160151,
        0.40693808510000007,
        0.40494763810000006,
        0.46080784210000003
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.4321317972,
      "stddev": 0.023259610960335936,
      "median": 0.4368344191000001,
      "user": 0.30378236,
      "system": 0.76682282,
      "min": 0.3874466381000001,
      "max": 0.46182730610000006,
      "times": [
        0.4382504071000001,
        0.45006983010000007,
        0.46182730610000006,
        0.3874466381000001,
        0.4094955961,
        0.43541843110000006,
        0.41446045910000007,
        0.44798181910000007,
        0.45353524710000004,
        0.42283223810000004
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.148 ± 0.086 2.078 2.378 5.01 ± 0.36
pacquet@main 2.148 ± 0.063 2.065 2.264 5.01 ± 0.33
pnpr@HEAD 0.449 ± 0.025 0.410 0.492 1.05 ± 0.09
pnpr@main 0.429 ± 0.026 0.400 0.469 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.14812402168,
      "stddev": 0.08646596240951258,
      "median": 2.1287814893799997,
      "user": 1.18605786,
      "system": 1.2237244800000002,
      "min": 2.07766581438,
      "max": 2.37776456438,
      "times": [
        2.11118974938,
        2.07925661138,
        2.1120014233799997,
        2.37776456438,
        2.1463263523799996,
        2.1278617023799997,
        2.1357203283799997,
        2.1297012763799996,
        2.18375239438,
        2.07766581438
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.14832060128,
      "stddev": 0.06314969615796491,
      "median": 2.13959241388,
      "user": 1.18985546,
      "system": 1.2087447800000002,
      "min": 2.06469199538,
      "max": 2.2637339483799996,
      "times": [
        2.23712663138,
        2.1509848993799996,
        2.1481287763799997,
        2.11581746838,
        2.13105605138,
        2.2637339483799996,
        2.1142132073799997,
        2.06469199538,
        2.1756180813799997,
        2.08183495338
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.4485324253800001,
      "stddev": 0.02478271928726693,
      "median": 0.44924926688000005,
      "user": 0.34449776,
      "system": 0.7829196800000001,
      "min": 0.40984593838000005,
      "max": 0.49222894238000003,
      "times": [
        0.44128434738000005,
        0.42432531438000004,
        0.40984593838000005,
        0.43025132138000005,
        0.4514495833800001,
        0.44934407038000007,
        0.45598714338000007,
        0.49222894238000003,
        0.44915446338000004,
        0.48145312938000007
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.42914322008,
      "stddev": 0.02572886105600308,
      "median": 0.41680167838000004,
      "user": 0.32008876,
      "system": 0.76417528,
      "min": 0.40025783538000004,
      "max": 0.46882135138000003,
      "times": [
        0.45045138938000007,
        0.41876475438000005,
        0.40144881138000005,
        0.46087601338000006,
        0.45063280038000003,
        0.4141213663800001,
        0.46882135138000003,
        0.41483860238000003,
        0.40025783538000004,
        0.41121927638000005
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 276.2 ± 24.0 250.4 320.8 2.73 ± 0.24
pacquet@main 281.6 ± 23.3 245.4 328.8 2.78 ± 0.24
pnpr@HEAD 101.3 ± 2.0 98.2 107.2 1.00
pnpr@main 102.2 ± 3.6 96.8 112.3 1.01 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.2761874997163636,
      "stddev": 0.0239711549013968,
      "median": 0.26642445208000004,
      "user": 0.2433041381818182,
      "system": 0.09751057272727272,
      "min": 0.25044484808,
      "max": 0.32080460708,
      "times": [
        0.25728804808,
        0.25111529708,
        0.26642445208000004,
        0.26407723408,
        0.29424053008,
        0.29845782908,
        0.25297467808,
        0.29652528008,
        0.28570969308,
        0.25044484808,
        0.32080460708
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.28162871658000005,
      "stddev": 0.02327057889670784,
      "median": 0.27681553758,
      "user": 0.24185871999999997,
      "system": 0.10328730000000001,
      "min": 0.24540121808,
      "max": 0.32880975808,
      "times": [
        0.32880975808,
        0.27114642808,
        0.27402114508000003,
        0.28686620308,
        0.30336896908,
        0.27960993008,
        0.26417207308,
        0.26805736708,
        0.29483407408,
        0.24540121808
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.10125926004428575,
      "stddev": 0.002013680767459328,
      "median": 0.10065764008,
      "user": 0.026936927142857142,
      "system": 0.016685835714285713,
      "min": 0.09822686108,
      "max": 0.10721117008,
      "times": [
        0.10031780708,
        0.10402514808,
        0.10388934208,
        0.10407527208,
        0.10070901208000001,
        0.09875794908,
        0.10402804308000001,
        0.10053227908000001,
        0.09980642608,
        0.10014035408000001,
        0.10355084808000001,
        0.09879209208,
        0.10087031408000001,
        0.10106585108,
        0.10721117008,
        0.09884021308,
        0.10049234508,
        0.10057505008,
        0.10109472708,
        0.09989462308000001,
        0.10060626808,
        0.10181779308,
        0.09822686108,
        0.10030149608,
        0.10122220408,
        0.10207835308,
        0.10175726908,
        0.10058017008
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.10220347489481484,
      "stddev": 0.003605686508069803,
      "median": 0.10158333308,
      "user": 0.026665208888888885,
      "system": 0.01677933703703703,
      "min": 0.09679160608000001,
      "max": 0.11227185308,
      "times": [
        0.10531355708000001,
        0.10050132108,
        0.10533875408,
        0.09810012308,
        0.10158333308,
        0.10395022808,
        0.09922590708000001,
        0.09776033508,
        0.09955476508,
        0.09679160608000001,
        0.10471174708,
        0.10419286308,
        0.10134494608,
        0.09887550908,
        0.09821204408,
        0.10330506708000001,
        0.10707924408,
        0.09846299408,
        0.10419048908,
        0.10266681808,
        0.09836949908,
        0.10476568808,
        0.10384707408,
        0.11227185308,
        0.10124526808,
        0.10098529008,
        0.10684749808
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 693.6 ± 108.4 549.4 908.8 1.10 ± 0.21
pacquet@main 630.5 ± 72.3 531.5 751.5 1.00
pnpm@HEAD 4781.9 ± 525.6 4051.2 5702.4 7.58 ± 1.20
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.6936432878533334,
      "stddev": 0.10836201637620199,
      "median": 0.6632571595200001,
      "user": 0.6885727755555554,
      "system": 0.16431418666666664,
      "min": 0.54941421652,
      "max": 0.9088372355200001,
      "times": [
        0.6449299685200001,
        0.59661647352,
        0.54941421652,
        0.6842618085200001,
        0.6515945415200001,
        0.77120764052,
        0.77267054652,
        0.9088372355200001,
        0.6632571595200001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.6305010208533335,
      "stddev": 0.07225639747337273,
      "median": 0.6297553865200001,
      "user": 0.5971439977777777,
      "system": 0.15597518666666665,
      "min": 0.53150557052,
      "max": 0.75150546652,
      "times": [
        0.63166596352,
        0.71875778852,
        0.6297553865200001,
        0.5520289955200001,
        0.53150557052,
        0.66470734352,
        0.5979444485200001,
        0.59663822452,
        0.75150546652
      ]
    },
    {
      "command": "pnpm@HEAD",
      "mean": 4.781919650742222,
      "stddev": 0.5255761448829128,
      "median": 4.785140801520001,
      "user": 6.928581442222222,
      "system": 0.48261185333333334,
      "min": 4.05118788752,
      "max": 5.70237131952,
      "times": [
        4.52933972452,
        4.26213909352,
        4.800400332520001,
        4.05118788752,
        4.785140801520001,
        4.45967438952,
        5.2388857705200005,
        5.20813753752,
        5.70237131952
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.999 ± 0.227 4.720 5.417 1.35 ± 0.08
pacquet@main 4.763 ± 0.107 4.655 4.962 1.28 ± 0.06
pnpr@HEAD 3.714 ± 0.138 3.590 4.027 1.00 ± 0.05
pnpr@main 3.708 ± 0.139 3.603 4.003 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.99880827464,
      "stddev": 0.2269446458883976,
      "median": 4.986017262040001,
      "user": 3.19887708,
      "system": 2.43585534,
      "min": 4.72015301104,
      "max": 5.41669915704,
      "times": [
        5.41669915704,
        5.03167438804,
        5.16658545904,
        4.85664290704,
        4.73293911904,
        4.72015301104,
        5.11801584504,
        5.19417346804,
        4.940360136040001,
        4.81083925604
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.76334385224,
      "stddev": 0.1069332228385087,
      "median": 4.728518317540001,
      "user": 2.7097235799999995,
      "system": 2.1948166399999995,
      "min": 4.65545501504,
      "max": 4.96216654004,
      "times": [
        4.96216654004,
        4.90042083504,
        4.66454040204,
        4.850867963040001,
        4.68095281904,
        4.76475168004,
        4.65545501504,
        4.697246633040001,
        4.69733714104,
        4.75969949404
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.7136642657400003,
      "stddev": 0.1382782026367186,
      "median": 3.66036316904,
      "user": 1.77049828,
      "system": 1.8332527399999996,
      "min": 3.59001780204,
      "max": 4.02658682804,
      "times": [
        3.64044766204,
        3.7217121760400005,
        3.65652861404,
        3.6063692350400003,
        4.02658682804,
        3.5941384490400003,
        3.8140354500400004,
        3.59001780204,
        3.66419772404,
        3.8226087170400005
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.7078361091399996,
      "stddev": 0.1390084350572681,
      "median": 3.6592599975400004,
      "user": 1.7128148799999998,
      "system": 1.75822704,
      "min": 3.60320309004,
      "max": 4.00312189004,
      "times": [
        3.63268483404,
        3.60320309004,
        3.6095833190400004,
        3.67298745704,
        3.9200455450400002,
        3.68984878504,
        4.00312189004,
        3.69239070904,
        3.6455325380400003,
        3.60896292404
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13860
Testbedpacquet

🚨 2 Alerts

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
isolated-linker.fresh-install.hot-cache.hot-storeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
572.01 ms
(+26.30%)Baseline: 452.89 ms
543.46 ms
(105.25%)

isolated-linker.fresh-restore.hot-cache.hot-storeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
356.03 ms
(+21.97%)Baseline: 291.91 ms
350.29 ms
(101.64%)

Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,853.12 ms
(+4.03%)Baseline: 2,742.70 ms
3,291.24 ms
(86.69%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
2,077.67 ms
(+11.90%)Baseline: 1,856.75 ms
2,228.10 ms
(93.25%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
572.01 ms
(+26.30%)Baseline: 452.89 ms
543.46 ms
(105.25%)

isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
250.44 ms
(+12.15%)Baseline: 223.31 ms
267.97 ms
(93.46%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,568.88 ms
(+5.05%)Baseline: 2,445.48 ms
2,934.58 ms
(87.54%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,720.15 ms
(+4.77%)Baseline: 4,505.44 ms
5,406.53 ms
(87.30%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
356.03 ms
(+21.97%)Baseline: 291.91 ms
350.29 ms
(101.64%)

isolated-linker.peer-heavy-resolve.hot-cache.offline📈 view plot
🚷 view threshold
549.41 ms
(-8.55%)Baseline: 600.76 ms
720.91 ms
(76.21%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13860
Testbedpnpr

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

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

Click to view all benchmark results
BenchmarkLatencymilliseconds (ms)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,430.61 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
302.10 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
312.46 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
85.09 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,374.55 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,465.14 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
254.49 ms
🐰 View full continuous benchmarking report in Bencher

Copilot AI review requested due to automatic review settings August 13, 2026 15:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

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

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 84b4080

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

No code suggestions found for the PR.

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

Labels

product: pnpm@11 reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants