Skip to content

feat(pacquet): complete runtime installation parity - #13157

Merged
zkochan merged 4 commits into
mainfrom
stage-8
Jul 19, 2026
Merged

zkochan merged 4 commits into
mainfrom
stage-8

Conversation

@zkochan

@zkochan zkochan commented Jul 19, 2026 •

Copy link
Copy Markdown
Member

Summary

Completes Stage 8 of #13146 by bringing pacquet's runtime installation behavior into parity with the TypeScript CLI.

  • threads runtimeOnFail, nodeDownloadMirrors, runtime-derived Node versions, and dependency engines.runtime declarations through resolution and installation
  • selects runtime archive variants from supportedArchitectures and preserves the selected target through virtual-store installation
  • adds hermetic local-HTTP coverage for Node.js, Deno, and Bun cold/offline installs, integrity failures, release channels, target architectures, dependency runtimes, and failure policies
  • preserves explicit runtime dependencies for unmatched engine entries in both the TypeScript and Rust implementations
  • synthesizes transitive runtime edges without cloning full dependency manifests in the resolver hot path

The TypeScript implementation already provides the Stage 8 behaviors; this PR implements the corresponding Rust pacquet behavior and keeps the shared override behavior aligned across both stacks.

Related to #13146.

Squash Commit Body

Complete pacquet runtime installation parity for Node.js, Deno, and Bun.

Thread runtime failure policy, Node download mirrors, and runtime-derived Node versions through configuration and installation. Select runtime archive variants from supportedArchitectures and resolve engines.runtime declarations on dependency manifests without cloning full manifests in the resolver hot path.

Preserve explicit runtime dependencies for unmatched engine entries in both the TypeScript and Rust implementations. Add hermetic local-HTTP coverage for cold and offline reinstall, integrity failures, release channels, target architectures, dependency runtimes, and runtimeOnFail flows.

Completes Stage 8 of pnpm/pnpm#13146.

Checklist

  • The change is implemented in both the TypeScript CLI and the Rust
    pnpm/ port, or the description notes what still needs porting.
  • Added a changeset (pnpm changeset) if this PR changes any published
    package. Keep it short and written for pnpm users — it becomes a release note.
  • Added or updated tests.
  • Updated the documentation if needed.

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

Copilot AI review requested due to automatic review settings July 19, 2026 19:38

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 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@zkochan, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 seconds

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4a132b33-86e4-4e15-b587-f7a5f42833b6

📥 Commits

Reviewing files that changed from the base of the PR and between b25e845 and 8a4a789.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock, !Cargo.lock
📒 Files selected for processing (26)
  • .changeset/complete-runtime-installation-port.md
  • pnpm/crates/cli/Cargo.toml
  • pnpm/crates/cli/src/cli_args/pipelines.rs
  • pnpm/crates/cli/src/state.rs
  • pnpm/crates/cli/tests/install_runtimes.rs
  • pnpm/crates/config/src/env_overlay.rs
  • pnpm/crates/config/src/lib.rs
  • pnpm/crates/config/src/tests.rs
  • pnpm/crates/config/src/workspace_yaml.rs
  • pnpm/crates/package-manager/src/add.rs
  • pnpm/crates/package-manager/src/create_virtual_store.rs
  • pnpm/crates/package-manager/src/create_virtual_store/tests.rs
  • pnpm/crates/package-manager/src/install.rs
  • pnpm/crates/package-manager/src/install_frozen_lockfile.rs
  • pnpm/crates/package-manager/src/install_package_by_snapshot.rs
  • pnpm/crates/package-manager/src/install_package_by_snapshot/tests.rs
  • pnpm/crates/package-manager/src/install_package_from_registry/tests.rs
  • pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs
  • pnpm/crates/package-manifest/Cargo.toml
  • pnpm/crates/package-manifest/src/lib.rs
  • pnpm/crates/package-manifest/src/tests.rs
  • pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs
  • pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree/tests.rs
  • pnpm/plans/TEST_PORTING.md
  • pnpm11/pkg-manifest/utils/src/convertEnginesRuntimeToDependencies.ts
  • pnpm11/pkg-manifest/utils/test/convertEnginesRuntimeToDependencies.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch stage-8

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

❤️ Share

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

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Pacquet: parity for runtime installs (onFail, Node mirrors, arch variants) + tests

✨ Enhancement 🧪 Tests ⚙️ Configuration changes 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Add runtimeOnFail/nodeDownloadMirrors config and apply overrides during manifest loading.
• Select runtime variants via supportedArchitectures and preserve target through virtual-store
 installs.
• Add hermetic CLI tests for Node/Deno/Bun installs, offline reinstalls, integrity failures.
Diagram

graph TD
  cfg[/"Config (yaml/env)"/] --> cli["CLI manifest loading"] --> mani["Manifest runtime policy"] --> res["Dependency resolver"] --> inst["Installer + variant select"] --> store[("CAS + store index")]
  cfg --> inst
  tests(["Hermetic runtime tests"]) --> cli
  subgraph Legend
    direction LR
    _cfg[/"Config"/] ~~~ _mod["Module" ] ~~~ _test(["Tests"]) ~~~ _db[("Store")]
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Resolve variations to a concrete binary at lockfile write-time
  • ➕ Eliminates platform selection during install; simpler virtual-store cache-key logic
  • ➕ Avoids mismatches between warm-cache key derivation and cold-path selection
  • ➖ Less flexible for cross-platform workflows (e.g., generating a lockfile for multiple targets)
  • ➖ Requires lockfile format/semantics changes and migration considerations
2. Centralize runtimeOnFail application exclusively in manifest reader layer
  • ➕ Single source of truth for onFail override application (reduces CLI duplication)
  • ➕ Ensures all call sites (CLI, workspace discovery, ad-hoc loads) behave identically
  • ➖ May require refactoring crate boundaries/APIs if CLI currently owns certain manifest lifecycles
  • ➖ Harder to handle "create empty manifest" cases without CLI context

Recommendation: The PR’s approach is appropriate for parity: it threads runtimeOnFail, nodeDownloadMirrors, derived Node version, and supportedArchitectures through existing install/resolution layers without lockfile format changes, and it strengthens correctness via hermetic end-to-end CLI tests. Alternatives were considered, but would either require broader lockfile semantics changes or a larger refactor of manifest-loading boundaries.

Files changed (25) +1020 / -76

Enhancement (11) +252 / -33
pipelines.rsApply runtimeOnFail override to discovered workspace project manifests +9/-1

Apply runtimeOnFail override to discovered workspace project manifests

• Threads config.runtime_on_fail into workspace project discovery. Mutates each loaded project manifest to apply the runtime onFail policy override before project selection proceeds.

pnpm/crates/cli/src/cli_args/pipelines.rs

state.rsApply runtimeOnFail override when loading or creating root manifest +19/-3

Apply runtimeOnFail override when loading or creating root manifest

• Wraps manifest load/create paths to apply the runtimeOnFail override consistently, including the empty-manifest workspace fallback. Centralizes override logic in a helper for reuse.

pnpm/crates/cli/src/state.rs

lib.rsIntroduce RuntimeOnFail and config fields for runtime policy + Node mirrors +35/-0

Introduce RuntimeOnFail and config fields for runtime policy + Node mirrors

• Adds RuntimeOnFail enum with string mapping. Extends Config with runtime_on_fail override and node_download_mirrors map for per-channel Node download sources.

pnpm/crates/config/src/lib.rs

add.rsThread nodeDownloadMirrors into Node runtime resolver for 'pnpm add' +1/-0

Thread nodeDownloadMirrors into Node runtime resolver for 'pnpm add'

• Copies config.node_download_mirrors into NodeResolver before resolving Node runtime specifiers. Ensures release-channel mirror selection is honored during add flows.

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

create_virtual_store.rsPreserve runtime target selection through virtual-store caching and installs +26/-9

Preserve runtime target selection through virtual-store caching and installs

• Adds supported_architectures to CreateVirtualStore and derives a runtime_platform_selector from it. Uses that selector for both snapshot cache keys (warm/cold partitioning) and per-snapshot installs, ensuring variations choose the intended runtime archive variant consistently.

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

install.rsDerive effective nodeVersion from engines.runtime and thread into install paths +9/-1

Derive effective nodeVersion from engines.runtime and thread into install paths

• Computes an effective Node version using explicit config.node_version or a minimum derived from manifest engines/devEngines runtime entries. Passes this node_version into both frozen-lockfile and fresh-lockfile install flows.

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

install_frozen_lockfile.rsUse effective nodeVersion when building installability host in frozen installs +7/-1

Use effective nodeVersion when building installability host in frozen installs

• Adds node_version to InstallFrozenLockfile inputs and uses it instead of config.node_version for host construction and engine checks. Ensures runtime-derived Node version participates in installability decisions.

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

install_package_by_snapshot.rsSelect runtime variations using a configurable runtime platform selector +45/-13

Select runtime variations using a configurable runtime platform selector

• Threads a runtime_platform_selector through InstallPackageBySnapshot and uses it when selecting a variant from LockfileResolution::Variations. Improves the no-matching-variant error to report the selected target, and adds a helper to derive the selector from supportedArchitectures (including "current").

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

install_with_fresh_lockfile.rsHonor Node mirrors and runtime-derived nodeVersion during fresh-lockfile installs +7/-1

Honor Node mirrors and runtime-derived nodeVersion during fresh-lockfile installs

• Threads node_version through InstallWithFreshLockfile and uses it for host construction and engine strictness handling. Copies config.node_download_mirrors into NodeResolver so release-channel mirror behavior matches the TS CLI.

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

lib.rsAdd runtimeOnFail override logic and derive Node minimum version from runtime engines +82/-1

Add runtimeOnFail override logic and derive Node minimum version from runtime engines

• Trims whitespace in runtime version strings when reifying runtime dependencies. Adds apply_runtime_on_fail_override to force manifest runtime onFail policy and optionally remove synthesized runtime: deps. Introduces node_version_from_engines_runtime to compute a minimum Node version from devEngines/engines runtime ranges.

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

resolve_dependency_tree.rsTreat dependency engines.runtime as runtime dependencies during tree walk +12/-3

Treat dependency engines.runtime as runtime dependencies during tree walk

• When a dependency manifest declares engines.runtime, clones the manifest and converts engines.runtime into dependencies before collecting children. Ensures runtime engines on dependencies can introduce runtime: dependencies into resolution, matching TS behavior.

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

Tests (7) +713 / -9
install_runtimes.rsAdd hermetic CLI tests for Node/Deno/Bun runtime installs and policies +548/-0

Add hermetic CLI tests for Node/Deno/Bun runtime installs and policies

• Adds a comprehensive local-HTTP test suite covering cold install, offline reinstall, missing-offline failures, integrity failures, release-channel mirrors, target architecture selection, dependency engines.runtime reification, and runtimeOnFail behaviors. Builds tar/zip runtime fixtures and validates bin linking and Node extra stripping.

pnpm/crates/cli/tests/install_runtimes.rs

tests.rsTest runtimeOnFail parsing from workspace YAML +8/-0

Test runtimeOnFail parsing from workspace YAML

• Adds a unit test verifying runtimeOnFail: download is parsed into Config.runtime_on_fail correctly.

pnpm/crates/config/src/tests.rs

tests.rsUpdate virtual-store tests for platform-aware snapshot cache keys +7/-5

Update virtual-store tests for platform-aware snapshot cache keys

• Adjusts tests to pass a PlatformSelector into snapshot_cache_key and to provide supported_architectures on CreateVirtualStore. Keeps coverage aligned with the new runtime selector threading.

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

tests.rsTest runtime platform selector behavior and update snapshot install harnesses +24/-2

Test runtime platform selector behavior and update snapshot install harnesses

• Adds coverage for runtime_platform_selector choosing the first configured targets and expanding "current" to host libc. Updates existing tests to provide the required runtime_platform_selector parameter.

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

tests.rsExtend test config fixtures with new runtime fields +2/-0

Extend test config fixtures with new runtime fields

• Updates test-only Config construction to include runtime_on_fail and node_download_mirrors defaults, keeping compilation and behavior consistent with the expanded Config struct.

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

tests.rsAdd unit tests for runtime version trimming, onFail overrides, and Node min-version derivation +89/-1

Add unit tests for runtime version trimming, onFail overrides, and Node min-version derivation

• Adds tests ensuring runtime version strings are trimmed, runtimeOnFail=download reifies runtime deps, runtimeOnFail=ignore removes only synthesized runtime: deps, and node_version_from_engines_runtime respects precedence and range minimums.

pnpm/crates/package-manifest/src/tests.rs

tests.rsTest that engines.runtime is converted into walked runtime dependencies +35/-1

Test that engines.runtime is converted into walked runtime dependencies

• Adds a focused test for extract_children verifying that a dependency engines.runtime node entry produces a runtime: dependency edge for Node.

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

Documentation (2) +30 / -31
complete-runtime-installation-port.mdAdd pacquet release note for runtime-install parity +5/-0

Add pacquet release note for runtime-install parity

• Introduces a changeset marking a minor bump for pacquet. Documents runtime installation parity for Node.js, Deno, and Bun, including failure policy, architecture selection, and dependency runtime engines.

.changeset/complete-runtime-installation-port.md

TEST_PORTING.mdMark Stage-8 runtime install tests as ported and document hermetic coverage +25/-31

Mark Stage-8 runtime install tests as ported and document hermetic coverage

• Updates the porting plan to mark Node/Deno/Bun and command-level runtime tests as completed. Notes that new tests use local HTTP fixtures to exercise fetch, integrity, and offline reinstall behaviors without external mirrors.

pnpm/plans/TEST_PORTING.md

Other (5) +25 / -3
Cargo.lockLock dependency updates for new runtime-test and semver utilities +4/-0

Lock dependency updates for new runtime-test and semver utilities

• Updates the lockfile to include new crates used by the implementation and test harness, including sha2, ssri, zip, and node-semver.

Cargo.lock

Cargo.tomlAdd CLI test dependencies for hermetic runtime archive fixtures +3/-0

Add CLI test dependencies for hermetic runtime archive fixtures

• Adds sha2, ssri, and zip as workspace dependencies used by new runtime installation integration tests.

pnpm/crates/cli/Cargo.toml

env_overlay.rsSupport RUNTIME_ON_FAIL and NODE_DOWNLOAD_MIRRORS env overlays +4/-2

Support RUNTIME_ON_FAIL and NODE_DOWNLOAD_MIRRORS env overlays

• Extends env overlay parsing to read runtime_on_fail (enum) and node_download_mirrors (JSON). Wires them into WorkspaceSettings so they affect Config resolution.

pnpm/crates/config/src/env_overlay.rs

workspace_yaml.rsParse/apply runtimeOnFail and nodeDownloadMirrors from workspace config +13/-1

Parse/apply runtimeOnFail and nodeDownloadMirrors from workspace config

• Extends WorkspaceSettings to include runtime_on_fail and node_download_mirrors. Applies both values into the resolved Config during settings merge.

pnpm/crates/config/src/workspace_yaml.rs

Cargo.tomlAdd node-semver dependency for Node version range parsing +1/-0

Add node-semver dependency for Node version range parsing

• Adds node-semver to support parsing engines.runtime Node version ranges and deriving minimum compatible versions.

pnpm/crates/package-manifest/Cargo.toml

Copilot AI review requested due to automatic review settings July 19, 2026 19:42
@github-actions

github-actions Bot commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                          main                                   pr
-----                          ----                                   --
lockfile/parse_pnpm_lock       1.05     10.8±0.22ms    34.7 MB/sec    1.00     10.3±0.17ms    36.3 MB/sec
packument/parse                1.00     36.7±0.46µs  1808.2 MB/sec    1.00     36.7±0.56µs  1807.8 MB/sec
tarball/download_dependency    1.02      2.9±0.19ms  1491.1 KB/sec    1.00      2.9±0.20ms  1513.7 KB/sec

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

No code suggestions found for the PR.

Copilot AI review requested due to automatic review settings July 19, 2026 19:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

No code suggestions found for the PR.

@qodo-code-review

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

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Action required

1. runtimeOnFail removes runtime deps ✓ Resolved 🐞 Bug ≡ Correctness
Description
apply_runtime_on_fail_override removes any dependencies/devDependencies entry whose specifier
starts with runtime: when the override is not download, which also deletes explicit runtime
dependencies users can declare. This contradicts the helper’s own contract (“removes only
synthesized runtime dependencies”) and can cause requested runtimes (e.g. node: "runtime:22.0.0")
to be silently omitted.
Code

pnpm/crates/package-manifest/src/lib.rs[R562-572]

+        let Some(deps) = manifest.get_mut(deps_field).and_then(Value::as_object_mut) else {
+            continue;
+        };
+        for runtime_name in RUNTIME_NAMES {
+            if deps
+                .get(runtime_name)
+                .and_then(Value::as_str)
+                .is_some_and(|specifier| specifier.starts_with("runtime:"))
+            {
+                deps.remove(runtime_name);
+            }
Evidence
The override implementation removes runtime:-prefixed entries purely by name + prefix match, which
will match explicit runtime dependencies. The CLI runtime tests demonstrate explicit runtime:
dependencies are used/expected, making this a real user-visible behavior change.

pnpm/crates/package-manifest/src/lib.rs[528-574]
pnpm/crates/cli/tests/install_runtimes.rs[361-369]

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

### Issue description
`apply_runtime_on_fail_override` currently removes *any* `node`/`deno`/`bun` dependency whose version starts with `runtime:` when `runtimeOnFail != download`. That deletes explicit user-declared runtime dependencies, even though the function claims it removes only dependencies synthesized from `devEngines.runtime`/`engines.runtime`.

### Issue Context
Explicit `runtime:` dependencies are a supported/used input shape (tests generate `package.json` with `"node": "runtime:<ver>"`). The override should only affect the engine-derived synthesis behavior, not rewrite explicit dependency intent.

### Fix Focus Areas
- pnpm/crates/package-manifest/src/lib.rs[528-575]
- pnpm/crates/cli/tests/install_runtimes.rs[361-369]

### Fix approach
- When `on_fail_override != "download"`, remove `runtime:` dependencies **only if** there is a corresponding managed runtime entry present in the relevant engines field for that runtime name (i.e., the dep could plausibly have been synthesized from that engine declaration).
 - Example: only remove `devDependencies.node` if `devEngines.runtime` contains an entry with `{ name: "node", ... }`.
- Alternatively, change the conversion pipeline to track synthesized inserts (e.g., return a list of inserted runtime names from `convert_engines_runtime_to_dependencies`) and remove only those.

### Add regression test
Add a unit test proving that `runtimeOnFail=ignore` does **not** delete an explicit `"node": "runtime:..."` dependency when there is no matching `devEngines.runtime`/`engines.runtime` entry.

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



Remediation recommended

2. Musl blocks cross-OS variants 🐞 Bug ☼ Reliability ⭐ New
Description
runtime_platform_selector() falls back to the host libc when supportedArchitectures overrides
os/cpu but leaves libc unset, so on musl hosts the selector becomes e.g. win32/x64+musl and
cannot match normal non-Linux variants (which omit libc). This makes cross-OS runtime installs
(e.g. --os win32) fail on Alpine/musl even when the lockfile contains a valid win32/darwin
variant.
Code

pnpm/crates/package-manager/src/install_package_by_snapshot.rs[R753-760]

+        libc: match supported
+            .and_then(|value| value.libc.as_ref())
+            .and_then(|values| values.first())
+        {
+            None => host.libc,
+            Some(value) if value == "current" => host.libc,
+            Some(value) => Some(value.clone()),
+        },
Evidence
The new selector falls back to host.libc when supportedArchitectures.libc is absent, and the
variant matcher requires exact libc matches when the selector requests musl. Since non-Linux
variants typically omit libc, a musl selector prevents matching those variants.

pnpm/crates/package-manager/src/install_package_by_snapshot.rs[735-762]
pnpm/crates/lockfile/src/resolution.rs[251-276]

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

## Issue description
`runtime_platform_selector()` carries `host.libc` into the selected target triple when `supportedArchitectures.libc` is unset. On musl hosts, this produces a selector like `os=win32, cpu=x64, libc=musl`, which cannot match typical win32/darwin variants that omit `libc`.

## Issue Context
- Variant matching treats `libc` asymmetrically: when the selector requests a non-default libc (e.g. `musl`), the variant must declare the same libc; otherwise it won’t match.
- For non-Linux targets, `libc` should be ignored/cleared because it is not a meaningful dimension.

## Fix Focus Areas
- pnpm/crates/package-manager/src/install_package_by_snapshot.rs[735-762]

## Suggested fix
Compute `os`/`cpu` first, then set `libc` as:
- If selected `os != "linux"`, force `libc = None` (even if the host is musl).
- Otherwise (`os == "linux"`), keep the current behavior: use explicit `supportedArchitectures.libc[0]` when present (expanding `current`), else fall back to `host.libc`.

Add/adjust a unit test for `runtime_platform_selector()` that simulates a musl host and a non-Linux `supportedArchitectures.os` override, asserting `selector.libc` becomes `None` so non-Linux variants can match.

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


3. Manifest clone in resolver ✓ Resolved 🐞 Bug ➹ Performance
Description
extract_children now clones the full serde_json::Value manifest whenever engines.runtime
exists just to synthesize runtime dependencies before collecting dependencies. This adds avoidable
allocations and JSON traversal in the resolver loop; the same result can be achieved by synthesizing
only the needed runtime dep edge(s) without cloning the whole manifest.
Code

pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs[R2982-2986]

+    if manifest.get("engines").and_then(|engines| engines.get("runtime")).is_some() {
+        let mut manifest = (**manifest).clone();
+        convert_engines_runtime_to_dependencies(&mut manifest, "engines", "dependencies");
+        collect_deps(&manifest, "dependencies", false, &parent, &mut out)?;
+        collect_deps(&manifest, "optionalDependencies", true, &parent, &mut out)?;
Evidence
The resolver explicitly clones the manifest when engines.runtime exists, then mutates the clone
before collecting deps. This shows the new overhead and where it can be avoided.

pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs[2977-2991]

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

### Issue description
In `extract_children`, when a manifest has `engines.runtime`, the code clones the entire manifest JSON just to run `convert_engines_runtime_to_dependencies` and then collect dependency edges. This is unnecessary work on a performance-sensitive path.

### Issue Context
Only the presence/contents of `engines.runtime` and the `dependencies` map are needed to generate the additional runtime edge(s). Cloning the entire manifest copies unrelated fields.

### Fix Focus Areas
- pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs[2976-2991]
- pnpm/crates/package-manifest/src/lib.rs[475-526]

### Suggested fix
- Replace the clone+mutation with a small helper that reads `engines.runtime` and returns synthesized `(name, "runtime:<ver>")` edges (respecting `onFail == "download"` and “don’t override explicit deps” rules).
- Then:
 1) collect regular `dependencies` and `optionalDependencies` from the original manifest,
 2) append synthesized runtime edges to `out`.

### Acceptance criteria
- No full-manifest clone on this path.
- Behavior stays identical: synthesized runtime deps appear as regular dependency edges only when `onFail=download` and the dependency name isn’t already present.

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


4. Unauthenticated Node mirror provenance 🐞 Bug ⛨ Security
Description
nodeDownloadMirrors is now read from pnpm-workspace.yaml (repo-controlled) and fed into Node
runtime resolution, but for non-release channels the SHASUMS metadata is not signature-verified,
so the runtime integrity is only as trustworthy as the configured mirror. A malicious repo can set
nodeDownloadMirrors.rc/nightly/test/v8-canary to an attacker host and have an
attacker-chosen node binary installed and linked into node_modules/.bin, where lifecycle scripts
can resolve and execute it.
Code

pnpm/crates/config/src/workspace_yaml.rs[R879-884]

+        if let Some(v) = self.runtime_on_fail {
+            config.runtime_on_fail = Some(v);
+        }
+        if let Some(v) = self.node_download_mirrors {
+            config.node_download_mirrors = v;
+        }
Evidence
pnpm-workspace.yaml settings are applied into Config, including node_download_mirrors, and
that map is used to pick the base URL for Node runtime assets. For non-release channels, the
resolver fetches an unsigned SHASUMS file (integrity is mirror-provided, not
signature-authenticated), while lifecycle scripts can resolve binaries from node_modules/.bin,
giving an execution path for an attacker-supplied node binary.

pnpm/crates/config/src/workspace_yaml.rs[879-884]
pnpm/crates/engine-runtime-node-resolver/src/get_node_mirror.rs[20-32]
pnpm/crates/engine-runtime-node-resolver/src/node_resolver.rs[246-280]
pnpm/crates/engine-runtime-node-resolver/src/node_resolver.rs[335-351]
pnpm/crates/package-manager/src/build_modules.rs[476-483]

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

### Issue description
`nodeDownloadMirrors` is repo-controlled via `pnpm-workspace.yaml` and is now used by the Node runtime resolver. For non-`release` channels the resolver fetches `SHASUMS256.txt` without signature verification, so an attacker-controlled mirror can provide matching checksums + archive and get an arbitrary Node binary installed and exposed via `node_modules/.bin`.

### Issue Context
- The intent of mirrors is legitimate, but accepting them from a repository config meaningfully expands the "untrusted repo" attack surface.
- The problem is not a missing integrity check; it’s missing authenticated provenance for non-`release` channels when a repo can choose the mirror.

### Fix Focus Areas
- pnpm/crates/config/src/workspace_yaml.rs[879-884]
- pnpm/crates/engine-runtime-node-resolver/src/node_resolver.rs[254-351]
- pnpm/crates/engine-runtime-node-resolver/src/get_node_mirror.rs[20-32]

### Suggested remediation options (pick one, keep parity constraints in mind)
1. **Do not honor `nodeDownloadMirrors` from workspace config by default** (only from user/global config / env), or require an explicit opt-in flag for repo-provided mirrors.
2. **Require HTTPS and forbid credentials** in mirror URLs by default; optionally allow `http://localhost` for tests/dev.
3. **Tighten provenance for non-release channels**: if you can verify signatures for rc/nightly too, enable verification; otherwise, require an explicit "allow-unsigned-node-metadata" opt-in when using non-release channels + custom mirrors.

### Acceptance criteria
- A repo cannot silently redirect Node runtime downloads for non-release channels to an attacker-controlled origin without the user opting in.
- Tests that use local HTTP mirrors either switch to an allowed localhost exception or set the opt-in explicitly.

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


Grey Divider

Previous review results

Review updated until commit 8a4a789

Results up to commit 3b791bc ⚖️ Balanced


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


Action required
1. runtimeOnFail removes runtime deps ✓ Resolved 🐞 Bug ≡ Correctness
Description
apply_runtime_on_fail_override removes any dependencies/devDependencies entry whose specifier
starts with runtime: when the override is not download, which also deletes explicit runtime
dependencies users can declare. This contradicts the helper’s own contract (“removes only
synthesized runtime dependencies”) and can cause requested runtimes (e.g. node: "runtime:22.0.0")
to be silently omitted.
Code

pnpm/crates/package-manifest/src/lib.rs[R562-572]

+        let Some(deps) = manifest.get_mut(deps_field).and_then(Value::as_object_mut) else {
+            continue;
+        };
+        for runtime_name in RUNTIME_NAMES {
+            if deps
+                .get(runtime_name)
+                .and_then(Value::as_str)
+                .is_some_and(|specifier| specifier.starts_with("runtime:"))
+            {
+                deps.remove(runtime_name);
+            }
Evidence
The override implementation removes runtime:-prefixed entries purely by name + prefix match, which
will match explicit runtime dependencies. The CLI runtime tests demonstrate explicit runtime:
dependencies are used/expected, making this a real user-visible behavior change.

pnpm/crates/package-manifest/src/lib.rs[528-574]
pnpm/crates/cli/tests/install_runtimes.rs[361-369]

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

### Issue description
`apply_runtime_on_fail_override` currently removes *any* `node`/`deno`/`bun` dependency whose version starts with `runtime:` when `runtimeOnFail != download`. That deletes explicit user-declared runtime dependencies, even though the function claims it removes only dependencies synthesized from `devEngines.runtime`/`engines.runtime`.

### Issue Context
Explicit `runtime:` dependencies are a supported/used input shape (tests generate `package.json` with `"node": "runtime:<ver>"`). The override should only affect the engine-derived synthesis behavior, not rewrite explicit dependency intent.

### Fix Focus Areas
- pnpm/crates/package-manifest/src/lib.rs[528-575]
- pnpm/crates/cli/tests/install_runtimes.rs[361-369]

### Fix approach
- When `on_fail_override != "download"`, remove `runtime:` dependencies **only if** there is a corresponding managed runtime entry present in the relevant engines field for that runtime name (i.e., the dep could plausibly have been synthesized from that engine declaration).
 - Example: only remove `devDependencies.node` if `devEngines.runtime` contains an entry with `{ name: "node", ... }`.
- Alternatively, change the conversion pipeline to track synthesized inserts (e.g., return a list of inserted runtime names from `convert_engines_runtime_to_dependencies`) and remove only those.

### Add regression test
Add a unit test proving that `runtimeOnFail=ignore` does **not** delete an explicit `"node": "runtime:..."` dependency when there is no matching `devEngines.runtime`/`engines.runtime` entry.

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



Remediation recommended
2. Manifest clone in resolver ✓ Resolved 🐞 Bug ➹ Performance
Description
extract_children now clones the full serde_json::Value manifest whenever engines.runtime
exists just to synthesize runtime dependencies before collecting dependencies. This adds avoidable
allocations and JSON traversal in the resolver loop; the same result can be achieved by synthesizing
only the needed runtime dep edge(s) without cloning the whole manifest.
Code

pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs[R2982-2986]

+    if manifest.get("engines").and_then(|engines| engines.get("runtime")).is_some() {
+        let mut manifest = (**manifest).clone();
+        convert_engines_runtime_to_dependencies(&mut manifest, "engines", "dependencies");
+        collect_deps(&manifest, "dependencies", false, &parent, &mut out)?;
+        collect_deps(&manifest, "optionalDependencies", true, &parent, &mut out)?;
Evidence
The resolver explicitly clones the manifest when engines.runtime exists, then mutates the clone
before collecting deps. This shows the new overhead and where it can be avoided.

pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs[2977-2991]

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

### Issue description
In `extract_children`, when a manifest has `engines.runtime`, the code clones the entire manifest JSON just to run `convert_engines_runtime_to_dependencies` and then collect dependency edges. This is unnecessary work on a performance-sensitive path.

### Issue Context
Only the presence/contents of `engines.runtime` and the `dependencies` map are needed to generate the additional runtime edge(s). Cloning the entire manifest copies unrelated fields.

### Fix Focus Areas
- pnpm/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs[2976-2991]
- pnpm/crates/package-manifest/src/lib.rs[475-526]

### Suggested fix
- Replace the clone+mutation with a small helper that reads `engines.runtime` and returns synthesized `(name, "runtime:<ver>")` edges (respecting `onFail == "download"` and “don’t override explicit deps” rules).
- Then:
 1) collect regular `dependencies` and `optionalDependencies` from the original manifest,
 2) append synthesized runtime edges to `out`.

### Acceptance criteria
- No full-manifest clone on this path.
- Behavior stays identical: synthesized runtime deps appear as regular dependency edges only when `onFail=download` and the dependency name isn’t already present.

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


3. Unauthenticated Node mirror provenance 🐞 Bug ⛨ Security
Description
nodeDownloadMirrors is now read from pnpm-workspace.yaml (repo-controlled) and fed into Node
runtime resolution, but for non-release channels the SHASUMS metadata is not signature-verified,
so the runtime integrity is only as trustworthy as the configured mirror. A malicious repo can set
nodeDownloadMirrors.rc/nightly/test/v8-canary to an attacker host and have an
attacker-chosen node binary installed and linked into node_modules/.bin, where lifecycle scripts
can resolve and execute it.
Code

pnpm/crates/config/src/workspace_yaml.rs[R879-884]

+        if let Some(v) = self.runtime_on_fail {
+            config.runtime_on_fail = Some(v);
+        }
+        if let Some(v) = self.node_download_mirrors {
+            config.node_download_mirrors = v;
+        }
Evidence
pnpm-workspace.yaml settings are applied into Config, including node_download_mirrors, and
that map is used to pick the base URL for Node runtime assets. For non-release channels, the
resolver fetches an unsigned SHASUMS file (integrity is mirror-provided, not
signature-authenticated), while lifecycle scripts can resolve binaries from node_modules/.bin,
giving an execution path for an attacker-supplied node binary.

pnpm/crates/config/src/workspace_yaml.rs[879-884]
pnpm/crates/engine-runtime-node-resolver/src/get_node_mirror.rs[20-32]
pnpm/crates/engine-runtime-node-resolver/src/node_resolver.rs[246-280]
pnpm/crates/engine-runtime-node-resolver/src/node_resolver.rs[335-351]
pnpm/crates/package-manager/src/build_modules.rs[476-483]

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

### Issue description
`nodeDownloadMirrors` is repo-controlled via `pnpm-workspace.yaml` and is now used by the Node runtime resolver. For non-`release` channels the resolver fetches `SHASUMS256.txt` without signature verification, so an attacker-controlled mirror can provide matching checksums + archive and get an arbitrary Node binary installed and exposed via `node_modules/.bin`.

### Issue Context
- The intent of mirrors is legitimate, but accepting them from a repository config meaningfully expands the "untrusted repo" attack surface.
- The problem is not a missing integrity check; it’s missing authenticated provenance for non-`release` channels when a repo can choose the mirror.

### Fix Focus Areas
- pnpm/crates/config/src/workspace_yaml.rs[879-884]
- pnpm/crates/engine-runtime-node-resolver/src/node_resolver.rs[254-351]
- pnpm/crates/engine-runtime-node-resolver/src/get_node_mirror.rs[20-32]

### Suggested remediation options (pick one, keep parity constraints in mind)
1. **Do not honor `nodeDownloadMirrors` from workspace config by default** (only from user/global config / env), or require an explicit opt-in flag for repo-provided mirrors.
2. **Require HTTPS and forbid credentials** in mirror URLs by default; optionally allow `http://localhost` for tests/dev.
3. **Tighten provenance for non-release channels**: if you can verify signatures for rc/nightly too, enable verification; otherwise, require an explicit "allow-unsigned-node-metadata" opt-in when using non-release channels + custom mirrors.

### Acceptance criteria
- A repo cannot silently redirect Node runtime downloads for non-release channels to an attacker-controlled origin without the user opting in.
- Tests that use local HTTP mirrors either switch to an allowed localhost exception or set the opt-in explicitly.

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


Qodo Logo

Comment thread pnpm/crates/package-manifest/src/lib.rs Resolved
@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.

@greptile-apps

greptile-apps Bot commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The changes are a well-scoped feature port with broad hermetic test coverage; no data-loss or correctness regressions were identified.

The two stacks are kept in sync (Rust + TypeScript applyRuntimeOnFailOverride guard land together), the borrow sequencing in apply_runtime_on_fail_override is correct under NLL, engines_runtime_dependencies guards against duplicate entries, and runtime_platform_selector correctly falls back to host values. The integration test suite is thorough and avoids the silent-skip anti-pattern. No blocking issues were found.

No files require special attention.

Reviews (2): Last reviewed commit: "fix: address runtime installation review..." | Re-trigger Greptile

Comment thread pnpm/crates/package-manifest/src/lib.rs Resolved
@codecov-commenter

codecov-commenter commented Jul 19, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.08247% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.25%. Comparing base (ebacfa6) to head (8a4a789).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
pnpm/crates/package-manifest/src/lib.rs 79.77% 18 Missing ⚠️
pnpm/crates/cli/src/cli_args/pipelines.rs 33.33% 6 Missing ⚠️
pnpm/crates/config/src/lib.rs 71.42% 2 Missing ⚠️
...package-manager/src/install_package_by_snapshot.rs 96.55% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13157      +/-   ##
==========================================
+ Coverage   85.85%   86.25%   +0.39%     
==========================================
  Files         505      506       +1     
  Lines       84029    84517     +488     
==========================================
+ Hits        72147    72899     +752     
+ Misses      11882    11618     -264     

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

Copilot AI review requested due to automatic review settings July 19, 2026 20:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jul 19, 2026
@zkochan

zkochan commented Jul 19, 2026

Copy link
Copy Markdown
Member Author

Follow-up to the Qodo summary review:

  • Findings 1 and 3 are addressed in commit 8a4a789fe8: explicit runtime dependencies for unmatched engine entries are preserved in both stacks, and transitive runtime edges are synthesized without cloning the full manifest.
  • I investigated finding 2 against the TypeScript source of truth. The TypeScript Node resolver already accepts repository-configured nodeDownloadMirrors and explicitly verifies signatures only for the signed release channel; Stage 8 ports that same documented trust model to pacquet. Adding a separate user opt-in for unsigned custom channels would be a new cross-stack security policy and configuration surface, so this PR does not introduce a Rust-only restriction that would violate parity.

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

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 8a4a789

@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: 8a4a789fe846

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.496 ± 0.158 2.361 2.781 1.72 ± 0.17
pacquet@main 2.594 ± 0.117 2.384 2.716 1.79 ± 0.16
pnpr@HEAD 1.449 ± 0.108 1.350 1.679 1.00
pnpr@main 1.474 ± 0.169 1.360 1.804 1.02 ± 0.14
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.4963899853199996,
      "stddev": 0.1581734771582885,
      "median": 2.4128760722199996,
      "user": 1.51644206,
      "system": 1.2777698800000001,
      "min": 2.36060057572,
      "max": 2.78086021772,
      "times": [
        2.51784881972,
        2.40248696272,
        2.67441194272,
        2.3810537527199997,
        2.68211612072,
        2.36060057572,
        2.78086021772,
        2.37617440072,
        2.4232651817199997,
        2.36508187872
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.59410847152,
      "stddev": 0.11675904307012808,
      "median": 2.63721971922,
      "user": 1.53703526,
      "system": 1.2803641799999999,
      "min": 2.3835380317199997,
      "max": 2.71554132672,
      "times": [
        2.57420793072,
        2.63947676672,
        2.63496267172,
        2.44873590972,
        2.64657730672,
        2.70205038072,
        2.3835380317199997,
        2.48864231672,
        2.71554132672,
        2.70735207372
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.44881606012,
      "stddev": 0.10786682584653018,
      "median": 1.41453368172,
      "user": 1.0469201599999998,
      "system": 1.15113938,
      "min": 1.35017693772,
      "max": 1.67946678672,
      "times": [
        1.3687728367199998,
        1.43800405472,
        1.53557271672,
        1.35017693772,
        1.3598590797199999,
        1.54286728672,
        1.67946678672,
        1.46023632772,
        1.36214126572,
        1.39106330872
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.47407459452,
      "stddev": 0.16915092812553756,
      "median": 1.37088287822,
      "user": 1.1065125599999999,
      "system": 1.09923818,
      "min": 1.35981668972,
      "max": 1.80433164172,
      "times": [
        1.80433164172,
        1.35981668972,
        1.36384924072,
        1.36521856772,
        1.37178728072,
        1.5381296787199998,
        1.36895307572,
        1.74690254472,
        1.36997847572,
        1.4517787497199999
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 256.9 ± 8.5 241.2 269.4 1.03 ± 0.04
pacquet@main 248.4 ± 5.2 241.9 259.3 1.00
pnpr@HEAD 267.0 ± 9.9 257.7 291.8 1.07 ± 0.05
pnpr@main 273.0 ± 7.4 262.8 288.5 1.10 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.25687805012000003,
      "stddev": 0.008538295795461047,
      "median": 0.25584871062,
      "user": 0.21894942,
      "system": 0.5219049199999999,
      "min": 0.24118388862,
      "max": 0.26943667562,
      "times": [
        0.26681964962,
        0.25571055062,
        0.24118388862,
        0.25895597962,
        0.24738936962000002,
        0.25598687062,
        0.26378558862,
        0.25463230162,
        0.25487962661999997,
        0.26943667562
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.24835326802000002,
      "stddev": 0.005174977739068258,
      "median": 0.24741726562000002,
      "user": 0.19642371999999997,
      "system": 0.5197719199999999,
      "min": 0.24185890962,
      "max": 0.25933974162,
      "times": [
        0.25159453362,
        0.24185890962,
        0.25933974162,
        0.24319542562000002,
        0.24797990962000002,
        0.24685462162000002,
        0.25129094262,
        0.24617541362,
        0.25110053462,
        0.24414264762000001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.26697777742,
      "stddev": 0.009891835737077786,
      "median": 0.26522264411999996,
      "user": 0.20466052,
      "system": 0.5356290199999999,
      "min": 0.25770981362,
      "max": 0.29183806962,
      "times": [
        0.26671750762,
        0.29183806962,
        0.26008331162,
        0.26565136062,
        0.26331604461999997,
        0.27108615962,
        0.25770981362,
        0.25805181662,
        0.26479392762,
        0.27052976262
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.27297440481999996,
      "stddev": 0.007370927899244322,
      "median": 0.27413666112,
      "user": 0.19991092,
      "system": 0.56304362,
      "min": 0.26280152662,
      "max": 0.28849934462,
      "times": [
        0.27395112162,
        0.27432220062,
        0.26984217862,
        0.26332977062,
        0.26958404362,
        0.27463814461999997,
        0.27558233262,
        0.27719338462,
        0.26280152662,
        0.28849934462
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.706 ± 0.018 2.684 2.730 1.80 ± 0.16
pacquet@main 2.698 ± 0.027 2.647 2.733 1.79 ± 0.16
pnpr@HEAD 1.506 ± 0.131 1.383 1.801 1.00
pnpr@main 1.520 ± 0.147 1.380 1.781 1.01 ± 0.13
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.7056357502,
      "stddev": 0.017982397313355415,
      "median": 2.7081675451,
      "user": 1.6015214,
      "system": 1.2974556,
      "min": 2.6841394546,
      "max": 2.7301921345999998,
      "times": [
        2.7065916035999997,
        2.6883288806,
        2.6861242105999996,
        2.7273136065999997,
        2.7230726545999997,
        2.7301921345999998,
        2.6841394546,
        2.7130533656,
        2.6877981046,
        2.7097434866
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.6983657491999997,
      "stddev": 0.027048145586643545,
      "median": 2.6962960780999996,
      "user": 1.5963272,
      "system": 1.2805453999999998,
      "min": 2.6473478426,
      "max": 2.7334243966,
      "times": [
        2.6909990475999996,
        2.7334243966,
        2.6473478426,
        2.7316330156,
        2.6678575635999997,
        2.6935990126,
        2.7056922826,
        2.7217684296,
        2.6923427576,
        2.6989931435999996
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.505729814,
      "stddev": 0.1308294096979467,
      "median": 1.4819392896,
      "user": 0.9681118000000002,
      "system": 1.1519309999999998,
      "min": 1.3825567576,
      "max": 1.8014039636,
      "times": [
        1.4796846136000001,
        1.6225094246000002,
        1.5197142946000002,
        1.3920321016000001,
        1.8014039636,
        1.5614033976000001,
        1.3855040146000002,
        1.3825567576,
        1.4282956066,
        1.4841939656
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5204490503000003,
      "stddev": 0.1470672638696162,
      "median": 1.4526135816,
      "user": 1.0129018,
      "system": 1.1110044000000001,
      "min": 1.3804976096000001,
      "max": 1.7814147426000002,
      "times": [
        1.4151254706,
        1.5948798956,
        1.3995559966,
        1.4791288736000001,
        1.7814147426000002,
        1.4230264096,
        1.7543825676000002,
        1.4260982896,
        1.5503806476000002,
        1.3804976096000001
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 547.8 ± 17.3 524.1 572.2 1.91 ± 0.09
pacquet@main 544.4 ± 12.9 525.1 561.3 1.90 ± 0.08
pnpr@HEAD 287.3 ± 10.6 268.6 300.4 1.00
pnpr@main 293.4 ± 6.7 285.4 304.6 1.02 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.5477918194000001,
      "stddev": 0.017321868951352966,
      "median": 0.5497818235,
      "user": 0.65201928,
      "system": 0.6731256999999999,
      "min": 0.5240906375000001,
      "max": 0.5721979355000001,
      "times": [
        0.5328798285,
        0.5240906375000001,
        0.5536759275,
        0.5721979355000001,
        0.5612056885000001,
        0.5495472475000001,
        0.5318810705000001,
        0.5500163995,
        0.5714789925000001,
        0.5309444665
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.5444447348000001,
      "stddev": 0.0129337050925455,
      "median": 0.544938483,
      "user": 0.6581033799999999,
      "system": 0.6408577,
      "min": 0.5251162085000001,
      "max": 0.5613117365000001,
      "times": [
        0.5314309015,
        0.5378529075,
        0.5323710715000001,
        0.5377685095000001,
        0.5520713375,
        0.5613117365000001,
        0.5578439605000001,
        0.5566566565000001,
        0.5520240585,
        0.5251162085000001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.28728191010000004,
      "stddev": 0.010562733395441552,
      "median": 0.28637610599999996,
      "user": 0.19930838,
      "system": 0.49489019999999995,
      "min": 0.2685966315,
      "max": 0.3003970285,
      "times": [
        0.2816102415,
        0.2817423005,
        0.2805431345,
        0.2685966315,
        0.2792596985,
        0.2916825885,
        0.3002152165,
        0.2910099115,
        0.3003970285,
        0.2977623495
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.29344478649999994,
      "stddev": 0.006650199596927977,
      "median": 0.29269294999999995,
      "user": 0.18799348000000002,
      "system": 0.5131713999999999,
      "min": 0.2854278875,
      "max": 0.3046150465,
      "times": [
        0.3046150465,
        0.2973231335,
        0.2858259255,
        0.2854278875,
        0.2867893085,
        0.3003648175,
        0.2948971975,
        0.2983072655,
        0.2904887025,
        0.2904085805
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.845 ± 0.012 1.831 1.871 6.19 ± 0.15
pacquet@main 1.839 ± 0.012 1.827 1.868 6.17 ± 0.15
pnpr@HEAD 0.298 ± 0.007 0.282 0.306 1.00
pnpr@main 0.303 ± 0.005 0.295 0.309 1.02 ± 0.03
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.8445256944600001,
      "stddev": 0.012321971452158149,
      "median": 1.83937573306,
      "user": 0.8815749399999999,
      "system": 0.7462446799999999,
      "min": 1.83135255956,
      "max": 1.87075767956,
      "times": [
        1.83999053456,
        1.87075767956,
        1.83135255956,
        1.8331047865599999,
        1.83876093156,
        1.85844420456,
        1.83799561156,
        1.83752287056,
        1.84797928956,
        1.84934847656
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.83930001556,
      "stddev": 0.01225353636061845,
      "median": 1.84005731556,
      "user": 0.8781762399999998,
      "system": 0.7424677799999999,
      "min": 1.82689508956,
      "max": 1.86756679356,
      "times": [
        1.82706674256,
        1.86756679356,
        1.84568083456,
        1.8415271365599999,
        1.8273112125600002,
        1.82689508956,
        1.84153607356,
        1.8435287735600001,
        1.83858749456,
        1.8333000045599999
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.2980901040599999,
      "stddev": 0.006928333292740696,
      "median": 0.29968260455999995,
      "user": 0.19258414,
      "system": 0.5345087799999999,
      "min": 0.28204321256,
      "max": 0.30648757656,
      "times": [
        0.28204321256,
        0.30386734656,
        0.29799721856,
        0.29153369456,
        0.30032157255999997,
        0.29712795256,
        0.30215725756,
        0.30648757656,
        0.29945320956,
        0.29991199956
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.3032182170600001,
      "stddev": 0.004858140489804037,
      "median": 0.30332491406,
      "user": 0.18893584,
      "system": 0.5310098799999999,
      "min": 0.29461311156,
      "max": 0.30931775856,
      "times": [
        0.30049185656,
        0.30506483456,
        0.30075489156,
        0.30743805056,
        0.29461311156,
        0.30566529455999997,
        0.30898553256,
        0.29826584656,
        0.30158499356,
        0.30931775856
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 324.3 ± 8.8 312.6 337.7 3.85 ± 0.14
pacquet@main 317.1 ± 4.9 307.2 324.2 3.77 ± 0.10
pnpr@HEAD 84.2 ± 1.9 81.5 87.6 1.00
pnpr@main 84.4 ± 2.2 81.8 88.6 1.00 ± 0.03
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.32425370154000005,
      "stddev": 0.00883876102906229,
      "median": 0.32467488614000006,
      "user": 0.31407992,
      "system": 0.05554446,
      "min": 0.31260936064000006,
      "max": 0.33767156464000003,
      "times": [
        0.32771606464,
        0.31260936064000006,
        0.32924762964000004,
        0.31745948964000004,
        0.31812727764000004,
        0.33767156464000003,
        0.32840007264000004,
        0.32163370764000004,
        0.31383303464,
        0.33583881364
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.31708602794000007,
      "stddev": 0.00486645918156294,
      "median": 0.31721169814000005,
      "user": 0.30918362,
      "system": 0.05129186,
      "min": 0.30715386164,
      "max": 0.32418994964000003,
      "times": [
        0.31577640064,
        0.31515502264000006,
        0.32116611664000005,
        0.30715386164,
        0.31299266264000003,
        0.32185028564,
        0.31815258364000004,
        0.31802232964000005,
        0.32418994964000003,
        0.31640106664000006
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.08420428500363637,
      "stddev": 0.0019308119885136548,
      "median": 0.08328821764000001,
      "user": 0.01923002303030303,
      "system": 0.009105713939393939,
      "min": 0.08151961764,
      "max": 0.08757111864,
      "times": [
        0.08621118864,
        0.08694726464000001,
        0.08669213564,
        0.08278957764,
        0.08262546964,
        0.08689179064000001,
        0.08236011964,
        0.08214638864000001,
        0.08273856264,
        0.08757111864,
        0.08675101564000001,
        0.08370832764000001,
        0.08519060864000001,
        0.08281455664000001,
        0.08151961764,
        0.08212769264,
        0.08291213964000001,
        0.08227156264,
        0.08357580964000001,
        0.08554126764,
        0.08320204564,
        0.08662146264000001,
        0.08253199364000001,
        0.08328821764000001,
        0.08636685264,
        0.08399527764,
        0.08527741164000001,
        0.08256290264,
        0.08302355864000001,
        0.08688880464000001,
        0.08660511964,
        0.08309762964,
        0.08189391364000001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.08439905379151516,
      "stddev": 0.0022085388769120654,
      "median": 0.08357499664000001,
      "user": 0.018353568484848492,
      "system": 0.009810736969696969,
      "min": 0.08183369064000001,
      "max": 0.08861864064000001,
      "times": [
        0.08527119064000001,
        0.08233595464,
        0.08357499664000001,
        0.08598688764000001,
        0.08326005364000001,
        0.08756188264,
        0.08754719464,
        0.08660512064,
        0.08217391964000001,
        0.08183369064000001,
        0.08529385164,
        0.08489458064000001,
        0.08341781064,
        0.08585168264000001,
        0.08296833564,
        0.08861864064000001,
        0.08708379164,
        0.08801244064000001,
        0.08494511564,
        0.08423051164,
        0.08833467464,
        0.08506654564,
        0.08251141564,
        0.08692177664,
        0.08226701564000001,
        0.08220030964000001,
        0.08239334264,
        0.08240938364,
        0.08206508564000001,
        0.08267926064,
        0.08196390564,
        0.08194769264,
        0.08294071364000001
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.472 ± 0.135 4.415 4.854 1.26 ± 0.06
pacquet@main 4.545 ± 0.110 4.428 4.745 1.28 ± 0.05
pnpr@HEAD 3.613 ± 0.114 3.472 3.841 1.02 ± 0.05
pnpr@main 3.556 ± 0.114 3.444 3.859 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.472391710079999,
      "stddev": 0.13515681390980883,
      "median": 4.426455756679999,
      "user": 1.68277118,
      "system": 1.37488082,
      "min": 4.41451216118,
      "max": 4.85439897518,
      "times": [
        4.45341639818,
        4.45998050318,
        4.41451216118,
        4.42319259918,
        4.85439897518,
        4.41596848118,
        4.43597158218,
        4.4297189141799995,
        4.42200214918,
        4.41475533718
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.54515772958,
      "stddev": 0.11008902367285309,
      "median": 4.52111335918,
      "user": 1.70870978,
      "system": 1.3832648200000004,
      "min": 4.42821651418,
      "max": 4.74450741818,
      "times": [
        4.42821651418,
        4.43852854518,
        4.45312561218,
        4.51184214118,
        4.66335381718,
        4.58485213018,
        4.53038457718,
        4.45110491918,
        4.74450741818,
        4.64566162118
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.6130761903800006,
      "stddev": 0.11425014558906374,
      "median": 3.5878422801800003,
      "user": 1.1791786800000001,
      "system": 1.25629332,
      "min": 3.47231721918,
      "max": 3.84058956318,
      "times": [
        3.73722136418,
        3.48275777018,
        3.47231721918,
        3.57468641718,
        3.60833345918,
        3.5575439491800003,
        3.84058956318,
        3.60099814318,
        3.56363304118,
        3.69268097718
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.5557028074800003,
      "stddev": 0.1142374533261655,
      "median": 3.53667864068,
      "user": 1.1742683799999998,
      "system": 1.25477082,
      "min": 3.44406669218,
      "max": 3.85884539518,
      "times": [
        3.85884539518,
        3.50831288318,
        3.46636044618,
        3.44406669218,
        3.52833092318,
        3.56719845318,
        3.55735208918,
        3.51410620818,
        3.54502635818,
        3.56742862618
      ]
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13157
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,684.14 ms
(+0.43%)Baseline: 2,672.63 ms
3,207.16 ms
(83.69%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,831.35 ms
(-0.12%)Baseline: 1,833.58 ms
2,200.30 ms
(83.23%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
524.09 ms
(-1.96%)Baseline: 534.55 ms
641.46 ms
(81.70%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
312.61 ms
(-2.81%)Baseline: 321.63 ms
385.96 ms
(81.00%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,360.60 ms
(-0.35%)Baseline: 2,368.98 ms
2,842.77 ms
(83.04%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,414.51 ms
(-0.45%)Baseline: 4,434.68 ms
5,321.61 ms
(82.95%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
241.18 ms
(-1.30%)Baseline: 244.36 ms
293.23 ms
(82.25%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13157
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,382.56 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
282.04 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
268.60 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
81.52 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,350.18 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,472.32 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
257.71 ms
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit 9843b4f into main Jul 19, 2026
37 checks passed
@zkochan
zkochan deleted the stage-8 branch July 19, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants