Skip to content

fix(napi): respect in-memory manifest changes - #13488

Merged
zkochan merged 1 commit into
mainfrom
fix-napi
Jul 29, 2026
Merged

zkochan merged 1 commit into
mainfrom
fix-napi

Conversation

@zkochan

@zkochan zkochan commented Jul 29, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Disable the optimistic repeat-install shortcut for NAPI installs because its on-disk manifest timestamp cannot detect changes to caller-supplied manifests.
  • Continue through the normal lockfile freshness checks without writing the supplied manifest to package.json.
  • Add a regression test that changes the in-memory manifest between installs and verifies the new dependency is materialized while package.json remains unchanged.

This is specific to the NAPI embedding boundary. The TypeScript CLI reads its authoritative manifests from disk, so no corresponding TypeScript change is needed.

Squash Commit Body

NAPI consumers provide authoritative project manifests in memory. The optimistic repeat-install path uses package.json mtimes as its freshness signal, so it could report an install as already up to date when only the supplied manifest changed.

Disable that shortcut for NAPI installs so the normal lockfile freshness checks compare the supplied manifests and materialize newly requested dependencies. Rebuilds retain the existing fast-path behavior.

Validation

  • just ready (7,458 tests passed; 4 skipped)
  • Regression test was verified to fail with the old NAPI fast-path behavior.
  • JavaScript commit and pre-push hooks were unavailable in this worktree because commitlint and tsgo are not installed; no TypeScript files are changed.

Checklist

  • This is NAPI-specific; no TypeScript CLI port is needed.
  • Added a changeset for @pnpm/napi.
  • Added a regression test.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Bug Fixes
    • Repeat installs now recognize changes to in-memory project manifests.
    • Newly added dependencies are installed correctly on subsequent installs.
    • Install operations continue to respect lockfile freshness checks when needed.
    • In-memory manifest changes do not overwrite the project’s existing package.json.

Copilot AI review requested due to automatic review settings July 29, 2026 09:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@coderabbitai

coderabbitai Bot commented Jul 29, 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: 93b7650a-091c-49fa-bd9e-f1a30d6a24ce

📥 Commits

Reviewing files that changed from the base of the PR and between 95b1fd1 and 10e20f8.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock, !Cargo.lock
📒 Files selected for processing (4)
  • .changeset/fix-napi-in-memory-repeat-install.md
  • pnpm/crates/napi/Cargo.toml
  • pnpm/crates/napi/src/install.rs
  • pnpm/crates/napi/src/install/tests.rs

📝 Walkthrough

Walkthrough

NAPI install mode now disables the optimistic repeat-install fast path, ensuring changed caller-supplied in-memory manifests are processed. A regression test covers repeated installs, and a patch changeset plus test dependency support the fix.

Changes

NAPI repeat-install handling

Layer / File(s) Summary
Repeat-install mode selection
pnpm/crates/napi/src/install.rs
EngineMode now centralizes whether optimistic repeat installs are disabled, and normal NAPI installs use freshness checks like peer-issue queries.
Regression coverage and release support
pnpm/crates/napi/src/install/tests.rs, pnpm/crates/napi/Cargo.toml, .changeset/fix-napi-in-memory-repeat-install.md
The repeated-install test verifies updated in-memory dependencies are installed without rewriting package.json; test dependencies and a patch changeset are added.

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

Possibly related PRs

Suggested labels: product: pacquet

Suggested reviewers: copilot

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-napi

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

❤️ Share

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

@greptile-apps

greptile-apps Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge, with the changed in-memory manifests correctly flowing through existing freshness and resolution logic.

The NAPI install mode now bypasses both optimistic shortcuts, downstream freshness checks consume the caller-supplied manifest overrides, rebuild paths remain independently excluded from those shortcuts, and the regression test exercises the intended repeat-install behavior.

Reviews (1): Last reviewed commit: "fix(napi): respect in-memory manifest ch..." | Re-trigger Greptile

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jul 29, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.88%. Comparing base (627476d) to head (10e20f8).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13488      +/-   ##
==========================================
+ Coverage   87.76%   87.88%   +0.11%     
==========================================
  Files         549      549              
  Lines       95452    95455       +3     
==========================================
+ Hits        83778    83886     +108     
+ Misses      11674    11569     -105     

☔ 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

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                                            main                                   pr
-----                                            ----                                   --
lockfile/parse_pnpm_lock                         1.00     11.5±0.11ms    32.6 MB/sec    1.02     11.7±0.21ms    32.0 MB/sec
packument/parse                                  1.00     40.0±0.32µs  1658.8 MB/sec    1.00     40.2±0.81µs  1651.5 MB/sec
tarball/download_dependency                      1.01      3.0±0.15ms  1465.8 KB/sec    1.00      2.9±0.16ms  1474.1 KB/sec
tarball_batch/cold_store_many_medium_tarballs    1.00    176.7±0.98ms 90.6 KElem/sec    1.00    177.2±2.13ms 90.3 KElem/sec

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix NAPI repeat installs to respect in-memory manifest changes

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

Grey Divider

AI Description

• Disable the optimistic repeat-install shortcut for NAPI installs when manifests are supplied in
 memory.
• Ensure NAPI installs still run lockfile freshness checks without mutating on-disk package.json.
• Add a regression test proving manifest changes materialize new deps while package.json stays
 unchanged.
Diagram

graph TD
  A["NAPI caller (in-memory manifest)"] --> B["run_install_inner"] --> C{"Disable optimistic repeat-install?"} --> D["Lockfile freshness check"] --> E["Resolve + materialize deps"] --> F["node_modules"]
  C --> G["package.json mtime shortcut (skipped)"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Manifest-hash freshness signal (keep fast-path)
  • ➕ Preserves repeat-install performance while remaining correct for in-memory manifests
  • ➕ Avoids blanket disabling of the shortcut for all NAPI installs
  • ➖ Requires plumbing a stable manifest digest through the engine boundary
  • ➖ More complexity and potential cache-key pitfalls (normalization, ordering, defaults)
2. Persist in-memory manifest to disk before running install
  • ➕ Reuses existing mtime-based shortcut unchanged
  • ➕ Keeps freshness model consistent with CLI behavior
  • ➖ Violates the contract of not mutating caller projects (package.json changes)
  • ➖ Introduces risk around formatting/ordering and unintended diffs in user repos
3. Explicit caller-provided 'manifest_changed' flag
  • ➕ Minimal compute cost and can retain fast-path when safe
  • ➕ Simple decision logic inside pnpm
  • ➖ Shifts correctness burden to callers and increases API surface area
  • ➖ Easy to misuse and reintroduce the bug in downstream embeddings

Recommendation: The PR’s approach (disable the optimistic repeat-install shortcut for NAPI installs) is the best correctness-first fix with minimal API surface changes. It aligns with the NAPI contract (authoritative manifests in memory, no on-disk mutation) and is backed by a regression test. If performance becomes a concern, a follow-up can introduce a manifest-hash freshness signal to selectively re-enable the shortcut safely.

Files changed (5) +66 / -7

Bug fix (1) +12 / -4
install.rsDisable optimistic repeat-install for NAPI installs with in-memory manifests +12/-4

Disable optimistic repeat-install for NAPI installs with in-memory manifests

• Centralizes the decision to disable the optimistic repeat-install fast path based on EngineMode. Ensures both Install and PeerIssues modes bypass the mtime-based shortcut so lockfile freshness checks can observe in-memory manifest changes.

pnpm/crates/napi/src/install.rs

Tests (1) +46 / -2
tests.rsRegression test for repeat install after in-memory manifest change +46/-2

Regression test for repeat install after in-memory manifest change

• Adds a test that performs two installs with different in-memory manifests and verifies the newly added dependency is installed. Confirms package.json on disk remains unchanged to preserve the NAPI embedding contract.

pnpm/crates/napi/src/install/tests.rs

Documentation (1) +5 / -0
fix-napi-in-memory-repeat-install.mdAdd changeset for NAPI repeat-install correctness fix +5/-0

Add changeset for NAPI repeat-install correctness fix

• Introduces a patch changeset for @pnpm/napi documenting that repeat installs now respect caller-supplied in-memory manifest changes.

.changeset/fix-napi-in-memory-repeat-install.md

Other (2) +3 / -1
Cargo.lockLockfile update for new NAPI test utility dependency +1/-0

Lockfile update for new NAPI test utility dependency

• Updates the workspace Cargo.lock to include pacquet-testing-utils as a resolved dependency, matching the new dev-dependency used by NAPI tests.

Cargo.lock

Cargo.tomlAdd pacquet-testing-utils as NAPI dev-dependency +2/-1

Add pacquet-testing-utils as NAPI dev-dependency

• Adds pacquet-testing-utils under dev-dependencies to support registry-backed installation testing for the NAPI crate.

pnpm/crates/napi/Cargo.toml

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

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

Context used
✅ Compliance rules (platform): 24 rules

Grey Divider


Remediation recommended

1. Overbroad fast-path disable 🐞 Bug ➹ Performance
Description
disable_optimistic_repeat_install is set for all NAPI EngineMode::Install, but in the
package-manager this flag gates both the pre-lockfile optimistic repeat-install shortcut and the
later frozen-path no-op short-circuit. This means NAPI repeat installs may lose the cheaper frozen
no-op exit even when check_lockfile_freshness already validated the in-memory manifests against
the lockfile, increasing repeat-install work unnecessarily.
Code

pnpm/crates/napi/src/install.rs[407]

+                disable_optimistic_repeat_install: mode.disable_optimistic_repeat_install(),
Relevance

⭐⭐⭐ High

Team often preserves fast paths instead of broadly disabling; accepted similar fast-path-conserving
fixes before.

PR-#13144
PR-#13173
PR-#13469

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The NAPI change sets disable_optimistic_repeat_install for install mode. In the package-manager,
that same field is used to gate both the mtime-based optimistic repeat-install check and the later
frozen-path no-op short-circuit; the latter is only reachable after check_lockfile_freshness(...)
has already validated manifests against the lockfile, so disabling it for NAPI is broader than
required for the in-memory-manifest correctness fix and can add repeat-install overhead.

pnpm/crates/napi/src/install.rs[234-252]
pnpm/crates/napi/src/install.rs[367-418]
pnpm/crates/package-manager/src/install.rs[972-1064]
pnpm/crates/package-manager/src/install.rs[1403-1474]
pnpm/crates/package-manager/src/install.rs[1522-1530]
pnpm/crates/package-manager/src/install.rs[1749-1786]
PR-#13144

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

## Issue description
`disable_optimistic_repeat_install` is being used as a single kill-switch, but downstream it disables **two distinct** short-circuits:
1) the **pre-lockfile** optimistic repeat-install check (mtime-based), and
2) the **frozen-path no-op** short-circuit (after lockfile freshness has been checked).

For NAPI, we need to disable (1) because mtimes can’t reflect caller-supplied in-memory manifest changes, but we likely want to keep (2) because it only applies after `check_lockfile_freshness(...)` has already proven lockfile/manifests consistency.

## Issue Context
NAPI sets `disable_optimistic_repeat_install` for `EngineMode::Install`, which disables both fast paths in `pnpm/crates/package-manager/src/install.rs`.

## Fix Focus Areas
- pnpm/crates/napi/src/install.rs[247-251]
- pnpm/crates/napi/src/install.rs[402-410]
- pnpm/crates/package-manager/src/install.rs[1047-1063]
- pnpm/crates/package-manager/src/install.rs[1403-1474]
- pnpm/crates/package-manager/src/install.rs[1522-1530]
- pnpm/crates/package-manager/src/install.rs[1749-1755]

## Suggested implementation direction
- In `pacquet_package_manager::Install` (package-manager crate), split the single boolean into two flags, e.g.:
 - `disable_optimistic_repeat_install_prelockfile` (gates only the `check_optimistic_repeat_install(...)` early exit)
 - `disable_frozen_noop_shortcircuit` (gates only the later frozen no-op up-to-date exit)
- Update existing call sites (CLI, pnpr, etc.) to preserve current behavior by setting both flags from the old value.
- In NAPI:
 - set `disable_optimistic_repeat_install_prelockfile = true` for `EngineMode::Install`
 - keep `disable_frozen_noop_shortcircuit = false` so unchanged repeats can still exit quickly after freshness validation.
- Add/adjust a regression test if needed to assert a second NAPI install with *unchanged* in-memory manifest can still take the no-op path (e.g., by asserting no relinking/side-effect markers or by observing the up-to-date log if surfaced).

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



Informational

2. Changeset missing pnpm entry 📘 Rule violation § Compliance
Description
The new changeset lists only @pnpm/napi and omits the required pnpm package entry, which
violates the changeset declaration policy. This can cause the pnpm release bump/type to be missing
or inconsistent with the repository’s release process.
Code

.changeset/fix-napi-in-memory-repeat-install.md[R1-3]

+---
+"@pnpm/napi": patch
+---
Relevance

⭐ Low

Similar “missing pnpm entry in changeset” suggestions were repeatedly rejected in merged PRs.

PR-#13406
PR-#13408
PR-#12981

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 713436 requires changeset front-matter to include an entry for the pnpm package
with a valid bump type. The added changeset front-matter includes only @pnpm/napi and has no
pnpm entry.

Rule 713436: Explicitly declare pnpm package and correct bump type in changesets
.changeset/fix-napi-in-memory-repeat-install.md[1-3]

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

## Issue description
The changeset file does not include a `pnpm` entry in its front-matter, which is required by the compliance checklist.

## Issue Context
A new changeset was added for this PR, but it only declares `@pnpm/napi`.

## Fix Focus Areas
- .changeset/fix-napi-in-memory-repeat-install.md[1-3]

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


Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

No code suggestions found for the PR.

@github-actions

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 10e20f8a9671

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

The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time).

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.628 ± 0.143 2.433 2.838 1.69 ± 0.16
pacquet@main 2.550 ± 0.145 2.366 2.744 1.64 ± 0.16
pnpr@HEAD 1.596 ± 0.123 1.395 1.739 1.03 ± 0.11
pnpr@main 1.555 ± 0.121 1.415 1.745 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.6278164299799998,
      "stddev": 0.1426492633197849,
      "median": 2.62181625788,
      "user": 1.78133486,
      "system": 1.4126015799999998,
      "min": 2.4330025168800002,
      "max": 2.83821898888,
      "times": [
        2.4577467468800003,
        2.4330025168800002,
        2.59904107788,
        2.83821898888,
        2.52173310388,
        2.5422245338800002,
        2.76001080088,
        2.8089885748800003,
        2.64459143788,
        2.6726065178800003
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.5498895682800002,
      "stddev": 0.1449652001719302,
      "median": 2.50946013038,
      "user": 1.8238563600000002,
      "system": 1.41885138,
      "min": 2.36625849788,
      "max": 2.7441071638800003,
      "times": [
        2.49743513588,
        2.36625849788,
        2.7441071638800003,
        2.7328618058800003,
        2.6714510428800002,
        2.45500767888,
        2.68238294088,
        2.37956900288,
        2.44833728888,
        2.5214851248800003
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.59626194788,
      "stddev": 0.12338392617739953,
      "median": 1.6344032778800002,
      "user": 1.2667945600000003,
      "system": 1.3071914799999997,
      "min": 1.3951411818800001,
      "max": 1.7389796458800002,
      "times": [
        1.3951411818800001,
        1.6762804288800002,
        1.73302680688,
        1.7389796458800002,
        1.61701253788,
        1.4320500438800001,
        1.6517940178800001,
        1.4723108748800002,
        1.6666692048800003,
        1.57935473588
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5545856369800002,
      "stddev": 0.12097785415562708,
      "median": 1.5219606703800002,
      "user": 1.23163996,
      "system": 1.26046518,
      "min": 1.41469496688,
      "max": 1.74459710088,
      "times": [
        1.41469496688,
        1.74459710088,
        1.50609261588,
        1.6897685508800002,
        1.4386884638800002,
        1.47787487388,
        1.5654923148800002,
        1.7154177818800003,
        1.4554009758800002,
        1.5378287248800002
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 286.6 ± 6.3 279.4 301.7 1.04 ± 0.04
pacquet@main 276.7 ± 9.8 267.7 294.8 1.00
pnpr@HEAD 299.8 ± 7.8 285.0 310.9 1.08 ± 0.05
pnpr@main 289.5 ± 12.3 262.9 310.7 1.05 ± 0.06
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.28657725118000005,
      "stddev": 0.0063057560025186424,
      "median": 0.28459743568000007,
      "user": 0.22972969999999998,
      "system": 0.5764508599999999,
      "min": 0.27942558918000004,
      "max": 0.30168456218,
      "times": [
        0.29129345918000005,
        0.30168456218,
        0.28845087318,
        0.28712802518,
        0.28353006818000004,
        0.28498608618000004,
        0.27942558918000004,
        0.28146407218,
        0.28420878518000003,
        0.28360099118000004
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.27670766658,
      "stddev": 0.009788697081450545,
      "median": 0.27414006368,
      "user": 0.2232317,
      "system": 0.55722286,
      "min": 0.26772574418,
      "max": 0.29479720918,
      "times": [
        0.26898610418,
        0.26772574418,
        0.27572375518000003,
        0.29479720918,
        0.27505270318,
        0.26923714618,
        0.26787033518000003,
        0.27322742418,
        0.29067429118000004,
        0.28378195318000005
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.29975353798,
      "stddev": 0.007821788321352292,
      "median": 0.29897358018000003,
      "user": 0.25703789999999993,
      "system": 0.56293346,
      "min": 0.28501611518000003,
      "max": 0.31094610218,
      "times": [
        0.29453274118,
        0.30136391218,
        0.29601064018,
        0.30032857418000003,
        0.30777002618000004,
        0.29761858618000003,
        0.30850435718,
        0.29544432518,
        0.28501611518000003,
        0.31094610218
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.28945220768,
      "stddev": 0.012260014015713111,
      "median": 0.29020149868,
      "user": 0.24036559999999998,
      "system": 0.55067886,
      "min": 0.26290469218,
      "max": 0.31072218018000003,
      "times": [
        0.28404574918000003,
        0.28364746018000003,
        0.26290469218,
        0.29102128418,
        0.29354867818,
        0.29886637318000003,
        0.28674993618,
        0.31072218018000003,
        0.28938171318,
        0.29363401018
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.864 ± 0.034 2.792 2.900 1.77 ± 0.20
pacquet@main 2.885 ± 0.048 2.826 2.978 1.79 ± 0.20
pnpr@HEAD 1.614 ± 0.177 1.441 1.858 1.00
pnpr@main 1.634 ± 0.175 1.445 1.879 1.01 ± 0.16
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.8636425490200006,
      "stddev": 0.03381756360710606,
      "median": 2.86874816152,
      "user": 1.9247815,
      "system": 1.43925964,
      "min": 2.79248262552,
      "max": 2.89999139752,
      "times": [
        2.87422962752,
        2.8985471475200004,
        2.8531499685200004,
        2.85377104352,
        2.89701510852,
        2.8739742605200003,
        2.82974224852,
        2.89999139752,
        2.8635220625200004,
        2.79248262552
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.88455555122,
      "stddev": 0.048451205040624716,
      "median": 2.8793087075200003,
      "user": 1.9792855999999996,
      "system": 1.43363364,
      "min": 2.8261990695200003,
      "max": 2.9781095045200003,
      "times": [
        2.8763898565200003,
        2.8261990695200003,
        2.8550069495200003,
        2.9781095045200003,
        2.8822275585200003,
        2.8610753405200002,
        2.8881524885200003,
        2.95083034552,
        2.83057855952,
        2.89698583952
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.61437788892,
      "stddev": 0.17698114774678325,
      "median": 1.51410772802,
      "user": 1.151193,
      "system": 1.2468900399999998,
      "min": 1.44087661652,
      "max": 1.8583607815199998,
      "times": [
        1.53076464052,
        1.48940055652,
        1.84024446852,
        1.8583607815199998,
        1.49745081552,
        1.69935105652,
        1.44087661652,
        1.84928370952,
        1.48157770352,
        1.45646854052
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.63413023942,
      "stddev": 0.17521686822086713,
      "median": 1.62200868452,
      "user": 1.1050271999999999,
      "system": 1.26395104,
      "min": 1.44492371352,
      "max": 1.87910374652,
      "times": [
        1.4567980105199998,
        1.59861629152,
        1.64540107752,
        1.8501854175199999,
        1.75277560852,
        1.44492371352,
        1.45505890752,
        1.79473583352,
        1.4637037875199999,
        1.87910374652
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 670.7 ± 21.6 640.9 705.7 2.15 ± 0.10
pacquet@main 638.0 ± 19.8 615.9 664.1 2.05 ± 0.09
pnpr@HEAD 311.9 ± 10.1 302.0 337.6 1.00
pnpr@main 312.6 ± 8.3 303.0 325.1 1.00 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.6707313086,
      "stddev": 0.021597658779456633,
      "median": 0.6662633393,
      "user": 0.7972902600000001,
      "system": 0.7409402399999999,
      "min": 0.6409008793000001,
      "max": 0.7056687173,
      "times": [
        0.6508904183,
        0.6689892493,
        0.6510254123,
        0.6409008793000001,
        0.6610358623,
        0.7001967493000001,
        0.6635374293,
        0.6802921793000001,
        0.6847761893000001,
        0.7056687173
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.6379709860000001,
      "stddev": 0.01984668427164648,
      "median": 0.6338526998,
      "user": 0.78564706,
      "system": 0.68385574,
      "min": 0.6158612963000001,
      "max": 0.6640730063,
      "times": [
        0.6169178653,
        0.6158612963000001,
        0.6619017513000001,
        0.6640730063,
        0.6561484333000001,
        0.6539933973000001,
        0.6238807583,
        0.6215493813,
        0.6215593293,
        0.6438246413000001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.31193756990000004,
      "stddev": 0.010103513390517899,
      "median": 0.31104067280000003,
      "user": 0.21478556,
      "system": 0.5305118400000001,
      "min": 0.3019974693,
      "max": 0.3375533423,
      "times": [
        0.3136013473,
        0.3153468123,
        0.3060301483,
        0.3019974693,
        0.3375533423,
        0.3054243383,
        0.30403709830000003,
        0.3133037973,
        0.3092868673,
        0.3127944783
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.3125862898,
      "stddev": 0.008281375336024637,
      "median": 0.30854998629999997,
      "user": 0.22181756,
      "system": 0.5198843400000001,
      "min": 0.30295298730000003,
      "max": 0.3250839773,
      "times": [
        0.30528199030000003,
        0.3057724733,
        0.3077771463,
        0.3087598163,
        0.3171589923,
        0.3250839773,
        0.3228131123,
        0.3083401563,
        0.3219222463,
        0.30295298730000003
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.950 ± 0.028 1.895 1.981 6.28 ± 0.16
pacquet@main 1.946 ± 0.035 1.907 2.009 6.27 ± 0.18
pnpr@HEAD 0.313 ± 0.010 0.300 0.333 1.01 ± 0.04
pnpr@main 0.310 ± 0.007 0.303 0.322 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.95022460344,
      "stddev": 0.027644800603389745,
      "median": 1.95179004084,
      "user": 1.0190901399999999,
      "system": 0.7857288199999999,
      "min": 1.89463263484,
      "max": 1.98123714584,
      "times": [
        1.96180351784,
        1.94177656384,
        1.92905598584,
        1.9337650878400001,
        1.96904836684,
        1.89463263484,
        1.93828081584,
        1.98123714584,
        1.98091464884,
        1.97173126684
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.9455311434400002,
      "stddev": 0.03484893540008934,
      "median": 1.93983206484,
      "user": 0.99859904,
      "system": 0.7517700199999999,
      "min": 1.90723082384,
      "max": 2.00853820384,
      "times": [
        1.9894088538399999,
        1.93550022284,
        1.90723082384,
        1.9085315308400002,
        1.96985436384,
        1.92142197984,
        1.9164158178400001,
        1.95424573084,
        2.00853820384,
        1.9441639068399998
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.31264482674000005,
      "stddev": 0.009570583923176956,
      "median": 0.31364100134,
      "user": 0.20522723999999998,
      "system": 0.53002782,
      "min": 0.29991191484,
      "max": 0.33272246084,
      "times": [
        0.31004059584000004,
        0.33272246084,
        0.31777784684000004,
        0.31738145084,
        0.30188434684000004,
        0.31386243784,
        0.29991191484,
        0.30386611584,
        0.31558153284,
        0.31341956484
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.31048108494000004,
      "stddev": 0.006842898136435598,
      "median": 0.30840018934,
      "user": 0.21446983999999997,
      "system": 0.53451882,
      "min": 0.30297155284000005,
      "max": 0.32236459884,
      "times": [
        0.32236459884,
        0.32200993084,
        0.30838261584000004,
        0.30571700884,
        0.31166443184000003,
        0.30297155284000005,
        0.30604761184,
        0.31258907184,
        0.30464626384000004,
        0.30841776284
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 444.5 ± 39.2 367.6 504.6 4.80 ± 0.44
pacquet@main 404.7 ± 26.5 351.1 445.2 4.37 ± 0.31
pnpr@HEAD 93.5 ± 2.8 88.2 101.4 1.01 ± 0.04
pnpr@main 92.7 ± 2.6 89.7 100.2 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.44451122614000005,
      "stddev": 0.03919786313886473,
      "median": 0.43972516524000005,
      "user": 0.43621635999999997,
      "system": 0.06879832,
      "min": 0.36762330224000006,
      "max": 0.50458469624,
      "times": [
        0.36762330224000006,
        0.4480969912400001,
        0.48333593024000004,
        0.44242297924000007,
        0.50458469624,
        0.48507555324000007,
        0.43702735124000003,
        0.42863606824000006,
        0.42479932224000005,
        0.42351006724000007
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.4046694055400001,
      "stddev": 0.02646909065458799,
      "median": 0.4085849302400001,
      "user": 0.39614755999999995,
      "system": 0.06086221999999999,
      "min": 0.35105786524000004,
      "max": 0.44519627524000005,
      "times": [
        0.35105786524000004,
        0.38278076124000004,
        0.38685453424000005,
        0.4039563292400001,
        0.41384823424000006,
        0.44519627524000005,
        0.41321353124000004,
        0.40077275124000006,
        0.4285325132400001,
        0.42048126024000004
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.09354042865379313,
      "stddev": 0.0028328720893778005,
      "median": 0.09249584924000001,
      "user": 0.024048284137931038,
      "system": 0.011541040689655169,
      "min": 0.08818540124,
      "max": 0.10142095524,
      "times": [
        0.09721790024,
        0.09499138224,
        0.09291220124,
        0.09457884624,
        0.09720136924,
        0.09656663624,
        0.09742848624,
        0.09394275024000001,
        0.09797044524000001,
        0.09154406824,
        0.09075610724000001,
        0.10142095524,
        0.09329572324,
        0.09244366124,
        0.09233661924,
        0.09193742824000001,
        0.09061101424000001,
        0.09132727024000001,
        0.09212367924,
        0.09222624224,
        0.09124913324,
        0.09249584924000001,
        0.09191629824,
        0.09104554024,
        0.09575083124,
        0.08818540124,
        0.09418915424,
        0.09139325524,
        0.09361418224000001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.09266063678838711,
      "stddev": 0.0026469523163262657,
      "median": 0.09178107424000001,
      "user": 0.02281865677419355,
      "system": 0.011713392903225804,
      "min": 0.08966079624,
      "max": 0.10017443124,
      "times": [
        0.09228480124,
        0.08975582624,
        0.09137855724,
        0.09065897324000001,
        0.09025839124,
        0.09265878524,
        0.09010498124,
        0.09168460224000001,
        0.10017443124,
        0.08966079624,
        0.09093916024000001,
        0.09385619724000001,
        0.09051175724,
        0.09218710824000001,
        0.09162187524000001,
        0.09208285124,
        0.08985688624,
        0.09178107424000001,
        0.09598702524000001,
        0.09652817224,
        0.09515062224000001,
        0.09144003324000001,
        0.09296746624,
        0.09115588824000001,
        0.09174574824000001,
        0.09218714824,
        0.09553264124000001,
        0.09360610724,
        0.09951686424,
        0.09413198624,
        0.09107298224
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.648 ± 0.143 4.464 4.919 1.31 ± 0.05
pacquet@main 4.570 ± 0.074 4.489 4.741 1.28 ± 0.03
pnpr@HEAD 3.559 ± 0.067 3.455 3.661 1.00
pnpr@main 3.568 ± 0.107 3.465 3.828 1.00 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.64807544202,
      "stddev": 0.1428004282724939,
      "median": 4.686675043819999,
      "user": 2.0697967000000004,
      "system": 1.51980784,
      "min": 4.46383933832,
      "max": 4.919214558319999,
      "times": [
        4.52254375032,
        4.919214558319999,
        4.68917786932,
        4.69291191632,
        4.550297832319999,
        4.68417221832,
        4.75104985632,
        4.46383933832,
        4.7287093013199994,
        4.47883777932
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.570141945319999,
      "stddev": 0.07429404038147909,
      "median": 4.5484312633199995,
      "user": 2.0534545,
      "system": 1.50671354,
      "min": 4.489498462319999,
      "max": 4.741382155319999,
      "times": [
        4.741382155319999,
        4.62399589932,
        4.55117792932,
        4.6165149333199995,
        4.56897176932,
        4.500965583319999,
        4.489498462319999,
        4.545684597319999,
        4.525063225319999,
        4.53816489832
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.55943800722,
      "stddev": 0.06741959769584202,
      "median": 3.56183408582,
      "user": 1.3455783999999997,
      "system": 1.30979364,
      "min": 3.45518734532,
      "max": 3.66067507832,
      "times": [
        3.52569363332,
        3.45518734532,
        3.58988112032,
        3.50128312032,
        3.57057780832,
        3.55309036332,
        3.5787176943200003,
        3.66023449932,
        3.49903940932,
        3.66067507832
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.5680924708200004,
      "stddev": 0.10716956940869002,
      "median": 3.53024946282,
      "user": 1.4127309000000001,
      "system": 1.37643664,
      "min": 3.46482859932,
      "max": 3.82838501132,
      "times": [
        3.54127879732,
        3.51865789032,
        3.46482859932,
        3.63112087532,
        3.60630581032,
        3.49837288932,
        3.59594077532,
        3.51922012832,
        3.82838501132,
        3.47681393132
      ]
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13488
Testbedpacquet
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,792.48 ms
(-1.57%)Baseline: 2,837.11 ms
3,404.53 ms
(82.02%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,894.63 ms
(-4.81%)Baseline: 1,990.42 ms
2,388.50 ms
(79.32%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
640.90 ms
(-3.51%)Baseline: 664.20 ms
797.04 ms
(80.41%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
367.62 ms
(-9.66%)Baseline: 406.95 ms
488.34 ms
(75.28%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,433.00 ms
(-0.19%)Baseline: 2,437.54 ms
2,925.04 ms
(83.18%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,463.84 ms
(-1.51%)Baseline: 4,532.06 ms
5,438.47 ms
(82.08%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
279.43 ms
(-3.20%)Baseline: 288.67 ms
346.40 ms
(80.67%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13488
Testbedpnpr

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

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

Click to view all benchmark results
BenchmarkLatencymilliseconds (ms)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,440.88 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
299.91 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
302.00 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
88.19 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,395.14 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,455.19 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
285.02 ms
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit 0ae2001 into main Jul 29, 2026
35 checks passed
@zkochan
zkochan deleted the fix-napi branch July 29, 2026 10:14
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.

3 participants