Skip to content

fix: restore pacquet current lockfile on repeat install - #12643

Merged
zkochan merged 2 commits into
pnpm:mainfrom
spencer17x:fix/pacquet-current-lockfile
Jun 25, 2026
Merged

zkochan merged 2 commits into
pnpm:mainfrom
spencer17x:fix/pacquet-current-lockfile

Conversation

@spencer17x

@spencer17x spencer17x commented Jun 25, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #12582.

  • Prevents pacquet's optimistic repeat-install check from reporting Already up to date when the wanted lockfile records packages but the current lockfile under the virtual store is missing.
  • Persists the current lockfile after the preferFrozenLockfile auto-frozen materialization path, not only after explicit --frozen-lockfile.
  • Adds regression coverage for both the fast-path decision and the prefer-frozen reinstall path.

Squash Commit Body

Pacquet could leave node_modules/.pnpm/lock.yaml missing after a repeat install when the wanted lockfile was still present but the current lockfile had been deleted. The optimistic repeat-install check only considered workspace state, manifest mtimes, and wanted lockfile mtimes, so it could return "Already up to date" before the install path had a chance to rebuild the current lockfile.

Make the optimistic check fall through for single-project installs when the wanted lockfile has package entries but the current lockfile is absent. Also persist the filtered current lockfile whenever pacquet actually takes the frozen materialization path, including the implicit preferFrozenLockfile path, so the full reinstall repairs the missing file.

Fixes pnpm/pnpm#12582.

Checklist

  • The change is implemented in both the TypeScript CLI and the Rust
    pacquet/ port, or the description notes what still needs porting.
    TypeScript pnpm already repairs this scenario; this PR ports the matching behavior to pacquet.
  • Added or updated tests.
  • Updated the documentation if needed.
    Not needed; this is a parity bug fix with no documented surface change.

Written by an agent (Codex, GPT-5).

Summary by CodeRabbit

  • Bug Fixes
    • Improved install behavior so missing current lockfile content is recreated for both explicit frozen and auto-frozen installs.
    • Refined optimistic repeat-install fast-path detection to treat an empty/missing virtual-store lockfile as unusable when dependency data is expected, avoiding incorrect skips.
  • Tests
    • Added new async coverage ensuring frozen/auto-frozen installs restore a deleted current lockfile.
    • Added content-check tests for optimistic repeat installs when the current lockfile is missing or lacks dependency data.

@spencer17x
spencer17x requested a review from zkochan as a code owner June 25, 2026 03:28
@coderabbitai

coderabbitai Bot commented Jun 25, 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: cf64d9be-b393-4140-baf6-3a7710ab3c1d

📥 Commits

Reviewing files that changed from the base of the PR and between 59063f9 and 27e17c6.

📒 Files selected for processing (2)
  • pacquet/crates/package-manager/src/optimistic_repeat_install.rs
  • pacquet/crates/package-manager/src/optimistic_repeat_install/tests.rs

📝 Walkthrough

Walkthrough

The install flow now handles a missing virtual-store lock.yaml in the optimistic repeat-install path and in frozen-path installs. Regression tests cover the repeat-install skip behavior and restoration of the virtual-store lockfile.

Changes

Missing current lockfile handling

Layer / File(s) Summary
Missing-current-lockfile gate
pacquet/crates/package-manager/src/optimistic_repeat_install.rs, pacquet/crates/package-manager/src/optimistic_repeat_install/tests.rs
check_optimistic_repeat_install now skips when the virtual-store lockfile is absent or empty and the wanted lockfile contains dependencies; helper logic and tests cover the new gate.
Frozen-path current lockfile write
pacquet/crates/package-manager/src/install.rs, pacquet/crates/package-manager/src/install/tests.rs
take_frozen_path now drives filtered current-lockfile creation and <virtual_store_dir>/lock.yaml persistence, and the install test recreates the missing virtual-store lockfile during a prefer-frozen install.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Assessment against linked issues

Objective Addressed Explanation
pacquet install can report up to date without writing the current lockfile [#12582] ✅

Possibly related issues

  • pnpm/pnpm#12490 — the install.rs change and regression test match the missing virtual-store current-lockfile write path.

Possibly related PRs

  • pnpm/pnpm#11824 — changes the same frozen/prefer-frozen install gating around take_frozen_path.
  • pnpm/pnpm#11945 — adjusts optimistic repeat-install skip logic in the same module.
  • pnpm/pnpm#12317 — also changes check_optimistic_repeat_install early-skip behavior.

Suggested labels

product: pacquet

Suggested reviewers

  • zkochan
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Fix pacquet repeat install when current lockfile is missing
🐞 Bug fix 🧪 Tests 🕐 20-40 Minutes

Grey Divider

Description

• Skip optimistic repeat-install when current lockfile is missing but wanted lockfile has packages.
• Persist current lockfile whenever the frozen materialization path is taken.
• Add regression tests for both the fast-path decision and prefer-frozen reinstall.
Diagram

graph TD
  A["Install command"] --> B["Optimistic repeat-check"] --> C{Skipped?}
  C -->|"No"| D["Install materialization"] --> E["Persist current lockfile"]
  C -->|"Yes"| F["Report 'Already up to date'"]
  B --> G["Wanted lockfile"] --> C
  B --> H["Current lockfile"] --> C

  subgraph Legend
    direction LR
    _proc["Process/Module"] ~~~ _dec{"Decision"} ~~~ _file["Lockfile state"]
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Include current-lockfile mtime/state in repeat-install stamp
  • ➕ Keeps the optimistic check purely timestamp/state-based
  • ➕ Avoids parsing wanted lockfile during the fast-path
  • ➖ Requires extending/maintaining additional state to record and compare
  • ➖ Still needs careful handling when lockfile writes are disabled
2. Rebuild current lockfile lazily when missing
  • ➕ Could avoid forcing a full reinstall in some cases
  • ➕ Narrows work to just regenerating the virtual-store lockfile
  • ➖ Hard to guarantee correctness without materialization context (filters/engines/importers)
  • ➖ Adds another specialized repair path to maintain
3. Disable optimistic repeat-install for single-project installs
  • ➕ Eliminates an entire class of short-circuit edge cases
  • ➕ Simplifies reasoning about install correctness
  • ➖ Performance regression for common repeat-install scenarios
  • ➖ Moves away from pnpm parity goals

Recommendation: The PR’s approach is the best tradeoff for correctness and minimal surface area: it only disables the fast-path when the wanted lockfile indicates real package content but the current lockfile is missing, and it ensures the current lockfile is persisted whenever the frozen materialization path actually runs (including implicit prefer-frozen). The alternatives either add more state to maintain or risk correctness/performance regressions.

Files changed (4) +140 / -2

Bug fix (2) +25 / -2
install.rsPersist current lockfile on any frozen materialization path +2/-2

Persist current lockfile on any frozen materialization path

• Switches current-lockfile filtering and persistence from depending on explicit 'frozen_lockfile' to depending on whether the install actually takes the frozen/materialization path ('take_frozen_path'). This ensures the virtual-store current lockfile is written for implicit prefer-frozen installs, not only '--frozen-lockfile'.

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

optimistic_repeat_install.rsSkip optimistic repeat-install when current lockfile is missing +23/-0

Skip optimistic repeat-install when current lockfile is missing

• Extends the optimistic repeat-install check to fall through (Decision::Skipped) for single-project installs when the current lockfile is absent but the wanted lockfile exists and has non-empty package entries. This prevents incorrectly reporting 'Already up to date' while leaving the virtual-store lockfile missing.

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

Tests (2) +115 / -0
tests.rsAdd prefer-frozen reinstall regression test for missing current lockfile +101/-0

Add prefer-frozen reinstall regression test for missing current lockfile

• Adds an end-to-end style install test that deletes the virtual-store current lockfile after a successful install, then reruns install with 'prefer_frozen_lockfile: Some(true)' and asserts the current lockfile is restored.

pacquet/crates/package-manager/src/install/tests.rs

tests.rsTest optimistic repeat-install skips on missing current lockfile +14/-0

Test optimistic repeat-install skips on missing current lockfile

• Adds a unit test asserting the optimistic repeat-install decision becomes Skipped when the current lockfile is removed but the wanted lockfile remains non-empty, guarding against the original false up-to-date outcome.

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

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Jun 25, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Action required

1. Wrong lockfile non-empty check ✓ Resolved 🐞 Bug ≡ Correctness
Description
current_lockfile_missing_with_non_empty_wanted() decides whether to skip the optimistic
repeat-install fast path by checking wanted.packages is non-empty, but pacquet’s “should a current
lockfile exist?” contract is Lockfile::is_empty() (based on importer specifiers/dependencies). For
pruned/partial lockfiles where packages is empty/None but importers still record deps, this can
still allow the optimistic fast path to return UpToDate while /lock.yaml is missing.
Code

pacquet/crates/package-manager/src/optimistic_repeat_install.rs[R913-928]

+fn current_lockfile_missing_with_non_empty_wanted(
+    check: &OptimisticRepeatInstallCheck<'_>,
+) -> Result<bool, &'static str> {
+    if check.is_workspace_install || !check.config.lockfile {
+        return Ok(false);
+    }
+    if check.config.virtual_store_dir.join(Lockfile::CURRENT_FILE_NAME).exists() {
+        return Ok(false);
+    }
+    let Some(wanted) =
+        check.lockfile.get().map_err(|_| "the wanted lockfile cannot be read or parsed")?
+    else {
+        return Ok(false);
+    };
+    Ok(wanted.packages.as_ref().is_some_and(|packages| !packages.is_empty()))
+}
Evidence
The new helper uses wanted.packages to infer whether a current lockfile should exist, but the code
that writes/removes the current lockfile uses Lockfile::is_empty() (which does not depend on
packages). The lockfile model also explicitly supports cases where packages can be missing, so
using packages as the sole “non-empty” signal is not equivalent and can miss real dependency
graphs.

pacquet/crates/package-manager/src/optimistic_repeat_install.rs[913-928]
pacquet/crates/lockfile/src/save_lockfile.rs[106-138]
pacquet/crates/lockfile/src/lib.rs[230-244]
pacquet/crates/lockfile/src/lib.rs[246-266]

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

## Issue description
`current_lockfile_missing_with_non_empty_wanted()` currently treats the wanted lockfile as “non-empty” only when `wanted.packages` is present and non-empty. However, whether pacquet will write/remove `<virtual_store>/lock.yaml` is keyed off `Lockfile::is_empty()` (importer specifiers/dependencies), not the presence of `packages`. This mismatch can let the optimistic repeat-install fast path return `UpToDate` while the current lockfile is missing for lockfiles that still represent dependencies but have an empty/missing `packages` map (e.g., pruned/partial lockfiles).
### Issue Context
- The new helper was added to avoid reporting `Already up to date` when the current lockfile is missing but the wanted lockfile indicates packages were materialized.
- `save_current_to_virtual_store_dir()` uses `Lockfile::is_empty()` to decide whether to remove or write the current lockfile.
### Fix Focus Areas
- pacquet/crates/package-manager/src/optimistic_repeat_install.rs[913-928]
### Suggested fix
Replace the `packages`-based test with a check aligned to the write contract, e.g.:
- `Ok(!wanted.is_empty())`
Optionally, if you want the guard to reflect any materialized graph shape, you could also consider `snapshots` as a fallback, but `!wanted.is_empty()` is the most parity-aligned with the existing write/remove behavior.

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



Remediation recommended

2. Workspace lockfile guard bypass 🐞 Bug ☼ Reliability
Description
current_lockfile_unusable_with_non_empty_wanted() returns Ok(false) for workspace installs, so
check_optimistic_repeat_install() can still return UpToDate even when /lock.yaml is
missing/empty, leaving the expected current-lockfile artifact unrepaired. This can happen whenever
manifests and the wanted lockfile mtimes are unchanged, because the UpToDate early return occurs
without reading/parsing the current lockfile.
Code

pacquet/crates/package-manager/src/optimistic_repeat_install.rs[R916-918]

+    if check.is_workspace_install || !check.config.lockfile {
+        return Ok(false);
+    }
Evidence
The optimistic checker can return UpToDate based on mtimes and state without reading the current
lockfile; the newly added guard that would skip in the “current lockfile missing + wanted non-empty”
scenario is explicitly disabled for workspace installs, so the workspace path still allows the
UpToDate early return even if /lock.yaml is absent. The install pipeline itself documents that
workspace installs also write /lock.yaml, so the artifact is expected to exist and should be
repaired when missing.

pacquet/crates/package-manager/src/optimistic_repeat_install.rs[230-235]
pacquet/crates/package-manager/src/optimistic_repeat_install.rs[275-289]
pacquet/crates/package-manager/src/optimistic_repeat_install.rs[913-928]
pacquet/crates/package-manager/src/install.rs[1609-1626]

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

## Issue description
Workspace installs can still hit the optimistic repeat-install `UpToDate` fast path while the *current* lockfile under the virtual store is missing/empty, because the new guard explicitly returns `false` when `is_workspace_install` is true.
### Issue Context
The repeat-install check can return `UpToDate` without parsing the current lockfile; the new “current lockfile missing” guard is meant to force a fall-through when the wanted lockfile is non-empty but the current lockfile is absent. That protection currently excludes workspace installs.
### Fix Focus Areas
- pacquet/crates/package-manager/src/optimistic_repeat_install.rs[913-928]
- pacquet/crates/package-manager/src/optimistic_repeat_install.rs[229-289]
### Suggested fix
Adjust `current_lockfile_unusable_with_non_empty_wanted()` (or add a workspace-specific companion check) so workspace installs also skip the optimistic `UpToDate` path when the current lockfile is missing/empty and the wanted lockfile is non-empty (or when both lockfiles are absent). Keep the parse cost limited to the rare “current lockfile missing/empty” case (similar to the single-project logic).

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


3. Current lockfile exists misleads ✓ Resolved 🐞 Bug ☼ Reliability
Description
current_lockfile_missing_with_non_empty_wanted() treats any filesystem entry at /lock.yaml as
“present” via Path::exists(), even if it’s a directory or an empty file that
Lockfile::load_current_from_virtual_store_dir() would treat as missing/unreadable. This can let
check_optimistic_repeat_install() return UpToDate (and skip repair) while the current lockfile
is effectively absent/corrupt.
Code

pacquet/crates/package-manager/src/optimistic_repeat_install.rs[R913-928]

+fn current_lockfile_missing_with_non_empty_wanted(
+    check: &OptimisticRepeatInstallCheck<'_>,
+) -> Result<bool, &'static str> {
+    if check.is_workspace_install || !check.config.lockfile {
+        return Ok(false);
+    }
+    if check.config.virtual_store_dir.join(Lockfile::CURRENT_FILE_NAME).exists() {
+        return Ok(false);
+    }
+    let Some(wanted) =
+        check.lockfile.get().map_err(|_| "the wanted lockfile cannot be read or parsed")?
+    else {
+        return Ok(false);
+    };
+    Ok(wanted.packages.as_ref().is_some_and(|packages| !packages.is_empty()))
+}
Evidence
The new helper returns Ok(false) as soon as the path “exists”, and the main function can return
Decision::UpToDate without ever attempting to load the current lockfile; meanwhile the lockfile
loader treats empty content as absent (Ok(None)) and would error on directories, so “exists” is
not equivalent to “usable current lockfile.”

pacquet/crates/package-manager/src/optimistic_repeat_install.rs[278-289]
pacquet/crates/package-manager/src/optimistic_repeat_install.rs[913-928]
pacquet/crates/lockfile/src/load_lockfile.rs[49-54]
pacquet/crates/lockfile/src/load_lockfile.rs[86-102]

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

## Issue description
The optimistic repeat-install shortcut checks current-lockfile presence with `Path::exists()`, which returns true for directories and for empty files. Because `Lockfile::load_from_path()` returns `Ok(None)` for empty main-doc content (and errors on directories), the new safeguard can be bypassed and the install may incorrectly report `UpToDate`.
### Issue Context
This check runs on the warm path (pre-runtime fast path + in-runtime optimistic check), so the fix should remain a single cheap filesystem stat/read.
### Fix Focus Areas
- pacquet/crates/package-manager/src/optimistic_repeat_install.rs[913-928]
### Suggested fix
Replace the `exists()` test with a stricter, still-cheap check that the path is a regular file and non-empty (or at least not empty):
- `fs::metadata(&path)`
- if `NotFound` => treat as missing
- if `meta.is_file()` is false => treat as missing (or return an error reason)
- optionally: if `meta.len() == 0` => treat as missing
This keeps the check to one `stat(2)` and avoids parsing YAML on the hot path while correctly treating directory/empty-file states as “missing current lockfile.”

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


Grey Divider

Qodo Logo

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jun 25, 2026
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 59063f9

@codecov-commenter

codecov-commenter commented Jun 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.58%. Comparing base (54c5c0e) to head (27e17c6).

Files with missing lines Patch % Lines
...s/package-manager/src/optimistic_repeat_install.rs 91.66% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #12643   +/-   ##
=======================================
  Coverage   88.58%   88.58%           
=======================================
  Files         339      339           
  Lines       49171    49193   +22     
=======================================
+ Hits        43557    43580   +23     
+ Misses       5614     5613    -1     

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

@github-actions

github-actions Bot commented Jun 25, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 27e17c6c9892

Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD.

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.677 ± 0.189 4.459 4.933 1.61 ± 0.07
pacquet@main 4.600 ± 0.090 4.474 4.733 1.59 ± 0.04
pnpr@HEAD 3.025 ± 0.197 2.804 3.357 1.04 ± 0.07
pnpr@main 2.899 ± 0.036 2.842 2.969 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.677284544720001,
      "stddev": 0.18903350305302047,
      "median": 4.646223254720001,
      "user": 3.8583116399999993,
      "system": 3.3800015800000005,
      "min": 4.4594450317200005,
      "max": 4.93262915872,
      "times": [
        4.4594450317200005,
        4.52149362872,
        4.88081743672,
        4.75956135072,
        4.93262915872,
        4.78132290172,
        4.892336146720001,
        4.50766406672,
        4.50469056672,
        4.53288515872
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.6003794759200005,
      "stddev": 0.0903639630044336,
      "median": 4.596720358220001,
      "user": 3.8573447399999994,
      "system": 3.3932930800000003,
      "min": 4.473566383720001,
      "max": 4.733389290720001,
      "times": [
        4.733389290720001,
        4.61265258372,
        4.473566383720001,
        4.7280823427200005,
        4.58068584972,
        4.66697101272,
        4.48493116972,
        4.6050560237200004,
        4.53007540972,
        4.58838469272
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.02481831552,
      "stddev": 0.1974720562739997,
      "median": 2.94474804772,
      "user": 2.8394540399999997,
      "system": 2.9596697799999996,
      "min": 2.80378756072,
      "max": 3.35698350772,
      "times": [
        2.90173037672,
        3.35698350772,
        2.94241173872,
        2.94708435672,
        2.85823259872,
        2.80378756072,
        3.02208216572,
        2.88827805672,
        3.30355805072,
        3.22403474272
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 2.89861274872,
      "stddev": 0.03621829697597164,
      "median": 2.89163070072,
      "user": 2.83851184,
      "system": 2.97076078,
      "min": 2.8416179967199997,
      "max": 2.96870331172,
      "times": [
        2.88135839772,
        2.88086495672,
        2.96870331172,
        2.8416179967199997,
        2.87125903872,
        2.9168300017199997,
        2.91035447872,
        2.87767735672,
        2.9019030037199998,
        2.93555894472
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 671.5 ± 13.8 649.7 687.8 1.01 ± 0.04
pacquet@main 663.9 ± 21.7 642.9 716.4 1.00
pnpr@HEAD 728.6 ± 21.3 696.2 757.0 1.10 ± 0.05
pnpr@main 728.6 ± 28.9 704.3 783.4 1.10 ± 0.06
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.67146945602,
      "stddev": 0.013792023134165754,
      "median": 0.67369569222,
      "user": 0.41692804,
      "system": 1.3472617799999997,
      "min": 0.64971348372,
      "max": 0.6878190807200001,
      "times": [
        0.67525666772,
        0.6609781357200001,
        0.6576991467200001,
        0.64971348372,
        0.68317855372,
        0.68373110772,
        0.6585152727200001,
        0.6878190807200001,
        0.6856683947200001,
        0.67213471672
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.66394134512,
      "stddev": 0.021690406378718604,
      "median": 0.6587952237200001,
      "user": 0.39360414,
      "system": 1.3401988799999998,
      "min": 0.64291657572,
      "max": 0.7164169447200001,
      "times": [
        0.6742038087200001,
        0.65081065872,
        0.6453003297200001,
        0.6532306157200001,
        0.6687235357200001,
        0.7164169447200001,
        0.6732522847200001,
        0.6501988657200001,
        0.64291657572,
        0.66435983172
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.7285894918200001,
      "stddev": 0.02128794291072698,
      "median": 0.7313096752200001,
      "user": 0.43457033999999994,
      "system": 1.3713139799999998,
      "min": 0.69616729072,
      "max": 0.7569910937200001,
      "times": [
        0.7537871807200001,
        0.71380945872,
        0.7380102417200001,
        0.69616729072,
        0.7084076327200001,
        0.74800022172,
        0.7258318367200001,
        0.7569910937200001,
        0.7081024477200001,
        0.7367875137200001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.7286225179200001,
      "stddev": 0.028921059671420456,
      "median": 0.71992558122,
      "user": 0.41748814,
      "system": 1.3861189799999998,
      "min": 0.70429402572,
      "max": 0.78338087672,
      "times": [
        0.7126600137200001,
        0.7272618537200001,
        0.70604182372,
        0.72719114872,
        0.7086859307200001,
        0.78338087672,
        0.70830983672,
        0.73128220472,
        0.70429402572,
        0.7771174647200001
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.989 ± 0.053 4.910 5.061 1.46 ± 0.06
pacquet@main 5.025 ± 0.052 4.944 5.110 1.47 ± 0.06
pnpr@HEAD 3.410 ± 0.141 3.232 3.637 1.00
pnpr@main 3.437 ± 0.119 3.242 3.588 1.01 ± 0.05
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.98902213478,
      "stddev": 0.0528545414494311,
      "median": 4.99382835258,
      "user": 4.08369926,
      "system": 3.41479158,
      "min": 4.90968125408,
      "max": 5.061285049079999,
      "times": [
        5.0090204390799995,
        4.98074539608,
        4.95286597308,
        4.97228803008,
        4.90968125408,
        4.915077762079999,
        5.028085830079999,
        5.0069113090799995,
        5.05426030508,
        5.061285049079999
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 5.02488055848,
      "stddev": 0.0524821294648333,
      "median": 5.008309302579999,
      "user": 4.0767767599999996,
      "system": 3.43447998,
      "min": 4.94406267908,
      "max": 5.110383113079999,
      "times": [
        5.0033791460799995,
        4.98568382908,
        5.074328643079999,
        5.110383113079999,
        4.94406267908,
        5.05413131308,
        5.00265662908,
        4.98069175608,
        5.08024901708,
        5.013239459079999
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.40950617668,
      "stddev": 0.1408394112472943,
      "median": 3.4374672225800005,
      "user": 3.00091956,
      "system": 3.2145221800000003,
      "min": 3.23175335208,
      "max": 3.63705840108,
      "times": [
        3.30521171008,
        3.53926583708,
        3.4294102690800004,
        3.46555693008,
        3.23175335208,
        3.2410998390800003,
        3.63705840108,
        3.44552417608,
        3.26959634408,
        3.5305849080800003
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.4373172277800004,
      "stddev": 0.11897390717177564,
      "median": 3.4595968270800004,
      "user": 2.99361536,
      "system": 3.21943878,
      "min": 3.2417522350800003,
      "max": 3.58770848708,
      "times": [
        3.58770848708,
        3.2673197760800003,
        3.3931655590800003,
        3.57913521008,
        3.2417522350800003,
        3.52409752708,
        3.4754831310800003,
        3.37363264708,
        3.44371052308,
        3.4871671820800003
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.474 ± 0.020 1.445 1.507 1.01 ± 0.02
pacquet@main 1.457 ± 0.010 1.444 1.472 1.00
pnpr@HEAD 1.518 ± 0.013 1.498 1.538 1.04 ± 0.01
pnpr@main 1.557 ± 0.040 1.521 1.638 1.07 ± 0.03
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.4736729969,
      "stddev": 0.01988275994138461,
      "median": 1.4725461172999998,
      "user": 1.48093824,
      "system": 1.74893644,
      "min": 1.4445979398,
      "max": 1.5068167927999998,
      "times": [
        1.4939646057999998,
        1.4852475297999999,
        1.4675453108,
        1.4760688868,
        1.4594067778,
        1.4858923128,
        1.4481664647999999,
        1.4690233477999999,
        1.4445979398,
        1.5068167927999998
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.4567829922999997,
      "stddev": 0.009725489404982754,
      "median": 1.4575337868,
      "user": 1.41337924,
      "system": 1.7513766400000002,
      "min": 1.4437291957999998,
      "max": 1.4723695918,
      "times": [
        1.4723695918,
        1.4484561688,
        1.4638862747999999,
        1.4637713267999999,
        1.4437291957999998,
        1.4496257838,
        1.4587093037999999,
        1.4451983188,
        1.4563582698,
        1.4657256887999999
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5177424932999999,
      "stddev": 0.013026551806215848,
      "median": 1.5174364627999999,
      "user": 0.6480081400000001,
      "system": 1.5933245399999998,
      "min": 1.4977605907999998,
      "max": 1.5383577197999998,
      "times": [
        1.5353325418,
        1.5383577197999998,
        1.5180746048,
        1.5141679938,
        1.5217263477999998,
        1.5106505008,
        1.4977605907999998,
        1.5010113587999998,
        1.5235449537999999,
        1.5167983207999998
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5569991043,
      "stddev": 0.039990690480012386,
      "median": 1.5378240927999998,
      "user": 0.62949044,
      "system": 1.6218846399999998,
      "min": 1.5209878698,
      "max": 1.6376384588,
      "times": [
        1.5800830897999998,
        1.6376384588,
        1.6139576618,
        1.5362554927999998,
        1.5294985657999998,
        1.5301853077999998,
        1.5393926928,
        1.5209878698,
        1.5343291857999999,
        1.5476627178
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 3.257 ± 0.064 3.182 3.403 2.11 ± 0.06
pacquet@main 3.247 ± 0.034 3.198 3.291 2.11 ± 0.04
pnpr@HEAD 1.542 ± 0.027 1.519 1.596 1.00
pnpr@main 1.542 ± 0.031 1.511 1.596 1.00 ± 0.03
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 3.25700590494,
      "stddev": 0.06398961006732744,
      "median": 3.25169131224,
      "user": 1.9978721,
      "system": 2.07206746,
      "min": 3.1819651227400003,
      "max": 3.40302433374,
      "times": [
        3.25694165874,
        3.24644096574,
        3.19668531374,
        3.26801062974,
        3.20627294774,
        3.2260747967400003,
        3.1819651227400003,
        3.40302433374,
        3.29104438774,
        3.29359889274
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 3.2470729066399997,
      "stddev": 0.03425593501701547,
      "median": 3.25205300524,
      "user": 1.9498722999999998,
      "system": 2.0743220599999996,
      "min": 3.19831519274,
      "max": 3.29089097674,
      "times": [
        3.22278056674,
        3.19831519274,
        3.21624277474,
        3.29089097674,
        3.2516849417400002,
        3.28885512374,
        3.2742954987400004,
        3.2693067297400003,
        3.25242106874,
        3.2059361927400003
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5419212412399999,
      "stddev": 0.026816789530662553,
      "median": 1.5312341222399999,
      "user": 0.6656525,
      "system": 1.6317052599999997,
      "min": 1.51925847474,
      "max": 1.59625729374,
      "times": [
        1.58337938174,
        1.53075359474,
        1.52531341574,
        1.53811584174,
        1.51947541774,
        1.59625729374,
        1.51925847474,
        1.5317146497399998,
        1.54807598174,
        1.5268683607399998
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5420977486400003,
      "stddev": 0.030830070337618636,
      "median": 1.53432625774,
      "user": 0.6209104,
      "system": 1.5954412599999999,
      "min": 1.5111745587399998,
      "max": 1.59558266674,
      "times": [
        1.5376447817399999,
        1.55412262674,
        1.59558266674,
        1.53500516574,
        1.59547340574,
        1.53364734974,
        1.52585459574,
        1.5111745587399998,
        1.51553799374,
        1.51693434174
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Jun 25, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/12643
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
4,989.02 ms
(+4.65%)Baseline: 4,767.28 ms
5,720.74 ms
(87.21%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
3,257.01 ms
(+7.10%)Baseline: 3,041.08 ms
3,649.30 ms
(89.25%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
1,473.67 ms
(+9.25%)Baseline: 1,348.95 ms
1,618.74 ms
(91.04%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
4,677.28 ms
(+0.09%)Baseline: 4,672.86 ms
5,607.43 ms
(83.41%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
671.47 ms
(+6.99%)Baseline: 627.61 ms
753.14 ms
(89.16%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Jun 25, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/12643
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
3,409.51 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
1,541.92 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
1,517.74 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
3,024.82 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
728.59 ms
🐰 View full continuous benchmarking report in Bencher

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 27e17c6

1 similar comment
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 27e17c6

@zkochan
zkochan added this pull request to the merge queue Jun 25, 2026
Merged via the queue into pnpm:main with commit 0d50197 Jun 25, 2026
32 checks passed
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 state: automerge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pacquet install can report up to date without writing the current lockfile

3 participants