Skip to content

fix(deps-resolver): stop partial installs from rewriting unrelated lockfile entries - #13196

Merged
zkochan merged 3 commits into
mainfrom
fix-lockfile-churn
Jul 21, 2026
Merged

zkochan merged 3 commits into
mainfrom
fix-lockfile-churn

Conversation

@zkochan

@zkochan zkochan commented Jul 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes the unrelated lockfile churn seen in #13193: removing one dev dependency (concurrently) rewrote the whole jest cluster's @types/node: '*' deps from 22.20.1 to 26.1.1 and minted a new jest-config peer-suffix snapshot. Any partial install could drift open-range deps of unrelated, still-satisfied lockfile entries to their newest registry versions.

The churn is produced by pacquet (this repo's installs run the pinned pnpm@12 Rust CLI). Three gaps in pacquet's lockfile-resolution reuse compounded:

  1. catalog: deps always counted as changed. record_changed_direct_deps compared the catalog-resolved manifest range (^22.19.19) against the importer snapshot's literal catalog: specifier, so every catalog-managed dep of every importer was marked as a changed direct dep on every install, and the changed-direct-dep gate declined subtree reuse for every package depending on one. The comparison now consults the lockfile's catalogs: snapshot; a real catalog range bump still counts as changed (covered by a test).
  2. Auto-hoisted peers always counted as changed. Hoisted peers have no importer-snapshot entry to compare against, so they were recorded as "new" changed deps on every install. Recording now runs only for the importer's manifest wave.
  3. One fresh resolve cascaded to the whole subtree. ReuseSource::PriorOnly disabled reuse for every descendant of a freshly-resolved parent. Peer back-edge cycles (browserslist ↔ update-browserslist-db, eslint ↔ eslint-utils, jest-resolve ↔ jest-pnp-resolver) legitimately force fresh resolves via the conservative cycle guard, so *-ranged deps beneath them re-picked latest on every partial install. Children of a parent that landed back on its recorded version now re-enter the reuse gate with their prior refs — faithful to the TypeScript CLI's parentPkg.updated ? undefined : resolvedDependencies arm — and PriorOnly is removed.

With the fix, re-running the PR-13193 manifest change produces exactly the intended 29-line removal — zero unrelated lines (previously 51 insertions / 48 deletions of churn).

TypeScript CLI status: not affected, verified empirically with both the published 11.15.1 and a bundle built from this repo's pnpm11/ main — neither produces any drift on the same repro. TS avoids all three gaps by construction: catalogs resolve inside the resolver chain (specifiers compare raw-to-raw), auto-installed peers don't feed a changed-set, and its reuse predicate already keeps child refs alive under a non-updated parent. This PR ports that behavior to pacquet, so there is no TS-side code change — but since TS had no standalone regression test for "an unrelated removal leaves still-satisfied open-range entries untouched" (and none for the catalog: variant), the second commit adds mirroring tests to installing/deps-installer/test/install/update.ts and test/catalogs.ts so both stacks carry matching coverage.

Known follow-ups (out of scope): the repo's pnpm-lock.yaml on main still carries the historical drift (~64 @types/[email protected] refs) — it only converges via a deliberate full re-resolution; hoisted-peer subtrees still fresh-resolve every install (perf, not correctness); and TS omits ([email protected]) from @pnpm/worker-consumer peer suffixes where pacquet keeps it — a separate parity gap.

Squash Commit Body

Removing one dev dependency could flip other packages' open-range deps
(e.g. jest's `@types/node: '*'`) to their newest versions, as seen in
pnpm/pnpm#13193. Three lockfile-resolution-reuse gaps caused
still-satisfied lockfile entries to be re-resolved from the registry:

1. Direct deps using the `catalog:` protocol reach
   record_changed_direct_deps with the protocol already resolved to the
   catalog's range, while the importer snapshot records the literal
   `catalog:` form. Every catalog-managed dep therefore looked changed
   on every install, and the changed-direct-dep gate declined subtree
   reuse for every package depending on one. The comparison now
   consults the lockfile's `catalogs:` snapshot, so only a real catalog
   range change counts as a change.

2. Auto-installed (hoisted) peers were recorded as changed direct deps
   on every install: they have no importer-snapshot entry to compare
   against, so they always counted as "new". Recording now runs only
   for the importer's manifest wave, never for hoist-round installs.

3. A node that resolved freshly but landed on its previously recorded
   version still disabled reuse for its entire subtree
   (ReuseSource::PriorOnly). Peer back-edge cycles
   (browserslist <-> update-browserslist-db, eslint <-> eslint-utils,
   jest-resolve <-> jest-pnp-resolver) force such fresh resolves on
   every install, so open-ranged deps below them re-picked the
   registry's newest version on every partial install. Children of a
   parent that landed on its prior version now re-enter the reuse gate
   with their recorded refs, faithful to pnpm's
   `parentPkg.updated ? undefined : resolvedDependencies` arm, and the
   PriorOnly variant is removed.

The TypeScript CLI is unaffected: catalogs resolve inside its resolver
chain so specifiers compare raw-to-raw, and its reuse predicate already
keeps child refs alive under a non-updated parent. This change ports
that behavior to pacquet.

Checklist

  • The change is implemented in both the TypeScript CLI and the Rust
    pnpm/ port, or the description notes what still needs porting. (The bug is
    pacquet-only; the fix ports the TypeScript CLI's existing behavior, so there
    is no TS code change. Matching regression tests are added on both sides.)
  • 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-fable-5).


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Bug Fixes

    • Prevented pnpm install/updates from rewriting unrelated pnpm-lock.yaml entries after small manifest changes.
    • Improved dependency reuse so satisfied subtrees stay pinned, including catalog-managed direct dependencies.
    • Reduced unnecessary re-resolution churn, including scenarios with hoisted peer dependencies and conservative handling around dependency cycles.
  • Tests

    • Added regression coverage for unchanged vs bumped catalog: dependencies and for removing unrelated workspace dependencies without triggering re-resolution.

zkochan added 2 commits July 21, 2026 14:23
…ckfile entries

Removing one dev dependency could flip other packages' open-range deps
(e.g. jest's `@types/node: '*'`) to their newest versions, as seen in
#13193. Three lockfile-resolution-reuse gaps caused
still-satisfied lockfile entries to be re-resolved from the registry:

1. Direct deps using the `catalog:` protocol reach
   record_changed_direct_deps with the protocol already resolved to the
   catalog's range, while the importer snapshot records the literal
   `catalog:` form. Every catalog-managed dep therefore looked changed
   on every install, and the changed-direct-dep gate declined subtree
   reuse for every package depending on one. The comparison now
   consults the lockfile's `catalogs:` snapshot, so only a real catalog
   range change counts as a change.

2. Auto-installed (hoisted) peers were recorded as changed direct deps
   on every install: they have no importer-snapshot entry to compare
   against, so they always counted as "new". Recording now runs only
   for the importer's manifest wave, never for hoist-round installs.

3. A node that resolved freshly but landed on its previously recorded
   version still disabled reuse for its entire subtree
   (ReuseSource::PriorOnly). Peer back-edge cycles
   (browserslist <-> update-browserslist-db, eslint <-> eslint-utils,
   jest-resolve <-> jest-pnp-resolver) force such fresh resolves on
   every install, so open-ranged deps below them re-picked the
   registry's newest version on every partial install. Children of a
   parent that landed on its prior version now re-enter the reuse gate
   with their recorded refs, faithful to pnpm's
   `parentPkg.updated ? undefined : resolvedDependencies` arm, and the
   PriorOnly variant is removed.

The TypeScript CLI is unaffected: catalogs resolve inside its resolver
chain so specifiers compare raw-to-raw, and its reuse predicate already
keeps child refs alive under a non-updated parent. This change ports
that behavior to pacquet.
The TypeScript CLI already preserves still-satisfied lockfile entries
when an unrelated dependency is removed, but no test pinned that
behavior down as a standalone regression guard, and none covered it for
`catalog:` dependencies. Mirror the pacquet regression tests from the
sibling commit so both stacks carry matching coverage:

- install/update.ts: removing an unrelated dependency keeps an
  open-range subdep (`^100.0.0` with a newer version tagged latest) at
  its lockfile-pinned version.
- catalogs.ts: the same scenario with the dependent installed through
  the `catalog:` protocol, guarding both the catalog-resolved direct
  version and its subdep pin.
Copilot AI review requested due to automatic review settings July 21, 2026 12:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@coderabbitai

coderabbitai Bot commented Jul 21, 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: 9dc8fdba-31ed-4f52-8ade-d757bfbbc7c0

📥 Commits

Reviewing files that changed from the base of the PR and between 7d834de and b4670c8.

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

📝 Walkthrough

Walkthrough

The resolver now preserves reusable dependency subtrees, records direct dependency changes before tree expansion, and recognizes unchanged catalog specifications. Workspace and installer tests cover catalog updates, cycles, and unrelated dependency removal.

Changes

Lockfile reuse stabilization

Layer / File(s) Summary
Reuse-key propagation
pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs
Child prior references now use ReuseSource::Transitive, with updated reuse documentation and child-seeding logic.
Direct-dependency change tracking
pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs, pnpm/crates/resolving-deps-resolver/src/resolve_importer.rs
Changed direct dependencies are recorded during importer initialization, and matching catalog snapshot specifiers are treated as unchanged.
Reuse regression coverage
pnpm/crates/resolving-deps-resolver/src/resolve_workspace/tests.rs, pnpm11/installing/deps-installer/test/*, .changeset/no-unrelated-lockfile-churn.md
Tests cover catalog reuse, catalog range changes, cyclic resolution, and unrelated dependency removal without subtree re-resolution; a patch changeset documents the fix.

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

Sequence Diagram(s)

sequenceDiagram
  participant Importer
  participant Resolver
  participant Lockfile
  participant Tests
  Importer->>Resolver: Compute wanted direct dependencies
  Resolver->>Lockfile: Compare recorded catalog specifiers
  Lockfile-->>Resolver: Preserve or mark dependency changes
  Resolver->>Lockfile: Seed reusable child subtrees
  Tests->>Resolver: Verify catalog, cycle, and unrelated-change reuse
Loading

Possibly related issues

  • None identified.

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

Suggested reviewers: copilot

✨ 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-lockfile-churn

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix lockfile reuse to prevent unrelated churn on partial installs

🐞 Bug fix 🧪 Tests 🕐 40+ Minutes

Grey Divider

AI Description

• Preserve lockfile subtree reuse so unrelated open-range deps don’t drift on partial installs.
• Treat unchanged catalog: direct deps and auto-hoisted peers as non-changes for reuse gating.
• Add regression tests covering catalog stability, cycle-adjacent reuse, and lockfile-only installs.
Diagram

graph TD
  A["pnpm install"] --> B["deps resolver"] --> C["record changed deps"] --> D["reuse gate"] --> E[("pnpm-lock")]
  E --> F["catalogs snapshot"]
  B --> G["workspace tests"]
  A --> H["pnpm11 e2e tests"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Normalize specifiers at ingestion time
  • ➕ Avoids special-casing catalog: comparisons later in the pipeline
  • ➕ Keeps changed-dep detection a simple string equality check
  • ➖ Requires re-plumbing how specifiers are stored across importer snapshots/lockfile structures
  • ➖ Higher risk of subtle behavior changes for other protocols (workspace/link/file)
2. Hash-based subtree reuse eligibility
  • ➕ Makes reuse decisions based on stable structural identity (parent version + dep ref set)
  • ➕ Could reduce future protocol-specific edge cases
  • ➖ More complexity and overhead (hash computation, invalidation rules)
  • ➖ Harder to reason about in presence of peer cycles and hoisting behavior

Recommendation: The PR’s approach is the best near-term fix: it addresses the three concrete reuse gaps with minimal surface area—(1) compare catalog: deps against the lockfile’s catalogs snapshot, (2) stop treating auto-hoisted peers as changed direct deps by recording only on the manifest wave, and (3) allow children of a freshly-resolved-but-unmodified parent to re-enter reuse via prior refs (removing PriorOnly). The added targeted regression tests make this a safe, maintainable correction without broad refactors.

Files changed (6) +513 / -29

Bug fix (2) +61 / -29
resolve_dependency_tree.rsFix reuse gating for catalogs, hoisted peers, and fresh-but-unchanged parents +59/-28

Fix reuse gating for catalogs, hoisted peers, and fresh-but-unchanged parents

• Removes 'ReuseSource::PriorOnly' and allows child edges to reuse prior refs when a parent re-resolves onto the same lockfile version, preventing open-range drift. Moves 'record_changed_direct_deps' to run only for the importer manifest wave (including root) and enhances it to treat 'catalog:' deps as unchanged when the lockfile 'catalogs' snapshot resolves to the same underlying range.

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

resolve_importer.rsRecord changed direct deps before importer tree expansion +2/-1

Record changed direct deps before importer tree expansion

• Invokes 'record_changed_direct_deps' for importer initial wanted specs so reuse decisions are seeded from manifest inputs (not later hoist/peer rounds).

pnpm/crates/resolving-deps-resolver/src/resolve_importer.rs

Tests (3) +443 / -0
tests.rsAdd regression tests for catalog stability and cycle-adjacent subtree reuse +364/-0

Add regression tests for catalog stability and cycle-adjacent subtree reuse

• Introduces a lockfile graph builder helper and three tests: unchanged catalog deps must not invalidate dependent pins, real catalog range bumps must refresh pins, and fresh resolution due to cycles must still reuse stable child subtrees when versions match the lockfile.

pnpm/crates/resolving-deps-resolver/src/resolve_workspace/tests.rs

catalogs.tsAdd pnpm11 regression test for catalog deps not re-resolving on unrelated changes +49/-0

Add pnpm11 regression test for catalog deps not re-resolving on unrelated changes

• Adds an integration test ensuring that removing an unrelated dependency does not re-resolve a 'catalog:' dependency or its pinned subdependencies in lockfile-only installs.

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

update.tsAdd pnpm11 regression test for preserving still-satisfied subdeps on partial install +30/-0

Add pnpm11 regression test for preserving still-satisfied subdeps on partial install

• Adds an integration test reproducing the reported churn scenario: removing an unrelated dependency must not cause still-satisfied subdependencies (including open ranges) to be re-resolved to newer versions.

pnpm11/installing/deps-installer/test/install/update.ts

Documentation (1) +9 / -0
no-unrelated-lockfile-churn.mdAdd changeset describing lockfile churn fix +9/-0

Add changeset describing lockfile churn fix

• Adds a patch changeset for pacquet documenting the root cause and the three reuse gaps fixed (catalog comparisons, hoisted peers, and subtree reuse under fresh-but-unchanged parents).

.changeset/no-unrelated-lockfile-churn.md

@greptile-apps

greptile-apps Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Reviews (2): Last reviewed commit: "test(deps-resolver): assert every node o..." | Re-trigger Greptile

@github-actions

github-actions Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                          main                                   pr
-----                          ----                                   --
lockfile/parse_pnpm_lock       1.05     10.9±0.16ms    34.3 MB/sec    1.00     10.4±0.12ms    35.9 MB/sec
packument/parse                1.02     38.7±0.26µs  1712.0 MB/sec    1.00     38.1±0.59µs  1740.7 MB/sec
tarball/download_dependency    1.08      3.3±0.28ms  1317.7 KB/sec    1.00      3.0±0.25ms  1427.7 KB/sec

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

🧹 Nitpick comments (1)
pnpm/crates/resolving-deps-resolver/src/resolve_workspace/tests.rs (1)

1597-1688: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider asserting the cycle-side versions too.

The test only checks open's pinned version; asserting cyclic/loop also land on their expected (recorded) versions would make the regression coverage more complete for the "fresh-resolve-but-conservative-cycle" branch exercised here.

🤖 Prompt for 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.

In `@pnpm/crates/resolving-deps-resolver/src/resolve_workspace/tests.rs` around
lines 1597 - 1688, Extend
fresh_resolved_parent_on_recorded_version_reuses_child_subtrees to assert that
both cyclic and loop resolve to their recorded 1.0.0 versions, alongside the
existing open assertion. Use graph_versions_of on each cycle-side package
without changing the test setup or resolution flow.
🤖 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.

Nitpick comments:
In `@pnpm/crates/resolving-deps-resolver/src/resolve_workspace/tests.rs`:
- Around line 1597-1688: Extend
fresh_resolved_parent_on_recorded_version_reuses_child_subtrees to assert that
both cyclic and loop resolve to their recorded 1.0.0 versions, alongside the
existing open assertion. Use graph_versions_of on each cycle-side package
without changing the test setup or resolution flow.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 6f365949-504c-4c8b-a6b0-50cfc69629a5

📥 Commits

Reviewing files that changed from the base of the PR and between 2d05d96 and 7d834de.

📒 Files selected for processing (6)
  • .changeset/no-unrelated-lockfile-churn.md
  • pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs
  • pnpm/crates/resolving-deps-resolver/src/resolve_importer.rs
  • pnpm/crates/resolving-deps-resolver/src/resolve_workspace/tests.rs
  • pnpm11/installing/deps-installer/test/catalogs.ts
  • pnpm11/installing/deps-installer/test/install/update.ts

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

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

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Remediation recommended

1. Duplicate lockfile test builder 📘 Rule violation ⚙ Maintainability
Description
The newly added reuse_graph_lockfile() duplicates the lockfile/metadata construction logic already
present in this test module, increasing maintenance cost and risking inconsistencies as the lockfile
schema evolves. This violates the guideline to reuse or extract shared utilities instead of
duplicating non-trivial logic.
Code

pnpm/crates/resolving-deps-resolver/src/resolve_workspace/tests.rs[R1361-1426]

+    let metadata = || {
+        PackageMetadata {
+        resolution: LockfileResolution::Registry(RegistryResolution {
+            integrity: "sha512-gf6ZldcfCDyNXPRiW3lQjEP1Z9rrUM/4Cn7BZbv3SdTA82zxWRP8OmLwvGR974uuENhGCFgFdN11z3n1Ofpprg=="
+                .parse()
+                .expect("parse integrity"),
+        }),
+        version: None,
+        engines: None,
+        cpu: None,
+        os: None,
+        libc: None,
+        deprecated: None,
+        has_bin: None,
+        prepare: None,
+        bundled_dependencies: None,
+        peer_dependencies: None,
+        peer_dependencies_meta: None,
+    }
+    };
+    let mut packages = HashMap::new();
+    let mut snapshots = HashMap::new();
+    for (key, children) in graph {
+        let key = key.parse::<PkgNameVerPeer>().expect("parse graph key");
+        packages.insert(key.clone(), metadata());
+        let dependencies = (!children.is_empty()).then(|| {
+            children
+                .iter()
+                .map(|(alias, version)| {
+                    (
+                        PkgName::parse(*alias).expect("parse child alias"),
+                        SnapshotDepRef::Plain(
+                            version.parse::<PkgVerPeer>().expect("parse child version"),
+                        ),
+                    )
+                })
+                .collect()
+        });
+        snapshots.insert(key, SnapshotEntry { dependencies, ..SnapshotEntry::default() });
+    }
+    let catalog_snapshots = (!catalogs.is_empty()).then(|| {
+        let mut snapshot: pacquet_lockfile::CatalogSnapshots = BTreeMap::new();
+        for (catalog, alias, specifier, version) in catalogs {
+            snapshot.entry((*catalog).to_string()).or_default().insert(
+                (*alias).to_string(),
+                ResolvedCatalogEntry {
+                    specifier: (*specifier).to_string(),
+                    version: (*version).to_string(),
+                },
+            );
+        }
+        snapshot
+    });
+    Lockfile {
+        lockfile_version: LockfileVersion::<9>::try_from(ComVer::new(9, 0)).expect("lockfile v9"),
+        settings: None,
+        catalogs: catalog_snapshots,
+        overrides: None,
+        package_extensions_checksum: None,
+        pnpmfile_checksum: None,
+        ignored_optional_dependencies: None,
+        patched_dependencies: None,
+        importers,
+        packages: Some(packages),
+        snapshots: Some(snapshots),
+    }
Evidence
PR Compliance ID 4 requires reusing or extracting shared utilities instead of duplicating
non-trivial logic. The new reuse_graph_lockfile() repeats the same PackageMetadata registry
fixture construction pattern already implemented in importer_scoped_update_lockfile() within the
same file.

CLAUDE.md: Avoid Duplicating Logic: Reuse or Extract Shared Utilities and Prefer Existing Libraries
pnpm/crates/resolving-deps-resolver/src/resolve_workspace/tests.rs[1326-1427]
pnpm/crates/resolving-deps-resolver/src/resolve_workspace/tests.rs[217-301]

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

## Issue description
`reuse_graph_lockfile()` reimplements lockfile/metadata construction that already exists in this test file (and similar patterns exist in other test modules). This duplication increases the chance of future divergence and makes updates to lockfile test fixtures more error-prone.

## Issue Context
Both `importer_scoped_update_lockfile()` and `reuse_graph_lockfile()` build `pacquet_lockfile::Lockfile` instances and repeat the same `PackageMetadata`/registry `integrity` boilerplate.

## Fix Focus Areas
- pnpm/crates/resolving-deps-resolver/src/resolve_workspace/tests.rs[217-301]
- pnpm/crates/resolving-deps-resolver/src/resolve_workspace/tests.rs[1326-1427]

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


2. Patch-hash skipped in reuse 🐞 Bug ☼ Reliability
Description
walk_node_children now re-enables subtree reuse for children when a freshly-resolved parent
“landed on” its prior entry, but landed_on_prior_entry compares IDs after stripping
(patch_hash=…). If a dependency’s patch hash changes, the parent can be treated as non-updated and
its prior child refs reused, potentially keeping a stale dependency subtree relative to the patched
package identity.
Code

pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs[R1777-1779]

        let prior_children_snapshot = prior_key
            .as_ref()
            .filter(|key| landed_on_prior_entry(key, &id))
Evidence
The new subtree-reuse path keeps prior child refs alive when landed_on_prior_entry() returns true,
and now those child refs are eligible for actual reuse via ReuseSource::Transitive. But
landed_on_prior_entry() compares strings after remove_suffix(), which explicitly strips
(patch_hash=…), even though build_pkg_id_with_patch_hash() includes that suffix in the resolved
id, and PkgIdWithPatchHash is modeled as a patch-aware identity type.

pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs[1767-1833]
pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs[1936-1941]
pnpm/crates/deps-path/src/suffix_index.rs[45-56]
pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs[2941-2963]
pnpm/crates/lockfile/src/pkg_id_with_patch_hash.rs[4-15]

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

### Issue description
`landed_on_prior_entry()` currently uses `pacquet_deps_path::remove_suffix()` and `prior_key.without_peer()` which both discard `(patch_hash=…)`. After this PR, that check gates whether child edges re-enter the reuse path (`ReuseSource::Transitive`), so stripping patch hash can incorrectly treat a patched package with a new patch hash as “not updated”, and reuse stale child snapshot refs.

### Issue Context
- `build_pkg_id_with_patch_hash()` explicitly appends `(patch_hash=…)` to the resolved `pkgIdWithPatchHash`.
- `pacquet_deps_path::remove_suffix()` explicitly removes `(patch_hash=…)`.
- The new behavior relies on `landed_on_prior_entry()` to decide if prior child refs should stay alive.

### Fix approach
- Update `landed_on_prior_entry()` to compare the **pkgId including patch hash** (but still excluding peer suffix if applicable).
 - For the resolved id: use `pacquet_deps_path::get_pkg_id_with_patch_hash(resolved_pkg_id)`.
 - For the prior lockfile key: derive a comparable string that preserves `(patch_hash=…)` but strips peer suffix (e.g. `pacquet_deps_path::get_pkg_id_with_patch_hash(&prior_key.to_string())`).
- Add a regression test: prior lockfile has `[email protected](patch_hash=old)`; current run resolves `[email protected](patch_hash=new)` and ensure the code treats the parent as updated (does not reuse prior child refs).

### Fix Focus Areas
- pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs[1767-1833]
- pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs[1936-1941]
- pnpm/crates/deps-path/src/suffix_index.rs[45-68]
- pnpm/crates/resolving-deps-resolver/src/resolve_workspace/tests.rs[1326-1690]

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


Grey Divider

Previous review results

Review updated until commit b4670c8 ⚖️ Balanced

Results up to commit 7d834de ⚖️ Balanced


No changes from previous review

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.

@codecov-commenter

codecov-commenter commented Jul 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.68%. Comparing base (5e6dd35) to head (b4670c8).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13196   +/-   ##
=======================================
  Coverage   86.68%   86.68%           
=======================================
  Files         522      523    +1     
  Lines       87872    87948   +76     
=======================================
+ Hits        76168    76235   +67     
- Misses      11704    11713    +9     

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

Extends the cycle-next-to-reusable-subtree test to pin the cycle-side
and parent versions too, per review feedback on the PR.
Copilot AI review requested due to automatic review settings July 21, 2026 12:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@zkochan

zkochan commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

Addressed CodeRabbit's nitpick in b4670c8b2c33bd137fd7f16d95232e30bfb2e6be: the cycle-adjacent reuse test now asserts every node of the graph (app, cyclic, loop, stable, open) lands on its recorded 1.0.0, not just the open pin.


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

@qodo-code-review

Copy link
Copy Markdown

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

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

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: b4670c8b2cd2

Each scenario reports direct installs and pnpr installs. 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.622 ± 0.182 2.412 2.867 1.67 ± 0.22
pacquet@main 2.619 ± 0.190 2.399 2.923 1.67 ± 0.22
pnpr@HEAD 1.568 ± 0.176 1.386 1.920 1.00
pnpr@main 1.588 ± 0.164 1.381 1.837 1.01 ± 0.15
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.6217766612400006,
      "stddev": 0.18207780504352597,
      "median": 2.5468582485400004,
      "user": 1.9224311599999997,
      "system": 1.5312628,
      "min": 2.4120013995400003,
      "max": 2.8671465625400003,
      "times": [
        2.49178042554,
        2.47875001454,
        2.4120013995400003,
        2.8671465625400003,
        2.4962547185400004,
        2.4458114615400004,
        2.82285257454,
        2.59746177854,
        2.7611218505400004,
        2.8445858265400004
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.61931208874,
      "stddev": 0.1903818229902626,
      "median": 2.57571454204,
      "user": 1.94257116,
      "system": 1.6246014,
      "min": 2.3994549315400002,
      "max": 2.92272301154,
      "times": [
        2.3994549315400002,
        2.8961701515400002,
        2.5131803075400003,
        2.63493382554,
        2.61094100054,
        2.7859301965400003,
        2.4806677985400003,
        2.92272301154,
        2.4086315805400003,
        2.54048808354
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5677624176399998,
      "stddev": 0.17561066681342133,
      "median": 1.53349229204,
      "user": 1.3437705599999998,
      "system": 1.3538524999999997,
      "min": 1.38565359954,
      "max": 1.9201910385399998,
      "times": [
        1.4142512515399999,
        1.5012969975400001,
        1.58667609154,
        1.56568758654,
        1.5966114165399998,
        1.4470317635399998,
        1.38565359954,
        1.44483689354,
        1.8153875375400002,
        1.9201910385399998
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.58781837234,
      "stddev": 0.16439490454394748,
      "median": 1.59596219454,
      "user": 1.3274252599999998,
      "system": 1.3947510999999995,
      "min": 1.3806018975399998,
      "max": 1.8366395205400001,
      "times": [
        1.8366395205400001,
        1.48340510754,
        1.79239163754,
        1.72325922254,
        1.6264432125400001,
        1.64614762954,
        1.3806018975399998,
        1.41109613654,
        1.5654811765399999,
        1.41271818254
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 289.1 ± 14.5 260.4 307.7 1.00
pacquet@main 307.1 ± 24.6 265.0 360.4 1.06 ± 0.10
pnpr@HEAD 338.2 ± 31.8 305.7 391.0 1.17 ± 0.12
pnpr@main 338.2 ± 18.8 302.4 366.6 1.17 ± 0.09
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.28911720788000006,
      "stddev": 0.014506470694555518,
      "median": 0.28816989868,
      "user": 0.24485194,
      "system": 0.57384272,
      "min": 0.26038010768000003,
      "max": 0.30769167768,
      "times": [
        0.30769167768,
        0.30312199968000003,
        0.28020138668,
        0.28787353568,
        0.26038010768000003,
        0.28478819668,
        0.28846626168,
        0.27689413968,
        0.30025952168000003,
        0.30149525168
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.30706212188,
      "stddev": 0.024578140748716965,
      "median": 0.30355783218,
      "user": 0.25462964,
      "system": 0.60208802,
      "min": 0.26500827568,
      "max": 0.36042608468000004,
      "times": [
        0.32273576868000003,
        0.29502227668000003,
        0.29799685568,
        0.26500827568,
        0.30584488468,
        0.30127077968,
        0.31626721968,
        0.36042608468000004,
        0.29314103868,
        0.31290803468
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.33824129138000003,
      "stddev": 0.03180237973012418,
      "median": 0.32614673018,
      "user": 0.28774004,
      "system": 0.64213352,
      "min": 0.30570950968,
      "max": 0.39099372968,
      "times": [
        0.38761867468,
        0.30570950968,
        0.31053691368,
        0.32897551368,
        0.32331794668,
        0.31196886368,
        0.39099372968,
        0.35048918568000004,
        0.31518639168,
        0.35761618468
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.33818417738,
      "stddev": 0.018815491661458968,
      "median": 0.34251105468,
      "user": 0.2895504400000001,
      "system": 0.62182792,
      "min": 0.30240998668,
      "max": 0.36662242968000003,
      "times": [
        0.36662242968000003,
        0.35847993368000003,
        0.34527671568,
        0.34274662368000003,
        0.34227548568,
        0.34406461968,
        0.32657684168,
        0.30240998668,
        0.31762348768000004,
        0.33576564968
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.991 ± 0.039 2.942 3.058 1.80 ± 0.20
pacquet@main 2.918 ± 0.072 2.806 3.055 1.76 ± 0.20
pnpr@HEAD 1.687 ± 0.153 1.440 1.872 1.02 ± 0.14
pnpr@main 1.661 ± 0.181 1.448 1.897 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.9911373443800002,
      "stddev": 0.03885711565249335,
      "median": 2.98464005548,
      "user": 2.27921232,
      "system": 1.6631873799999997,
      "min": 2.94220974298,
      "max": 3.0580863039799997,
      "times": [
        3.0580863039799997,
        3.00145802498,
        3.02136274098,
        3.03662636398,
        2.95527388998,
        2.96779288898,
        3.00291920598,
        2.96782208598,
        2.94220974298,
        2.95782219598
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.9183421045799998,
      "stddev": 0.07217446963039852,
      "median": 2.92063998298,
      "user": 2.07786542,
      "system": 1.5248366799999997,
      "min": 2.80640894598,
      "max": 3.05452051998,
      "times": [
        2.92241768698,
        2.92705967298,
        2.91886227898,
        2.96114133898,
        2.88215819198,
        2.98540390198,
        3.05452051998,
        2.80640894598,
        2.83197615198,
        2.89347235598
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.68658881868,
      "stddev": 0.15301459733446557,
      "median": 1.7115563339800002,
      "user": 1.1289029200000003,
      "system": 1.24435328,
      "min": 1.4400510339800001,
      "max": 1.8718073019800001,
      "times": [
        1.7550938969800003,
        1.45738055798,
        1.4400510339800001,
        1.66801877098,
        1.8012852989800001,
        1.6097814519800002,
        1.8718073019800001,
        1.8656955429800002,
        1.64073327098,
        1.75604105998
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.66070557928,
      "stddev": 0.181331916802165,
      "median": 1.6496976979800002,
      "user": 1.0985333200000003,
      "system": 1.20960418,
      "min": 1.4478775359800002,
      "max": 1.8974441449800001,
      "times": [
        1.84582785598,
        1.74143503998,
        1.4528262329800001,
        1.55352661898,
        1.5579603559800002,
        1.4478775359800002,
        1.7539307519800003,
        1.4790555929800002,
        1.8771716629800002,
        1.8974441449800001
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 610.6 ± 20.5 580.9 652.6 1.98 ± 0.08
pacquet@main 639.3 ± 35.5 579.9 700.2 2.07 ± 0.13
pnpr@HEAD 313.2 ± 12.9 290.0 335.8 1.02 ± 0.05
pnpr@main 308.5 ± 7.7 297.1 320.6 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.61056615362,
      "stddev": 0.02051216279930001,
      "median": 0.60806572652,
      "user": 0.76318086,
      "system": 0.67875028,
      "min": 0.58089859952,
      "max": 0.65258685852,
      "times": [
        0.60453661352,
        0.59745819252,
        0.60697017152,
        0.59076993552,
        0.6317022775200001,
        0.61228315552,
        0.58089859952,
        0.60916128152,
        0.61929445052,
        0.65258685852
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.6393495541199999,
      "stddev": 0.03552585565401909,
      "median": 0.64538138852,
      "user": 0.7734044599999998,
      "system": 0.7204910800000001,
      "min": 0.57988058752,
      "max": 0.7001830075200001,
      "times": [
        0.64375694052,
        0.58750143452,
        0.57988058752,
        0.62083155152,
        0.66136480852,
        0.65947562252,
        0.7001830075200001,
        0.6448769185200001,
        0.64973881152,
        0.64588585852
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.31319565652000003,
      "stddev": 0.012889915982305116,
      "median": 0.31298917952000005,
      "user": 0.21682165999999997,
      "system": 0.54430888,
      "min": 0.29003494652,
      "max": 0.33580469252,
      "times": [
        0.31588325852,
        0.30376798952,
        0.32742159052,
        0.31990562052,
        0.30946326252,
        0.30369684552000004,
        0.31307297752,
        0.29003494652,
        0.33580469252,
        0.31290538152
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.30852784361999996,
      "stddev": 0.007718513434629981,
      "median": 0.31095247052,
      "user": 0.19991776,
      "system": 0.54593498,
      "min": 0.29714482152,
      "max": 0.32055145652,
      "times": [
        0.31467547452,
        0.31203441252,
        0.32055145652,
        0.29790488152,
        0.30438496052,
        0.30987052852,
        0.30241180652,
        0.31315873852000004,
        0.29714482152,
        0.31314135552
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.920 ± 0.016 1.889 1.953 6.37 ± 0.18
pacquet@main 1.916 ± 0.023 1.884 1.949 6.36 ± 0.18
pnpr@HEAD 0.304 ± 0.013 0.286 0.330 1.01 ± 0.05
pnpr@main 0.301 ± 0.008 0.290 0.313 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.91965869184,
      "stddev": 0.016067332390588183,
      "median": 1.92014312304,
      "user": 0.95756214,
      "system": 0.7510335199999998,
      "min": 1.88885234054,
      "max": 1.9533174015399999,
      "times": [
        1.9533174015399999,
        1.88885234054,
        1.92016107154,
        1.92619353854,
        1.90973550454,
        1.91359818654,
        1.92122462354,
        1.92012517454,
        1.91657006054,
        1.92680901654
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.9160548024400001,
      "stddev": 0.023339291691916727,
      "median": 1.9179145070399999,
      "user": 0.99121034,
      "system": 0.7281534199999998,
      "min": 1.8836886415399998,
      "max": 1.94918357154,
      "times": [
        1.9213472755399998,
        1.8836886415399998,
        1.93895176154,
        1.89349664354,
        1.91448173854,
        1.88857095354,
        1.92742556254,
        1.94918357154,
        1.94100610854,
        1.90239576754
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.30433289154,
      "stddev": 0.013224350201661643,
      "median": 0.30188505854000003,
      "user": 0.20086573999999996,
      "system": 0.5306711199999999,
      "min": 0.28613181354,
      "max": 0.32990249954,
      "times": [
        0.32990249954,
        0.30007558254,
        0.29803428054,
        0.29131923954,
        0.31065226254,
        0.30369453454,
        0.28613181354,
        0.29444490254,
        0.31730788154,
        0.31176591854
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.30127562954,
      "stddev": 0.007890111098577167,
      "median": 0.30104756254,
      "user": 0.18767753999999998,
      "system": 0.53112872,
      "min": 0.28965732154,
      "max": 0.31304591853999997,
      "times": [
        0.28981273354,
        0.28965732154,
        0.30152394954,
        0.29793840854,
        0.31304591853999997,
        0.30057117554,
        0.29801276954,
        0.31103962154,
        0.30499489254,
        0.30615950454
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 411.2 ± 16.8 383.6 434.9 4.60 ± 0.24
pacquet@main 373.2 ± 15.2 358.7 404.6 4.18 ± 0.22
pnpr@HEAD 90.8 ± 2.7 85.5 96.8 1.02 ± 0.04
pnpr@main 89.3 ± 2.8 85.9 97.5 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.41122005364000014,
      "stddev": 0.016750407761222382,
      "median": 0.41617742314000006,
      "user": 0.39104281999999996,
      "system": 0.07559626,
      "min": 0.38361199114,
      "max": 0.43492688814,
      "times": [
        0.42161011014,
        0.39760320914,
        0.41776717614000003,
        0.42640964514,
        0.43492688814,
        0.39905675514,
        0.39318371014000003,
        0.38361199114,
        0.42344338114,
        0.41458767014000003
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.37315050844000003,
      "stddev": 0.015242747700968177,
      "median": 0.36855408064000006,
      "user": 0.36481292,
      "system": 0.059276459999999996,
      "min": 0.35869454614,
      "max": 0.40459007114,
      "times": [
        0.37625048414,
        0.36908138814,
        0.36618963514,
        0.36021236314,
        0.36802677314000004,
        0.36120776714,
        0.35869454614,
        0.37215259014,
        0.40459007114,
        0.39509946614
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.09075004372064517,
      "stddev": 0.002708908017344329,
      "median": 0.09136327314,
      "user": 0.022112139354838706,
      "system": 0.010769479999999996,
      "min": 0.08546982914000001,
      "max": 0.09682767014000002,
      "times": [
        0.09136327314,
        0.09172249014000002,
        0.09180776014000001,
        0.09125559114000001,
        0.09601324714000001,
        0.09410171914000001,
        0.08939183314000002,
        0.08546982914000001,
        0.08710063014000001,
        0.08770779314000002,
        0.08555347714000001,
        0.08759952914000001,
        0.09243329814000001,
        0.09160810514,
        0.09190129714,
        0.08971320814000001,
        0.09337901814,
        0.09279018014000001,
        0.08822148014000002,
        0.08796868314000002,
        0.09161001814000001,
        0.09175528114,
        0.09169824414000001,
        0.09126770414000002,
        0.09262097114000001,
        0.09682767014000002,
        0.09094732114000001,
        0.08967301214000001,
        0.09197192014000001,
        0.09049052114000002,
        0.08728624914000001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.08930877401500001,
      "stddev": 0.0028364657240389935,
      "median": 0.08832386564,
      "user": 0.021690657500000002,
      "system": 0.010730039375000004,
      "min": 0.08592140014,
      "max": 0.09754914314000002,
      "times": [
        0.08799937214,
        0.08638761714000001,
        0.08706936014000001,
        0.08592140014,
        0.08623994014000001,
        0.08831483514,
        0.09074006114000001,
        0.08695145914,
        0.08722898114000001,
        0.09000677014000001,
        0.09189797114,
        0.08676002914000001,
        0.08704697914000001,
        0.08787071914000001,
        0.09258464314,
        0.09029954114000001,
        0.08944337014,
        0.08717239514000001,
        0.08742781614000002,
        0.09438578814000001,
        0.08978906714000001,
        0.09754914314000002,
        0.08869316414000002,
        0.08614848414000001,
        0.08699390514000001,
        0.09200387614000001,
        0.09267055114000002,
        0.09346317314000001,
        0.08833289614,
        0.09268784214000002,
        0.08975692714000001,
        0.08804269014
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.475 ± 0.065 4.416 4.599 1.27 ± 0.03
pacquet@main 4.581 ± 0.150 4.422 4.839 1.31 ± 0.05
pnpr@HEAD 3.510 ± 0.060 3.448 3.643 1.00
pnpr@main 3.624 ± 0.104 3.500 3.827 1.03 ± 0.03
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.475063971179999,
      "stddev": 0.06464412623516207,
      "median": 4.4407731646799995,
      "user": 1.77762332,
      "system": 1.3739571800000001,
      "min": 4.4156629256799995,
      "max": 4.59926851168,
      "times": [
        4.59926851168,
        4.4229426176799995,
        4.4156629256799995,
        4.517899562679999,
        4.42779843668,
        4.4495989826799995,
        4.49424644168,
        4.5594612226799995,
        4.4319473466799995,
        4.43181366368
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.58101768748,
      "stddev": 0.15036142937527638,
      "median": 4.57493035868,
      "user": 1.75788802,
      "system": 1.40975648,
      "min": 4.42223725868,
      "max": 4.83859995368,
      "times": [
        4.61102323968,
        4.43661961968,
        4.83859995368,
        4.4364190706799995,
        4.62616410768,
        4.77118022368,
        4.44468214468,
        4.68441377868,
        4.53883747768,
        4.42223725868
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.51020410948,
      "stddev": 0.0596477399993171,
      "median": 3.49667539118,
      "user": 1.2965742199999997,
      "system": 1.27742288,
      "min": 3.44750998768,
      "max": 3.6433261166800004,
      "times": [
        3.54625333368,
        3.53988650568,
        3.4527029326800003,
        3.46105184668,
        3.44750998768,
        3.4801458546800004,
        3.51140444868,
        3.4819463336800003,
        3.6433261166800004,
        3.5378137346800003
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.6240627288800007,
      "stddev": 0.10359414350731812,
      "median": 3.6285699421800004,
      "user": 1.31272982,
      "system": 1.3406426799999998,
      "min": 3.4999045836800002,
      "max": 3.8271416356800003,
      "times": [
        3.63310910668,
        3.67699262168,
        3.4999045836800002,
        3.72832148168,
        3.63196263268,
        3.5175857656800003,
        3.8271416356800003,
        3.50623604368,
        3.59419616568,
        3.6251772516800003
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13196
Testbedpacquet
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,942.21 ms
(+8.59%)Baseline: 2,709.44 ms
3,251.32 ms
(90.49%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,888.85 ms
(+1.16%)Baseline: 1,867.25 ms
2,240.70 ms
(84.30%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
580.90 ms
(+3.41%)Baseline: 561.72 ms
674.07 ms
(86.18%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
383.61 ms
(+13.17%)Baseline: 338.95 ms
406.75 ms
(94.31%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,412.00 ms
(+1.82%)Baseline: 2,368.89 ms
2,842.67 ms
(84.85%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,415.66 ms
(-0.54%)Baseline: 4,439.48 ms
5,327.38 ms
(82.89%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
260.38 ms
(+4.44%)Baseline: 249.32 ms
299.18 ms
(87.03%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13196
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,440.05 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
286.13 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
290.03 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
85.47 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,385.65 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,447.51 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
305.71 ms
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit 23978d2 into main Jul 21, 2026
36 of 37 checks passed
@zkochan
zkochan deleted the fix-lockfile-churn branch July 21, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants