Skip to content

refactor(package-manager): break the module cycle between install and the repeat-install fast path - #17686

Merged
zkochan merged 2 commits into
mainfrom
repeat-install-one-contract
Nov 4, 2026
Merged

zkochan merged 2 commits into
mainfrom
repeat-install-one-contract

Conversation

@zkochan

@zkochan zkochan commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Summary

This is step 1 of pnpm/tasks#254. It breaks the module cycle between install and optimistic_repeat_install, the repeat-install fast path. The fast path now sits above the install, and the install never names it. The crate's largest module cycle drops from 12 modules to 6, the fast_update_* group, and the module_cycles baseline is lowered to match.

There are no behavior changes. Nothing changes for users, so there is no changeset.

How each dependency of install on the fast path was removed:

Dependency Resolution
The recorded settings, validation, timestamps and local file dependencies, plus the check's inputs and outcome (OptimisticRepeatInstallCheck, Scope, Decision, DeclaredManifests) Moved into a new install_state module, which both sides depend on
The standalone up-to-date check and the verify-deps gate, which lived in install::workspace_state (discovery, per_project, stand_ins, from_files, nothing_to_install) Moved to optimistic_repeat_install::up_to_date
install::run calling check_optimistic_repeat_install_in InstallRunOptions carries the check as a RepeatInstallCheck function pointer. The Install::run* entry points, moved to install_entry, supply it

The public API of pnpm-package-manager keeps its paths, because the crate root re-exports both modules.

One side cleanup was needed to stay within the 8-field lint: lockfile_check joins InstallSaveOptions. That turns save.lockfile && lockfile_check.is_none(), which was repeated three times, into writes_lockfile().

The remaining steps of pnpm/tasks#254 are not covered here: a contract for every non-Config input, generated oracle edit axes, and the same work for v11.

Squash Commit Body

The install and its repeat-install fast path depended on each other: the
install recorded its state through the fast path's settings, validation
and timestamps, and ran the fast-path check itself, while the fast path
read the install's recorded state and lockfile freshness checks.

- A new install_state module holds what both sides need: the recorded
  settings, the validation records, the timestamps, local file
  dependencies, and the inputs and outcome of the repeat-install check.
- The standalone up-to-date check and the verify-deps gate move from
  install::workspace_state into optimistic_repeat_install::up_to_date.
- install no longer names the fast path. InstallRunOptions carries the
  check as a RepeatInstallCheck function pointer, which the Install::run*
  entry points, now in install_entry, supply.
- InstallSaveOptions takes lockfile_check, so the condition repeated in
  three places becomes writes_lockfile().

The fast path now sits above install. The crate's largest module cycle
drops from 12 modules to the 6 fast_update_* modules, and the
module_cycles baseline is lowered to match. No behavior changes.

Part of pnpm/tasks#254.

Checklist

  • I checked the referenced issue and verified that none of the PRs already linked to it solves it.
  • New features are implemented only in the Rust pnpm v12 CLI. Bug fixes are implemented in every affected version.

Verification:

  • pnpm test:rust -p pnpm-package-manager -p pnpm-cli: 7553 tests passed.
  • pre-push-rust.sh passed (fmt, clippy, doc, dylint).
  • just crate-layers check passed.

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

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • New Features
    • Deployment manifests now mark dependencies using the workspace: protocol as injected and convert dependencies using link: to file: references across regular, development, and optional dependencies. Manifests without these dependency protocols remain unchanged. These adjustments keep local workspace and linked-package references explicit in the generated deployment manifest.

… the repeat-install fast path

The install and its repeat-install fast path depended on each other: the
install recorded its state through the fast path's settings, validation
and timestamps, and ran the fast-path check itself, while the fast path
read the install's recorded state and lockfile freshness checks.

- A new install_state module holds what both sides need: the recorded
  settings, the validation records, the timestamps, local file
  dependencies, and the inputs and outcome of the repeat-install check.
- The standalone up-to-date check and the verify-deps gate move from
  install::workspace_state into optimistic_repeat_install::up_to_date.
- install no longer names the fast path. InstallRunOptions carries the
  check as a RepeatInstallCheck function pointer, which the Install::run*
  entry points, now in install_entry, supply.
- InstallSaveOptions takes lockfile_check, so the condition repeated in
  three places becomes writes_lockfile().

The fast path now sits above install. The crate's largest module cycle
drops from 12 modules to the 6 fast_update_* modules, and the
module_cycles baseline is lowered to match. No behavior changes.

Part of pnpm/tasks#254.

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

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The package manager adds a shared install_state module and moves repeat-install state helpers into it. Install options and call sites are updated to use the shared APIs. The change also adds deploy-manifest transformations and lowers the configured module-cycle limit.

Changes: Install State and Install Flows

Layer / File(s) Summary
Install-state contracts and shared helpers
pnpm/crates/package-manager/src/install_state*, pnpm/crates/package-manager/src/fast_update_settings.rs, pnpm/crates/package-manager/src/install/lockfile_freshness/directory_deps*
The package manager adds shared install-state types and helpers for manifests, settings, timestamps, validation, local file dependencies, and lockfile comparison. Related helpers and imports move from optimistic_repeat_install.
Repeat-install checks and state ownership
pnpm/crates/package-manager/src/optimistic_repeat_install*
The repeat-install fast path, freshness checks, and workspace discovery use install-state APIs. The corresponding tests update their imports and setup paths.
Install options and workspace-state wiring
crate-layers.toml, pnpm/crates/package-manager/src/install.rs, pnpm/crates/package-manager/src/install_entry.rs, pnpm/crates/package-manager/src/install/*, pnpm/crates/package-manager/src/lib.rs, pnpm/crates/package-manager/src/install/tests/*, pnpm/crates/workspace-state/src/tests.rs
Install options now include a repeat-install callback, and the lockfile-check sink moves into save options. Install execution and workspace-state code use the shared install-state APIs. The module-cycle limit changes from 12 to 6.
Deploy-manifest transformations
pnpm/crates/package-manager/src/install/deploy_manifest.rs, pnpm/crates/package-manager/src/install.rs
The new deploy-manifest hook marks workspace: dependencies as injected and rewrites link: values to file: values across optional, regular, and development dependencies.

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Refactor

Suggested labels: product: pacquet

Suggested reviewers: qodo-code-review

Merge Risk: Minimal · up to bb2b9

No merge-blocking issue was identified; the reviewed change is ready for normal merge checks.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Share
Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between f1e6e43 and bb2b975.

Files selected for processing: 78
  • crate-layers.toml
  • pnpm/crates/package-manager/src/fast_update_settings.rs
  • pnpm/crates/package-manager/src/install.rs
  • pnpm/crates/package-manager/src/install/apply_materialization.rs
  • pnpm/crates/package-manager/src/install/deploy_manifest.rs
  • pnpm/crates/package-manager/src/install/lifecycle.rs
  • pnpm/crates/package-manager/src/install/lockfile_freshness/directory_deps.rs
  • pnpm/crates/package-manager/src/install/lockfile_freshness/directory_deps/injected_manifest.rs
  • pnpm/crates/package-manager/src/install/modules_state.rs
  • pnpm/crates/package-manager/src/install/prepare_modules_state.rs
  • pnpm/crates/package-manager/src/install/prepare_modules_state/up_to_date.rs
  • pnpm/crates/package-manager/src/install/run.rs
  • pnpm/crates/package-manager/src/install/run/auto_dedupe.rs
  • pnpm/crates/package-manager/src/install/run/dispatch.rs
  • pnpm/crates/package-manager/src/install/run/execution.rs
  • pnpm/crates/package-manager/src/install/run/fast_path.rs
  • pnpm/crates/package-manager/src/install/run/frozen_local_tarballs.rs
  • pnpm/crates/package-manager/src/install/run/workspace.rs
  • pnpm/crates/package-manager/src/install/tests/build_workspace_state_tests.rs
  • pnpm/crates/package-manager/src/install/tests/frozen_dispatch.rs
  • pnpm/crates/package-manager/src/install/tests/frozen_policy.rs
  • pnpm/crates/package-manager/src/install/tests/lockfile_recovery.rs
  • pnpm/crates/package-manager/src/install/tests/repeat_install.rs
  • pnpm/crates/package-manager/src/install/tests/workspace.rs
  • pnpm/crates/package-manager/src/install/workspace_state.rs
  • pnpm/crates/package-manager/src/install/workspace_state/projects.rs
  • pnpm/crates/package-manager/src/install/workspace_state/write.rs
  • pnpm/crates/package-manager/src/install_entry.rs
  • pnpm/crates/package-manager/src/install_state.rs
  • pnpm/crates/package-manager/src/install_state/local_file_deps.rs
  • pnpm/crates/package-manager/src/install_state/local_file_deps/injected.rs
  • pnpm/crates/package-manager/src/install_state/local_file_deps/specs.rs
  • pnpm/crates/package-manager/src/install_state/local_file_deps/specs/tests.rs
  • pnpm/crates/package-manager/src/install_state/manifest_source.rs
  • pnpm/crates/package-manager/src/install_state/settings.rs
  • pnpm/crates/package-manager/src/install_state/settings/agent_skills.rs
  • pnpm/crates/package-manager/src/install_state/settings/equivalence.rs
  • pnpm/crates/package-manager/src/install_state/settings/install_policy.rs
  • pnpm/crates/package-manager/src/install_state/settings/recorded_values.rs
  • pnpm/crates/package-manager/src/install_state/settings/registry_prefixes.rs
  • pnpm/crates/package-manager/src/install_state/settings/store_location.rs
  • pnpm/crates/package-manager/src/install_state/timestamps.rs
  • pnpm/crates/package-manager/src/install_state/validation.rs
  • pnpm/crates/package-manager/src/install_state/validation/bins.rs
  • pnpm/crates/package-manager/src/install_state/validation/file_stat.rs
  • pnpm/crates/package-manager/src/install_state/validation/local_dependencies.rs
  • pnpm/crates/package-manager/src/install_state/validation/local_dependencies/tests.rs
  • pnpm/crates/package-manager/src/install_state/validation/manifest_files.rs
  • pnpm/crates/package-manager/src/install_state/validation/manifest_files/stand_ins.rs
  • pnpm/crates/package-manager/src/lib.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/current_lockfile.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/freshness.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/freshness/drift.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/modules_dirs.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/relocation.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/tests.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/tests/builds.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/tests/catalogs.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/tests/hooks.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/tests/injected.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/tests/installation.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/tests/integrity.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/tests/lockfile.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/tests/modules_dir.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/tests/overrides.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/tests/resolution.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/tests/settings_classification.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/tests/store.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/tests/workspace.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/up_to_date.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/up_to_date/discovery.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/up_to_date/discovery/tests.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/up_to_date/from_files.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/up_to_date/nothing_to_install.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/up_to_date/per_project.rs
  • pnpm/crates/package-manager/src/optimistic_repeat_install/up_to_date/stand_ins.rs
  • pnpm/crates/workspace-state/src/tests.rs
Files with no reviewable changes: 1
  • pnpm/crates/package-manager/src/optimistic_repeat_install/current_lockfile.rs

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

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                                            main                                    pr
-----                                            ----                                    --
lockfile/parse_pnpm_lock                         1.26     21.1±2.68ms    17.7 MB/sec     1.00     16.7±0.87ms    22.4 MB/sec
packument/parse                                  1.00     43.4±2.23µs  1529.0 MB/sec     1.02     44.2±4.38µs  1501.5 MB/sec
tarball/download_dependency                      1.17  1125.7±238.56µs     3.8 MB/sec    1.00  963.3±195.56µs     4.4 MB/sec
tarball_batch/cold_store_many_medium_tarballs    1.19   270.7±43.66ms 59.1 KElem/sec     1.00   228.1±15.29ms 70.2 KElem/sec
version_pick/repeated_ranges_file                1.16      5.7±0.31ms  5.5 KElem/sec     1.00      4.9±0.24ms  6.3 KElem/sec
version_pick/repeated_ranges_raw                 1.17      5.7±0.36ms  5.5 KElem/sec     1.00      4.9±0.18ms  6.4 KElem/sec
version_pick/wildcard_lowest                     1.02     40.8±1.81µs 23.9 KElem/sec     1.00     39.9±0.91µs 24.5 KElem/sec
workspace_resolution/hoist_heavy                 1.13   514.3±64.20ms        ? ?/sec     1.00   453.4±83.52ms        ? ?/sec
workspace_sort/chained_projects                  1.65    40.3±10.72ms        ? ?/sec     1.00     24.4±5.23ms        ? ?/sec

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Same-run regression check

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

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

Scenario Engine main median HEAD median Change Tolerance Result
isolated-fresh-restore-cold-cache-cold-store pacquet 2296.42 ms 2362.44 ms 2.9% 114.82 ms Within tolerance
isolated-fresh-restore-cold-cache-cold-store pnpr 1394.72 ms 1417.80 ms 1.7% 69.74 ms Within tolerance
isolated-fresh-restore-hot-cache-hot-store pacquet 271.85 ms 291.18 ms 7.1% 13.59 ms Inconclusive (overlapping samples)
isolated-fresh-restore-hot-cache-hot-store pnpr 318.02 ms 305.49 ms -3.9% 15.90 ms Within tolerance
isolated-repeat-install-hot-cache-hot-store pacquet 9.90 ms 10.01 ms 1.1% 2.00 ms Within tolerance
isolated-repeat-install-hot-cache-hot-store pnpr 9.90 ms 9.90 ms 0.1% 2.00 ms Within tolerance
isolated-repeat-install-cold-cache-hot-store pacquet 11.47 ms 10.86 ms -5.4% 2.00 ms Within tolerance
isolated-repeat-install-cold-cache-hot-store pnpr 11.57 ms 11.17 ms -3.5% 2.00 ms Within tolerance
isolated-fresh-install-cold-cache-cold-store pacquet 2710.09 ms 2596.06 ms -4.2% 135.50 ms Within tolerance
isolated-fresh-install-cold-cache-cold-store pnpr 1541.12 ms 1538.10 ms -0.2% 77.06 ms Within tolerance
isolated-fresh-install-hot-cache-hot-store pacquet 487.01 ms 481.04 ms -1.2% 24.35 ms Within tolerance
isolated-fresh-install-hot-cache-hot-store pnpr 308.76 ms 300.31 ms -2.7% 15.44 ms Within tolerance
isolated-fresh-install-cold-cache-hot-store pacquet 1755.58 ms 1784.16 ms 1.6% 87.78 ms Within tolerance
isolated-fresh-install-cold-cache-hot-store pnpr 381.14 ms 332.86 ms -12.7% 19.06 ms Within tolerance
isolated-fresh-resolve-hot-cache-offline pacquet 286.27 ms 285.95 ms -0.1% 14.31 ms Within tolerance
isolated-fresh-resolve-hot-cache-offline pnpr 99.65 ms 102.57 ms 2.9% 4.98 ms Within tolerance
isolated-peer-heavy-resolve-hot-cache-offline pacquet 212.20 ms 228.79 ms 7.8% 10.61 ms Inconclusive (overlapping samples)
isolated-linked-workspace-resolve-hot-cache-offline pacquet 73.93 ms 75.00 ms 1.4% 3.70 ms Within tolerance
isolated-injected-workspace-repeat-install-hot-cache-hot-store pacquet 116.26 ms 120.61 ms 3.7% 5.81 ms Within tolerance
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pacquet 4792.87 ms 4717.42 ms -1.6% 239.64 ms Within tolerance
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pnpr 3773.08 ms 3835.55 ms 1.7% 188.65 ms Within tolerance
gvs-fresh-restore-hot-cache-hot-store pacquet 166.58 ms 158.73 ms -4.7% 8.33 ms Within tolerance
gvs-fresh-restore-hot-cache-hot-store pnpr 179.33 ms 172.84 ms -3.6% 8.97 ms Within tolerance
store-only-unlocked-direct-deps-cold-cache-hot-store pacquet 1357.63 ms 1535.13 ms 13.1% 67.88 ms Inconclusive (overlapping samples)
cargo-repeat-install-hot-cache-hot-store pacquet 26.74 ms 27.07 ms 1.3% 2.00 ms Within tolerance

Same-run syscall check

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

Scenario Engine Syscall main calls (max) HEAD calls (min) Change Tolerance Identical-run spread Result
isolated-fresh-restore-cold-cache-cold-store pacquet statx 95090 95096 +0.0% 1901 2 Within tolerance
isolated-fresh-restore-cold-cache-cold-store pnpr access 11 11 +0.0% 50 0 Within tolerance
isolated-fresh-restore-hot-cache-hot-store pacquet access 11 11 +0.0% 50 0 Within tolerance
isolated-fresh-restore-hot-cache-hot-store pnpr access 11 11 +0.0% 50 0 Within tolerance
isolated-repeat-install-hot-cache-hot-store pacquet access 8 8 +0.0% 50 0 Within tolerance
isolated-repeat-install-hot-cache-hot-store pnpr access 8 8 +0.0% 50 0 Within tolerance
isolated-repeat-install-cold-cache-hot-store pacquet access 8 8 +0.0% 50 0 Within tolerance
isolated-repeat-install-cold-cache-hot-store pnpr access 8 8 +0.0% 50 0 Within tolerance
isolated-fresh-install-cold-cache-cold-store pacquet access 11 11 +0.0% 50 0 Within tolerance
isolated-fresh-install-cold-cache-cold-store pnpr symlink 3893 3896 +0.1% 77 4 Within tolerance
isolated-fresh-install-hot-cache-hot-store pacquet access 11 11 +0.0% 50 0 Within tolerance
isolated-fresh-install-hot-cache-hot-store pnpr readlink 15314 15342 +0.2% 306 53 Within tolerance
isolated-fresh-install-cold-cache-hot-store pacquet openat 17745 17756 +0.1% 354 6 Within tolerance
isolated-fresh-install-cold-cache-hot-store pacquet readlink 15825 15483 -2.2% 316 332 Unstable (identical runs differ by 332, not gated)
isolated-fresh-install-cold-cache-hot-store pnpr readlink 15287 15330 +0.3% 305 28 Within tolerance
isolated-fresh-resolve-hot-cache-offline pacquet statx 1743 1744 +0.1% 50 1 Within tolerance
isolated-fresh-resolve-hot-cache-offline pnpr access 8 8 +0.0% 50 0 Within tolerance
isolated-peer-heavy-resolve-hot-cache-offline pacquet access 8 8 +0.0% 50 0 Within tolerance
isolated-linked-workspace-resolve-hot-cache-offline pacquet access 8 8 +0.0% 50 0 Within tolerance
isolated-injected-workspace-repeat-install-hot-cache-hot-store pacquet access 11 11 +0.0% 50 0 Within tolerance
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pacquet access 11 11 +0.0% 50 0 Within tolerance
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pnpr fstat 106 107 +0.9% 50 0 Within tolerance
gvs-fresh-restore-hot-cache-hot-store pacquet access 11 11 +0.0% 50 0 Within tolerance
gvs-fresh-restore-hot-cache-hot-store pnpr access 11 11 +0.0% 50 0 Within tolerance
store-only-unlocked-direct-deps-cold-cache-hot-store pacquet openat 5318 5323 +0.1% 106 2 Within tolerance
cargo-repeat-install-hot-cache-hot-store pacquet access 22 22 +0.0% 50 0 Within tolerance

Integrated-Benchmark Report (Linux)

Commit: bb2b975f7bea

Compared against main at: 074578e84087

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

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

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.386 ± 0.111 2.269 2.599 1.70 ± 0.12
pacquet@main 2.344 ± 0.111 2.233 2.541 1.67 ± 0.12
pnpr@HEAD 1.448 ± 0.138 1.274 1.661 1.03 ± 0.11
pnpr@main 1.404 ± 0.076 1.295 1.515 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.38555937008,
      "stddev": 0.11075878759679395,
      "median": 2.36244256258,
      "user": 2.1474220800000006,
      "system": 1.50946226,
      "min": 2.2689696960799997,
      "max": 2.59852710808
    },
    {
      "command": "pacquet@main",
      "mean": 2.3438347106800004,
      "stddev": 0.11119453218488867,
      "median": 2.29641973608,
      "user": 2.00203978,
      "system": 1.49318976,
      "min": 2.23295499808,
      "max": 2.5408772900799996
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.44804250998,
      "stddev": 0.1375172568991413,
      "median": 1.41779644958,
      "user": 1.8740707800000003,
      "system": 1.4627724599999998,
      "min": 1.2738592050800002,
      "max": 1.66110195808
    },
    {
      "command": "pnpr@main",
      "mean": 1.40371153878,
      "stddev": 0.07640135386379233,
      "median": 1.39471918058,
      "user": 1.9277161799999998,
      "system": 1.38599216,
      "min": 1.29500937808,
      "max": 1.51483364208
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 287.7 ± 18.0 255.3 314.4 1.06 ± 0.07
pacquet@main 272.1 ± 6.4 261.9 281.8 1.00
pnpr@HEAD 305.9 ± 17.1 279.7 336.3 1.12 ± 0.07
pnpr@main 312.9 ± 16.3 285.3 335.9 1.15 ± 0.07
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.28766080962,
      "stddev": 0.017966156887404463,
      "median": 0.29117836622000004,
      "user": 0.33891543999999996,
      "system": 0.657604,
      "min": 0.25534443722,
      "max": 0.31443569222
    },
    {
      "command": "pacquet@main",
      "mean": 0.27209479142,
      "stddev": 0.006407822427891864,
      "median": 0.27185443272,
      "user": 0.34232114,
      "system": 0.6175580999999999,
      "min": 0.26193060422000003,
      "max": 0.28182233222
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.30590303862,
      "stddev": 0.01710980325302758,
      "median": 0.30548567322,
      "user": 0.35268854000000005,
      "system": 0.6484368,
      "min": 0.27970691422,
      "max": 0.33628953122
    },
    {
      "command": "pnpr@main",
      "mean": 0.31288369702,
      "stddev": 0.016274754071502022,
      "median": 0.31802268221999996,
      "user": 0.36838054,
      "system": 0.6994515,
      "min": 0.28530411122,
      "max": 0.33591647622
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 10.0 ± 0.8 8.3 12.9 1.00 ± 0.11
pacquet@main 10.1 ± 0.8 8.6 13.6 1.00 ± 0.12
pnpr@HEAD 10.1 ± 0.9 8.7 14.4 1.01 ± 0.12
pnpr@main 10.0 ± 0.8 8.6 15.0 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.010046246979653676,
      "stddev": 0.000780255146047971,
      "median": 0.0100089303,
      "user": 0.005863209264069262,
      "system": 0.005136920779220782,
      "min": 0.0083248893,
      "max": 0.012855164300000001
    },
    {
      "command": "pacquet@main",
      "mean": 0.01008872919795918,
      "stddev": 0.0008408972149465344,
      "median": 0.0099039733,
      "user": 0.006003613469387754,
      "system": 0.005032428163265302,
      "min": 0.0085689673,
      "max": 0.013566009300000001
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.010118222565917606,
      "stddev": 0.0008639563018569295,
      "median": 0.009903062300000001,
      "user": 0.005681076329588017,
      "system": 0.005332320224719102,
      "min": 0.0086745343,
      "max": 0.014373134300000001
    },
    {
      "command": "pnpr@main",
      "mean": 0.010040960007692312,
      "stddev": 0.0007904486861244443,
      "median": 0.0098979373,
      "user": 0.00590867846153846,
      "system": 0.005020606538461542,
      "min": 0.0085540593,
      "max": 0.014985223300000001
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 11.0 ± 0.8 9.7 13.2 1.00
pacquet@main 11.6 ± 0.9 9.4 14.0 1.05 ± 0.11
pnpr@HEAD 11.2 ± 0.9 9.5 13.9 1.02 ± 0.11
pnpr@main 11.6 ± 1.2 9.8 15.0 1.06 ± 0.13
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.010974891914867257,
      "stddev": 0.0007509514617745532,
      "median": 0.010857265260000002,
      "user": 0.0060838442477876165,
      "system": 0.0057539375221238925,
      "min": 0.009732179260000001,
      "max": 0.01320898126
    },
    {
      "command": "pacquet@main",
      "mean": 0.01155600620339623,
      "stddev": 0.0009256583432721097,
      "median": 0.01147221076,
      "user": 0.006742606603773587,
      "system": 0.005810774528301886,
      "min": 0.009424140260000002,
      "max": 0.014003901260000002
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.011226863213703706,
      "stddev": 0.0008730140096053322,
      "median": 0.011172750260000001,
      "user": 0.006467350925925926,
      "system": 0.005700049814814812,
      "min": 0.00948949026,
      "max": 0.013865470260000002
    },
    {
      "command": "pnpr@main",
      "mean": 0.011590040599901477,
      "stddev": 0.0011560985753809915,
      "median": 0.01157381126,
      "user": 0.007095566009852214,
      "system": 0.0054918766502463036,
      "min": 0.00978223026,
      "max": 0.014966101260000001
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.596 ± 0.049 2.515 2.675 1.67 ± 0.15
pacquet@main 2.732 ± 0.121 2.561 2.917 1.75 ± 0.18
pnpr@HEAD 1.578 ± 0.110 1.448 1.757 1.01 ± 0.12
pnpr@main 1.559 ± 0.140 1.385 1.782 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.5963698691199997,
      "stddev": 0.04945369375504457,
      "median": 2.59605754662,
      "user": 2.5242109800000003,
      "system": 1.7095209400000002,
      "min": 2.5153476236200003,
      "max": 2.67461617962
    },
    {
      "command": "pacquet@main",
      "mean": 2.73150839072,
      "stddev": 0.12072659998673459,
      "median": 2.71008828062,
      "user": 2.8415693799999997,
      "system": 2.00651594,
      "min": 2.5612317736200003,
      "max": 2.9174335566200003
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.57754550162,
      "stddev": 0.10958606094158065,
      "median": 1.53810000362,
      "user": 1.89607678,
      "system": 1.6701970400000001,
      "min": 1.4480089526200002,
      "max": 1.7570196396200002
    },
    {
      "command": "pnpr@main",
      "mean": 1.55873913832,
      "stddev": 0.14038192629062718,
      "median": 1.54111692262,
      "user": 1.8499915799999997,
      "system": 1.5578532399999996,
      "min": 1.3851674386200001,
      "max": 1.7823459136200002
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 479.1 ± 15.6 458.5 510.1 1.59 ± 0.06
pacquet@main 486.0 ± 20.3 455.3 527.5 1.62 ± 0.08
pnpr@HEAD 300.9 ± 6.6 290.7 310.9 1.00
pnpr@main 308.3 ± 9.6 293.3 324.3 1.02 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.47910664903999994,
      "stddev": 0.015603411583041274,
      "median": 0.48103822074,
      "user": 0.7110176,
      "system": 0.87731446,
      "min": 0.45846222024000005,
      "max": 0.51011981724
    },
    {
      "command": "pacquet@main",
      "mean": 0.4860084715400001,
      "stddev": 0.020338730848517093,
      "median": 0.48701179674000006,
      "user": 0.7026994999999999,
      "system": 0.8794989599999999,
      "min": 0.45531126724000004,
      "max": 0.52750132424
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.30086513134000004,
      "stddev": 0.006577757904440715,
      "median": 0.30031203874,
      "user": 0.27433729999999995,
      "system": 0.60421046,
      "min": 0.29069339824,
      "max": 0.31089802224
    },
    {
      "command": "pnpr@main",
      "mean": 0.30828125894,
      "stddev": 0.009599066227173523,
      "median": 0.30875513274,
      "user": 0.2585104000000001,
      "system": 0.6013320600000001,
      "min": 0.29333387824,
      "max": 0.32434082024000005
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.795 ± 0.043 1.748 1.875 5.26 ± 0.34
pacquet@main 1.762 ± 0.025 1.725 1.801 5.17 ± 0.32
pnpr@HEAD 0.341 ± 0.020 0.320 0.381 1.00
pnpr@main 0.373 ± 0.018 0.336 0.392 1.09 ± 0.08
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.7946011120599998,
      "stddev": 0.043446215691031735,
      "median": 1.7841592992600002,
      "user": 1.18054478,
      "system": 1.0574576199999999,
      "min": 1.74841855526,
      "max": 1.87462054826
    },
    {
      "command": "pacquet@main",
      "mean": 1.76236309296,
      "stddev": 0.0250451342209999,
      "median": 1.7555822252600002,
      "user": 1.14935628,
      "system": 1.0115138199999998,
      "min": 1.7246618952600001,
      "max": 1.80117205926
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.3411463881600001,
      "stddev": 0.02028380636601565,
      "median": 0.33285751726,
      "user": 0.32929087999999995,
      "system": 0.6403590200000001,
      "min": 0.32011122726,
      "max": 0.38143919826000006
    },
    {
      "command": "pnpr@main",
      "mean": 0.37276044616,
      "stddev": 0.018247730792589907,
      "median": 0.38114099676,
      "user": 0.3642308799999999,
      "system": 0.74144982,
      "min": 0.33578151026,
      "max": 0.39225753626000004
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 288.5 ± 15.4 264.4 311.4 2.89 ± 0.20
pacquet@main 283.9 ± 15.8 261.5 308.0 2.84 ± 0.20
pnpr@HEAD 101.9 ± 4.3 93.1 111.2 1.02 ± 0.06
pnpr@main 99.9 ± 4.3 92.8 108.3 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.28846033204,
      "stddev": 0.015404655986574221,
      "median": 0.28595289494,
      "user": 0.2945756599999999,
      "system": 0.17681217999999996,
      "min": 0.26435600394000003,
      "max": 0.31143606394
    },
    {
      "command": "pacquet@main",
      "mean": 0.28388623334,
      "stddev": 0.01577988200347177,
      "median": 0.28627039994000003,
      "user": 0.29128265999999997,
      "system": 0.20209558,
      "min": 0.26152926594000003,
      "max": 0.30796030694
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.10190128816222224,
      "stddev": 0.00429145626094473,
      "median": 0.10257493794000001,
      "user": 0.04326595259259259,
      "system": 0.020709568888888884,
      "min": 0.09313675694000001,
      "max": 0.11115996094000001
    },
    {
      "command": "pnpr@main",
      "mean": 0.09993911065428572,
      "stddev": 0.004330829231355711,
      "median": 0.09964846594000001,
      "user": 0.04299621714285713,
      "system": 0.019688834285714284,
      "min": 0.09280747794000001,
      "max": 0.10834202394
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 230.5 ± 14.8 209.6 253.8 1.06 ± 0.10
pacquet@main 218.4 ± 15.5 202.5 249.9 1.00
pnpm@HEAD 3911.7 ± 190.0 3690.2 4277.4 17.91 ± 1.54
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.2305182312622222,
      "stddev": 0.014771887583328203,
      "median": 0.22878685604000001,
      "user": 0.2441119688888888,
      "system": 0.05201039555555556,
      "min": 0.20958727704000002,
      "max": 0.25375948304
    },
    {
      "command": "pacquet@main",
      "mean": 0.2183840091511111,
      "stddev": 0.015519908274865515,
      "median": 0.21219624604,
      "user": 0.23448707999999996,
      "system": 0.04662739555555555,
      "min": 0.20254397004,
      "max": 0.24988801404000002
    },
    {
      "command": "pnpm@HEAD",
      "mean": 3.9117462504844442,
      "stddev": 0.19004831268215652,
      "median": 3.85505924304,
      "user": 5.727081191111111,
      "system": 0.3474300622222222,
      "min": 3.69017028404,
      "max": 4.277416092039999
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 74.9 ± 2.6 70.6 82.9 1.00 ± 0.06
pacquet@main 74.5 ± 3.7 70.5 89.6 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.07487681740162161,
      "stddev": 0.0026497272469411972,
      "median": 0.07499724978000001,
      "user": 0.06726494000000001,
      "system": 0.04687163621621619,
      "min": 0.07060225378000001,
      "max": 0.08291000078
    },
    {
      "command": "pacquet@main",
      "mean": 0.07454461238,
      "stddev": 0.0037029480465339995,
      "median": 0.07393309578000001,
      "user": 0.06838454000000002,
      "system": 0.04527250571428571,
      "min": 0.07049587378000001,
      "max": 0.08964180678000001
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 121.7 ± 9.9 103.2 139.9 1.04 ± 0.12
pacquet@main 117.1 ± 9.1 95.0 136.3 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.1216832012436364,
      "stddev": 0.009919164404832688,
      "median": 0.12060577338,
      "user": 0.04662459454545454,
      "system": 0.08504833818181817,
      "min": 0.10322113688000001,
      "max": 0.13985849288000002
    },
    {
      "command": "pacquet@main",
      "mean": 0.11714833272615384,
      "stddev": 0.009126161220760843,
      "median": 0.11625778138000001,
      "user": 0.04553106307692308,
      "system": 0.08104325076923077,
      "min": 0.09500489388000001,
      "max": 0.13628881688000002
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.751 ± 0.201 4.513 5.181 1.25 ± 0.06
pacquet@main 4.880 ± 0.261 4.578 5.225 1.28 ± 0.08
pnpr@HEAD 3.929 ± 0.237 3.680 4.472 1.03 ± 0.07
pnpr@main 3.800 ± 0.096 3.675 3.991 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.750999752499999,
      "stddev": 0.20066343831303957,
      "median": 4.717418949900001,
      "user": 2.5277541,
      "system": 1.9680147600000002,
      "min": 4.5130710944,
      "max": 5.1813044374
    },
    {
      "command": "pacquet@main",
      "mean": 4.880367338800001,
      "stddev": 0.26115458301949523,
      "median": 4.7928684519,
      "user": 2.5581314999999996,
      "system": 1.9618405599999995,
      "min": 4.5778985134,
      "max": 5.2246944834
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.9293432147,
      "stddev": 0.23704756690813666,
      "median": 3.8355497554,
      "user": 2.7343720999999994,
      "system": 2.21073816,
      "min": 3.6796002884,
      "max": 4.4716372164000004
    },
    {
      "command": "pnpr@main",
      "mean": 3.8003333057000006,
      "stddev": 0.09622807982471503,
      "median": 3.7730784588999997,
      "user": 2.4638055999999997,
      "system": 2.02322576,
      "min": 3.6754568504000003,
      "max": 3.9911845424
    }
  ]
}

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

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 159.3 ± 9.9 144.9 175.3 1.00
pacquet@main 166.9 ± 13.4 140.0 188.6 1.05 ± 0.11
pnpr@HEAD 173.3 ± 8.5 162.0 189.0 1.09 ± 0.09
pnpr@main 179.6 ± 11.6 153.1 200.1 1.13 ± 0.10
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.1592770064435294,
      "stddev": 0.00993080681391092,
      "median": 0.15872750062,
      "user": 0.2017643352941176,
      "system": 0.14946557411764705,
      "min": 0.14491534062,
      "max": 0.17529086662
    },
    {
      "command": "pacquet@main",
      "mean": 0.16689373628666665,
      "stddev": 0.013428594609812754,
      "median": 0.16658163762,
      "user": 0.21483171111111105,
      "system": 0.1521408911111111,
      "min": 0.13997524262,
      "max": 0.18864236662
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.1733221769057143,
      "stddev": 0.008516933208781918,
      "median": 0.17284006812000002,
      "user": 0.20984288571428572,
      "system": 0.14764756571428572,
      "min": 0.16203965562,
      "max": 0.18896955762
    },
    {
      "command": "pnpr@main",
      "mean": 0.17960342815333333,
      "stddev": 0.011575013745517723,
      "median": 0.17932965262,
      "user": 0.21029909999999996,
      "system": 0.16897554666666667,
      "min": 0.15314263262,
      "max": 0.20014266362
    }
  ]
}

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

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.536 ± 0.106 1.376 1.730 1.13 ± 0.08
pacquet@main 1.362 ± 0.030 1.322 1.442 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.5357694907799997,
      "stddev": 0.10593191254511378,
      "median": 1.53513087258,
      "user": 0.9694255,
      "system": 0.43413612000000007,
      "min": 1.37562097308,
      "max": 1.72953179408
    },
    {
      "command": "pacquet@main",
      "mean": 1.36239769848,
      "stddev": 0.030496286523745933,
      "median": 1.3576317410799998,
      "user": 0.8144620999999999,
      "system": 0.34328352000000006,
      "min": 1.32213671908,
      "max": 1.44166859708
    }
  ]
}

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

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 27.3 ± 0.8 26.3 33.3 1.01 ± 0.05
pacquet@main 26.9 ± 0.9 25.9 33.2 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.027288102608505758,
      "stddev": 0.0008389211104826707,
      "median": 0.02707407062,
      "user": 0.020111674252873565,
      "system": 0.014748938390804595,
      "min": 0.02634069462,
      "max": 0.03326930862000001
    },
    {
      "command": "pacquet@main",
      "mean": 0.026916796876880728,
      "stddev": 0.0008626777119006481,
      "median": 0.02673541562,
      "user": 0.01915497816513762,
      "system": 0.015424974128440358,
      "min": 0.02591188962,
      "max": 0.033152588620000006
    }
  ]
}

@codecov-commenter

codecov-commenter commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17686      +/-   ##
==========================================
+ Coverage   92.91%   92.92%   +0.01%     
==========================================
  Files        2092     2098       +6     
  Lines      269988   270411     +423     
==========================================
+ Hits       250862   251283     +421     
- Misses      19126    19128       +2     

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

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

@zkochan
zkochan marked this pull request as ready for review November 4, 2026 12:33
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Break the install and repeat-install module cycle

✨ Enhancement 🕐 40+ Minutes

Grey Divider

AI Description

• Extract shared install records and check contracts into install_state, removing install’s
 dependency on the fast path.
• Move standalone up-to-date checks above install; entry points now supply the repeat-install check.
• Preserve public API paths and behavior while lowering the module-cycle baseline from 12 to 6.
Diagram

graph TD
  Root["Crate API"] --> Entry["Install entry"] --> Install["Install engine"] --> State["Install state"]
  Root --> Fast["Repeat fast path"] --> State
  Entry -->|supplies check| Fast
  Fast -->|reuses helpers| Install
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Use a trait-based check interface
  • ➕ Could support multiple check implementations without a fixed function signature.
  • ➖ Adds abstraction and type propagation for a single supplied check.
  • ➖ Does not remove the need to relocate shared state and standalone gates.
2. Move all fast-path orchestration into install entry
  • ➕ Could keep install entirely focused on the full pipeline.
  • ➖ Requires a broader rewrite of install orchestration and its shortcut behavior.
  • ➖ Increases risk for a behavior-preserving cycle-break step.

Recommendation: Keep the proposed split. A shared state module resolves the common data dependency, and a function pointer at the existing run boundary breaks the remaining call dependency with less behavioral risk than either alternative.

Files changed (78) +1050 / -960

Refactor (53) +987 / -882
fast_update_settings.rsRead shared settings conversion +1/-1

Read shared settings conversion

• Points workspace-package setting serialization at 'install_state' instead of the fast path.

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

install.rsRemove install’s fast-path imports +73/-72

Remove install’s fast-path imports

• Redirects shared contracts to 'install_state' and exposes helpers needed by the relocated gates. Adds the injected repeat-install check to run options and groups lockfile-check handling with save options.

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

apply_materialization.rsRecord state through shared helpers +7/-11

Record state through shared helpers

• Uses 'install_state' for validation, timestamps, and recorded registry routes after materialization.

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

deploy_manifest.rsIsolate deploy manifest hooks +75/-0

Isolate deploy manifest hooks

• Moves deploy-manifest transformation helpers out of the public install entry-point module without changing their logic.

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

lifecycle.rsExpose workspace discovery helpers +3/-3

Expose workspace discovery helpers

• Makes project-loading and discovery-option helpers available to the relocated up-to-date gates.

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

directory_deps.rsShare manifest-directory map type +1/-1

Share manifest-directory map type

• Re-exports 'ProjectManifestsByDir' from 'install_state' instead of defining it under install freshness.

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

injected_manifest.rsUse shared manifest-directory map +1/-4

Use shared manifest-directory map

• Replaces the local type alias with the equivalent shared 'install_state' alias.

pnpm/crates/package-manager/src/install/lockfile_freshness/directory_deps/injected_manifest.rs

modules_state.rsExpose lifecycle-work predicate +1/-1

Expose lifecycle-work predicate

• Makes the existing project lifecycle-script check available to the relocated no-work gate.

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

prepare_modules_state.rsUse shared relocation predicate +1/-3

Use shared relocation predicate

• Reads 'recorded_elsewhere' from 'install_state' rather than the fast-path module.

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

up_to_date.rsUse shared frozen-tree checks +10/-12

Use shared frozen-tree checks

• Redirects timestamp, validation, layout, and registry-route checks to 'install_state'.

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

run.rsConsolidate lockfile-write conditions +5/-8

Consolidate lockfile-write conditions

• Uses 'InstallSaveOptions::writes_lockfile()' for three decisions and exposes run helpers to standalone gates.

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

auto_dedupe.rsRead shared resolution settings +1/-1

Read shared resolution settings

• Imports the settings constructor from 'install_state'.

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

dispatch.rsRead shared dependency predicate +1/-1

Read shared dependency predicate

• Uses 'install_state' to determine whether project manifests declare runtime dependencies.

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

execution.rsRead lockfile-check sink from save options +1/-1

Read lockfile-check sink from save options

• Takes the lockfile-check sink from the grouped save options when preparing resolution.

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

fast_path.rsInvoke the supplied repeat-install check +13/-11

Invoke the supplied repeat-install check

• Calls the 'RepeatInstallCheck' function supplied through run options instead of naming 'optimistic_repeat_install'. Exposes existing build-marker and store helpers to the relocated gates.

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

frozen_local_tarballs.rsUse shared tarball verification inputs +2/-2

Use shared tarball verification inputs

• Reads frozen local-tarball checks from 'install_state'.

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

workspace.rsPass the check through workspace verdicts +47/-34

Pass the check through workspace verdicts

• Builds repeat-install manifest inputs separately and passes the supplied check into the workspace verdict path.

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

workspace_state.rsKeep workspace-state writing under install +12/-251

Keep workspace-state writing under install

• Removes standalone freshness and verify-deps gates from this module. Retains install-side state writing and redirects its shared settings and timestamps to 'install_state'.

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

projects.rsExpose importer manifest list builder +1/-1

Expose importer manifest list builder

• Widens visibility so relocated gates can build the same project-manifest list as install.

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

write.rsRecord validation through shared state +7/-7

Record validation through shared state

• Changes state-write inputs and recorded-setting helpers to refer to 'install_state'.

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

install_entry.rsWire public install methods above both modules +46/-99

Wire public install methods above both modules

• Moves public 'Install' entry points to a crate-level module and supplies the default repeat-install function. Keeps deploy hooks in install and applies the grouped save options.

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

install_state.rsDefine shared install-state contract +252/-0

Define shared install-state contract

• Introduces shared repeat-install inputs, scope, decision, and callback types. Houses predicates and state-recording helpers needed by both install and the fast path.

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

local_file_deps.rsRelocate local-file dependency checks +12/-6

Relocate local-file dependency checks

• Places local dependency and frozen-tarball helpers beneath the shared state module, with direct imports for their dependencies.

pnpm/crates/package-manager/src/install_state/local_file_deps.rs

injected.rsMove injected local-dependency helpers +0/-0

Move injected local-dependency helpers

• Relocates the existing injected-dependency checks with the shared local-file dependency module.

pnpm/crates/package-manager/src/install_state/local_file_deps/injected.rs

specs.rsDecouple local-spec checks from fast-path imports +6/-3

Decouple local-spec checks from fast-path imports

• Uses direct crate imports after moving local-file spec checks into 'install_state'.

pnpm/crates/package-manager/src/install_state/local_file_deps/specs.rs

manifest_source.rsShare declared manifest sources +2/-2

Share declared manifest sources

• Moves manifest-source contracts under 'install_state' and reads its manifest-directory map there.

pnpm/crates/package-manager/src/install_state/manifest_source.rs

settings.rsShare recorded-setting comparisons +12/-43

Share recorded-setting comparisons

• Relocates settings comparisons beneath 'install_state' and extracts recorded-value conversions into a focused submodule.

pnpm/crates/package-manager/src/install_state/settings.rs

agent_skills.rsMove agent-skill setting checks +0/-0

Move agent-skill setting checks

• Keeps agent-skill settings logic with the relocated shared settings module.

pnpm/crates/package-manager/src/install_state/settings/agent_skills.rs

equivalence.rsMove settings equivalence checks +0/-0

Move settings equivalence checks

• Keeps existing equivalence logic alongside shared recorded-setting comparisons.

pnpm/crates/package-manager/src/install_state/settings/equivalence.rs

install_policy.rsMove recorded install-policy checks +0/-0

Move recorded install-policy checks

• Keeps install-policy comparisons within the relocated shared settings module.

pnpm/crates/package-manager/src/install_state/settings/install_policy.rs

recorded_values.rsExtract recorded config conversions +45/-0

Extract recorded config conversions

• Holds the existing JSON and enum conversions used to construct workspace-state settings.

pnpm/crates/package-manager/src/install_state/settings/recorded_values.rs

registry_prefixes.rsMove recorded registry checks +0/-0

Move recorded registry checks

• Keeps registry recording and comparison helpers in shared settings.

pnpm/crates/package-manager/src/install_state/settings/registry_prefixes.rs

store_location.rsMove recorded store-location checks +0/-0

Move recorded store-location checks

• Keeps store-location comparison logic in shared settings.

pnpm/crates/package-manager/src/install_state/settings/store_location.rs

timestamps.rsShare validation timestamps +8/-1

Share validation timestamps

• Moves timestamp helpers beneath 'install_state' and imports their dependencies directly.

pnpm/crates/package-manager/src/install_state/timestamps.rs

validation.rsShare recorded validation logic +6/-3

Share recorded validation logic

• Relocates validation recording and common digest helpers beneath 'install_state', leaving verdict-specific checks with the fast path.

pnpm/crates/package-manager/src/install_state/validation.rs

bins.rsSeparate bin digests from fast-path verdicts +2/-24

Separate bin digests from fast-path verdicts

• Retains reusable workspace-bin digest helpers here while moving the held-project verdict out to freshness drift.

pnpm/crates/package-manager/src/install_state/validation/bins.rs

file_stat.rsMove validated file-stat helpers +0/-0

Move validated file-stat helpers

• Keeps file-stat trust checks with shared state validation.

pnpm/crates/package-manager/src/install_state/validation/file_stat.rs

local_dependencies.rsMove local-dependency validation +0/-0

Move local-dependency validation

• Keeps recorded local-dependency validation with shared state.

pnpm/crates/package-manager/src/install_state/validation/local_dependencies.rs

manifest_files.rsUse shared validation clock +1/-1

Use shared validation clock

• Uses the relocated filesystem timestamp helper when deciding whether manifest records are trustworthy.

pnpm/crates/package-manager/src/install_state/validation/manifest_files.rs

stand_ins.rsMove manifest stand-in validation +0/-0

Move manifest stand-in validation

• Keeps manifest stand-in logic alongside shared manifest-file validation.

pnpm/crates/package-manager/src/install_state/validation/manifest_files/stand_ins.rs

lib.rsRegister new modules and preserve API exports +3/-0

Register new modules and preserve API exports

• Adds 'install_entry' and 'install_state' to the crate and re-exports shared public contracts at the crate root.

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

optimistic_repeat_install.rsFocus fast-path module on freshness decisions +19/-163

Focus fast-path module on freshness decisions

• Moves shared contracts and recorded-state helpers into 'install_state'. Re-exports standalone gates from 'up_to_date' while retaining the freshness check here.

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

current_lockfile.rsShare materialized lockfile comparison +0/-40

Share materialized lockfile comparison

• Removes the materialized-shape comparison now available to install and the fast path through 'install_state'.

pnpm/crates/package-manager/src/optimistic_repeat_install/current_lockfile.rs

freshness.rsUse shared scope and local drift verdict +2/-20

Use shared scope and local drift verdict

• Takes check scope from 'install_state' and delegates held workspace-bin matching to freshness drift.

pnpm/crates/package-manager/src/optimistic_repeat_install/freshness.rs

drift.rsKeep held-bin verdict in freshness drift +24/-2

Keep held-bin verdict in freshness drift

• Moves held-project workspace-bin matching here while reusing digest and comparison helpers from shared validation.

pnpm/crates/package-manager/src/optimistic_repeat_install/freshness/drift.rs

modules_dirs.rsUse shared hoisted directory helper +2/-9

Use shared hoisted directory helper

• Removes the local hoisted-project directory helper in favor of the shared state version.

pnpm/crates/package-manager/src/optimistic_repeat_install/modules_dirs.rs

relocation.rsUse shared recorded-location predicate +1/-11

Use shared recorded-location predicate

• Uses 'install_state::recorded_elsewhere' rather than defining it in the fast path.

pnpm/crates/package-manager/src/optimistic_repeat_install/relocation.rs

up_to_date.rsOwn standalone up-to-date checks +259/-0

Own standalone up-to-date checks

• Moves the synchronous install shortcut and verify-deps gate above install. Their existing checks reuse install discovery, build-marker, and store-registration helpers.

pnpm/crates/package-manager/src/optimistic_repeat_install/up_to_date.rs

discovery.rsRelocate verify-deps discovery +11/-14

Relocate verify-deps discovery

• Moves gate workspace discovery under the fast path and calls install’s shared project-loading helpers through their new paths.

pnpm/crates/package-manager/src/optimistic_repeat_install/up_to_date/discovery.rs

from_files.rsRelocate file-backed shortcut fallback +2/-2

Relocate file-backed shortcut fallback

• Keeps the fallback that reads workspace projects beneath the standalone up-to-date check.

pnpm/crates/package-manager/src/optimistic_repeat_install/up_to_date/from_files.rs

nothing_to_install.rsRelocate no-work gate +5/-9

Relocate no-work gate

• Keeps the verify-deps no-work check with the fast path and reads common predicates from 'install_state'.

pnpm/crates/package-manager/src/optimistic_repeat_install/up_to_date/nothing_to_install.rs

per_project.rsRelocate per-project shortcut +2/-2

Relocate per-project shortcut

• Keeps the per-project up-to-date check under the fast path, using shared validation and install discovery options.

pnpm/crates/package-manager/src/optimistic_repeat_install/up_to_date/per_project.rs

stand_ins.rsRelocate recorded-manifest shortcut +2/-3

Relocate recorded-manifest shortcut

• Keeps the records-first shortcut and manifest stand-ins beneath the standalone up-to-date check.

pnpm/crates/package-manager/src/optimistic_repeat_install/up_to_date/stand_ins.rs

Tests (23) +61 / -76
build_workspace_state_tests.rsRetarget registry-route state test +2/-4

Retarget registry-route state test

• Uses the relocated state helpers in the recorded-registry-routes test.

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

frozen_dispatch.rsRetarget frozen-dispatch timestamp test +3/-3

Retarget frozen-dispatch timestamp test

• Uses shared timestamp helpers for its manifest freshness assertions.

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

frozen_policy.rsRetarget frozen-policy settings test +1/-1

Retarget frozen-policy settings test

• Constructs recorded settings through 'install_state'.

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

lockfile_recovery.rsRetarget lockfile-recovery fast-path tests +4/-6

Retarget lockfile-recovery fast-path tests

• Imports the preserved public gate paths and shared settings helpers.

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

repeat_install.rsRetarget repeat-install tests +8/-16

Retarget repeat-install tests

• Uses the preserved public up-to-date API and relocated state-recording helpers.

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

workspace.rsRetarget workspace-state timestamp test +3/-6

Retarget workspace-state timestamp test

• Uses shared file timestamp helpers to check the written state’s validation baseline.

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

tests.rsMove local-spec tests with their module +0/-0

Move local-spec tests with their module

• Retains the local-file spec tests alongside the relocated checks.

pnpm/crates/package-manager/src/install_state/local_file_deps/specs/tests.rs

tests.rsMove local-dependency validation tests +0/-0

Move local-dependency validation tests

• Retains existing tests beside the relocated validation module.

pnpm/crates/package-manager/src/install_state/validation/local_dependencies/tests.rs

tests.rsRetarget fast-path test fixtures +6/-6

Retarget fast-path test fixtures

• Constructs recorded settings and timestamps through the relocated shared modules.

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

builds.rsRetarget build freshness tests +2/-3

Retarget build freshness tests

• Reads the shared settings constructor in build-related fast-path tests.

pnpm/crates/package-manager/src/optimistic_repeat_install/tests/builds.rs

catalogs.rsRetarget catalog freshness tests +2/-4

Retarget catalog freshness tests

• Uses the relocated settings constructor for catalog test fixtures.

pnpm/crates/package-manager/src/optimistic_repeat_install/tests/catalogs.rs

hooks.rsRetarget pnpmfile hook tests +2/-1

Retarget pnpmfile hook tests

• Reads current settings from 'install_state' in hook tests.

pnpm/crates/package-manager/src/optimistic_repeat_install/tests/hooks.rs

injected.rsRetarget injected-dependency test settings +1/-1

Retarget injected-dependency test settings

• Constructs test settings through 'install_state'.

pnpm/crates/package-manager/src/optimistic_repeat_install/tests/injected.rs

installation.rsRetarget installation freshness tests +8/-6

Retarget installation freshness tests

• Uses shared settings, timestamp types, registry helpers, and preserved public up-to-date paths.

pnpm/crates/package-manager/src/optimistic_repeat_install/tests/installation.rs

integrity.rsRetarget integrity test settings +3/-2

Retarget integrity test settings

• Uses the relocated current-settings constructor.

pnpm/crates/package-manager/src/optimistic_repeat_install/tests/integrity.rs

lockfile.rsRetarget lockfile freshness fixtures +4/-2

Retarget lockfile freshness fixtures

• Imports settings and timestamp helpers from 'install_state'.

pnpm/crates/package-manager/src/optimistic_repeat_install/tests/lockfile.rs

modules_dir.rsRetarget module-directory tests +2/-4

Retarget module-directory tests

• Uses shared recorded-settings construction in module-directory tests.

pnpm/crates/package-manager/src/optimistic_repeat_install/tests/modules_dir.rs

overrides.rsRetarget override freshness tests +3/-3

Retarget override freshness tests

• Uses shared settings constructors for override test fixtures.

pnpm/crates/package-manager/src/optimistic_repeat_install/tests/overrides.rs

resolution.rsRetarget resolution test settings +1/-1

Retarget resolution test settings

• Imports the relocated settings constructor.

pnpm/crates/package-manager/src/optimistic_repeat_install/tests/resolution.rs

settings_classification.rsRetarget setting-drift classification tests +1/-1

Retarget setting-drift classification tests

• Reads the first-setting-drift helper from 'install_state'.

pnpm/crates/package-manager/src/optimistic_repeat_install/tests/settings_classification.rs

store.rsRetarget store freshness tests +3/-2

Retarget store freshness tests

• Imports current settings from the shared state module.

pnpm/crates/package-manager/src/optimistic_repeat_install/tests/store.rs

workspace.rsRetarget workspace freshness fixtures +2/-4

Retarget workspace freshness fixtures

• Constructs recorded settings through 'install_state'.

pnpm/crates/package-manager/src/optimistic_repeat_install/tests/workspace.rs

tests.rsMove verify-deps discovery tests +0/-0

Move verify-deps discovery tests

• Retains discovery tests with the relocated gate.

pnpm/crates/package-manager/src/optimistic_repeat_install/up_to_date/discovery/tests.rs

Documentation (1) +1 / -1
tests.rsClarify settings round-trip test reference +1/-1

Clarify settings round-trip test reference

• Updates a test comment to name the package-manager drift helper after the module move.

pnpm/crates/workspace-state/src/tests.rs

Other (1) +1 / -1
crate-layers.tomlLower package-manager cycle baseline +1/-1

Lower package-manager cycle baseline

• Reduces the recorded largest module cycle from 12 modules to 6 after the dependency split.

crate-layers.toml

@qodo-code-review

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

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can commit Qodo's fix in one click with committable suggestions (GitHub & GitLab)

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Auto-approved notes - no code review findings
- 'auto_approve_for_no_suggestions' flag enabled

Grey Divider

Previous reviews

Review updated until commit bb2b975 ⚖️ Balanced

Results up to commit e4f1e42 ⚖️ Balanced


No changes from previous review

Grey Divider

Qodo Logo

@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Reviews (2) · Last reviewed commit: "docs(package-manager): drop the comment ..." · Reviewed by Greptile

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

No code suggestions found for the PR.

@zkochan

zkochan commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai resume

@qodo-code-review

Copy link
Copy Markdown

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

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

Auto-approved notes - no code suggestions found
- 'approve_pr_on_self_review' flag enabled

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Nov 4, 2026
@zkochan
zkochan merged commit 37ade57 into main Nov 4, 2026
67 checks passed
@zkochan
zkochan deleted the repeat-install-one-contract branch November 4, 2026 13:23
zkochan added a commit that referenced this pull request Nov 27, 2026
Covers the last open tooling item of pnpm/tasks#253: a function-level
view from a rust-analyzer SCIP index, to find state that two places
decide on. Related to pnpm/tasks#253.

Two new `crate-layers` subcommands read the index:

- `crate-layers overlaps --index <file>` lists the groups of functions
in different top-level modules that access the same fields. `--crate
<name>` keeps the groups with a function in that crate.
- `crate-layers fields --index <file>` lists the types whose fields two
top-level modules both access. `--type <path>` lists the functions that
access one type's fields, by module.

### What counts

- A function accesses a field where its body names the field after a
`.`. Struct literals and patterns do not count: every function that
builds a type names all of its fields, and counting them paired every
two constructors of one options type.
- `overlaps` pairs two functions in different top-level modules that
share at least `--min-shared` fields (default 4), when those are at
least half of the fields either one accesses. It drops a pair when one
function reaches the other through calls, so a caller and its callee are
not two deciders. That is where the call graph is used.
- Functions in test-only modules are left out, through the module tree
the other reports already read.
- A type is named by its crate and full module path, such as
`pnpm_config::settings::Config`, so two types of one name in a crate
stay apart.

### Design decisions

- The index has no read or write roles and no syntax, so the source text
decides whether a reference is a `.field` access. The same comparison
rejects a stale index: the command fails when a field is not where the
index has it.
- The functions one macro generates share the macro's range in the
index, such as the methods of an `#[async_trait]` block (24 such items,
299 functions in non-test code). A reference there belongs to the
function named last before it. Without this, every reference in such a
block went to one method.
- Decoding uses `prost` 0.12.6, which `Cargo.lock` already holds through
libsql, so no crate is added to the lockfile. Each document is decoded
on its own, which keeps the tool at about 330 MB for a 260 MB index.
- The reports are not part of `crate-layers check` and CI does not run
them. Making the index takes rust-analyzer about 3 minutes and 13 GB
here.

### Results

Measured on this machine: both reports take about 3 seconds in a debug
build.

The motivating case was the install state before #17686, where
`install` and `optimistic_repeat_install` each held part of the rule "is
the recorded install state still valid". On that tree (`81bdfdfcd01`),
`fields` lists `pnpm_workspace_state::WorkspaceStateSettings` third,
after `Config` and `Lockfile`:

```
pnpm_workspace_state::WorkspaceStateSettings: 51 fields accessed in 2 modules
pnpm_package_manager::optimistic_repeat_install: 51 fields in 21 functions
pnpm_package_manager::install: 10 fields in 4 functions
```

On `main` the type is second, with `install_state` as its main reader
(60 fields in 17 functions) and `install` (14 fields in 6 functions) and
`optimistic_repeat_install` (10 fields in 7 functions) still reading it
directly.

`overlaps` prints 112 groups on `main`. Two examples:

```
4 functions, two of which share 9 fields: pnpm_engine_runtime_node_resolver::node_resolver::NodeResolver (5), pnpm_config::settings::Config (4)
  pnpm/crates/package-manager/src/add/specifier.rs:369 resolve_node_runtime_specifier
  pnpm/crates/package-manager/src/install_with_fresh_lockfile/resolver_setup.rs:366 node_resolver
  pnpm/crates/package-manager/src/resolution_policy.rs:233 create_configured_node_resolver
  pnpm/crates/resolving-default-resolver/src/standalone.rs:191 build_node_resolver
5 functions, two of which share 6 fields: pnpm_config::settings::Config (6)
  pnpm/crates/cli/src/cli_args/deploy/workspace_manifest.rs:32 from_config
  pnpm/crates/cli/src/cli_args/install/pnpr_request.rs:133 resolution_settings
  pnpm/crates/package-manager/src/fast_update_settings.rs:25 lockfile_settings_from_config
  pnpm/crates/package-manager/src/install/lockfile_freshness/settings.rs:178 resolution_settings_check
  pnpr/crates/pnpr/src/resolver/resolve.rs:430 check_frozen_settings
```

### Limits

- A call through a trait names the trait's method, not an
implementation, so the call filter does not see through `dyn` or generic
calls.
- Implementations of one trait for several backends show up as groups.
They are parallel by design.
- A function nested in a macro-generated function takes the references
that follow it in the outer function.

The defect-hotspots skill now points at the two reports for the flaws
they find candidates for.

---------

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

Labels

product: pacquet reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants