Skip to content

fix(pacquet): skip unsupported optional deps on fresh install - #12809

Merged
zkochan merged 4 commits into
mainfrom
fix-optional-install
Jul 5, 2026
Merged

zkochan merged 4 commits into
mainfrom
fix-optional-install

Conversation

@zkochan

@zkochan zkochan commented Jul 4, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Applies pacquet installability filtering on fresh-lockfile installs before virtual-store materialization, matching the existing TypeScript CLI behavior for unsupported optional dependencies.
  • Prevents the prefetch resolver from downloading tarballs for platform-incompatible optional packages, including platform inferred from native package names.
  • Persists fresh installability skips into .modules.yaml so later installs keep treating those snapshots as skipped.

Squash Commit Body

Rust pnpm was resolving optional dependencies and starting prefetch downloads before it computed installability on the fresh-lockfile path. That meant platform-specific optional packages for other OS/CPU combinations could be downloaded even though they would never be linked or built.

Run the same installability skip computation for fresh lockfiles before virtual-store materialization, thread those skips back to the modules manifest writer, and make the prefetch resolver avoid platform-incompatible optional tarballs. The prefetch shortcut only checks platform compatibility; the full installability pass still handles engine checks with the real host Node version.

This matches the TypeScript requester behavior, which skips fetching unsupported optional packages after resolution.

Checklist

  • The change is implemented in both the TypeScript CLI and the Rust
    pacquet/ port, or the description notes what still needs porting. Rust
    pacquet/ now matches the existing TypeScript CLI behavior; no TypeScript
    change was required.
  • Added or updated tests.

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

Summary by CodeRabbit

  • New Features

    • Install flows now compute and consistently persist “skipped” snapshots, including platform-incompatible optional dependencies, across pruning, virtual-store, and current lockfile/module metadata.
    • Fresh-lockfile installs now carry installability-related skipped snapshot information through to materialization.
    • Prefetching is avoided for optional remote tarballs when the inferred platform isn’t supported for the host.
  • Bug Fixes

    • Platform-incompatible optional dependencies are no longer linked/extracted.
    • Current-lockfile/virtual-store artifacts now correctly reflect skipped and preserved entries.
  • Tests

    • Added/expanded integration and unit coverage for optional platform incompatibility, prefetch-skip behavior, and current-lockfile pruning semantics.

Copilot AI review requested due to automatic review settings July 4, 2026 22:45

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 4, 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: 88efadcd-b912-40c1-829d-fe1bb8de9489

📥 Commits

Reviewing files that changed from the base of the PR and between 2ce334f and dad7bb4.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock, !Cargo.lock
📒 Files selected for processing (5)
  • pacquet/crates/package-manager/Cargo.toml
  • pacquet/crates/package-manager/src/install_with_fresh_lockfile.rs
  • pacquet/crates/package-manager/src/installability.rs
  • pacquet/crates/package-manager/src/prefetching_resolver.rs
  • pacquet/crates/package-manager/src/prefetching_resolver/tests.rs
🚧 Files skipped from review as they are similar to previous changes (2)
  • pacquet/crates/package-manager/src/installability.rs
  • pacquet/crates/package-manager/src/install_with_fresh_lockfile.rs

📝 Walkthrough

Walkthrough

Adds installability-aware skipping for optional dependencies during prefetch and fresh install, then threads the resulting skip set through current-lockfile filtering and install output. The CLI dispatch future is also pinned before awaiting.

Changes

Optional dependency installability skipping

Layer / File(s) Summary
Platform matching and installability helpers
pacquet/crates/package-is-installable/src/check_platform.rs, pacquet/crates/package-is-installable/src/lib.rs, pacquet/crates/package-manager/src/installability.rs
Adds platform compatibility matching helpers, re-exports platform_is_supported, and introduces installability manifest conversion plus skipped-snapshot helpers.
Fresh-lockfile skipped-snapshot computation
pacquet/crates/package-manager/src/install_with_fresh_lockfile.rs, pacquet/crates/package-manager/src/installability/tests.rs
Adds installability error/result plumbing, computes skipped snapshots during fresh-lockfile install, threads host platform support into prefetch setup, and updates installability tests for optional gating and recomputation.
Optional prefetch gating
pacquet/crates/package-manager/src/prefetching_resolver.rs, pacquet/crates/package-manager/src/prefetching_resolver/tests.rs
Extends prefetch context and owned fetch context with platform data, skips download kickoff for unsupported optional remote tarballs, and adds tests for skip and keep cases.
Current lockfile and install output filtering
pacquet/crates/package-manager/src/current_lockfile.rs, pacquet/crates/package-manager/src/current_lockfile/tests.rs, pacquet/crates/package-manager/src/install.rs, pacquet/crates/package-manager/src/install/tests.rs
Filters current-lockfile snapshots and package metadata with separate reachability sets, threads install_skipped through install post-processing, and adds tests for package metadata preservation and fresh-install skipping output.

CLI Async Dispatch Fix

Layer / File(s) Summary
Pin future before awaiting
pacquet/crates/cli/src/cli_args/pipelines.rs
InstallPipeline::run wraps the dispatched future in Box::pin before awaiting it.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related issues

Possibly related PRs

  • pnpm/pnpm#11816: Both PRs modify the fresh-install lockfile pipeline in pacquet/crates/package-manager/src/install_with_fresh_lockfile.rs.
  • pnpm/pnpm#11856: Both PRs modify the PrefetchingResolver/download prefetch flow in the package manager.
  • pnpm/pnpm#12419: Both PRs update install post-processing around skipped-snapshot pruning and lockfile/module metadata output.

Suggested labels: product: pacquet

Suggested reviewers: qodo-free-for-open-source-projects

✨ 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-optional-install

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

❤️ Share

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

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

Copy link
Copy Markdown

PR Summary by Qodo

Skip unsupported optional deps on fresh-lockfile installs (pacquet)

🐞 Bug fix 🧪 Tests 🕐 20-40 Minutes

Grey Divider

AI Description

• Compute optional-dependency installability skips before fresh virtual-store materialization.
• Avoid prefetch downloads for platform-incompatible optional packages (including inferred
 platforms).
• Persist fresh installability skips into .modules.yaml so later installs keep snapshots skipped.
Diagram

graph TD
  A["Fresh install"] --> B["Dependency resolve"] --> C["PrefetchingResolver"] --> D{"Optional platform OK?"}
  D -->|"yes"| E["Prefetch tarball"] --> F["Create virtual store"] --> G["Write .modules.yaml"]
  D -->|"no"| F
  B --> H["Build wanted lockfile"] --> I["Compute skipped snapshots"] --> F
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Defer all prefetch until after installability computation
  • ➕ Simplifies correctness reasoning: no downloads can happen for skipped snapshots.
  • ➕ Avoids needing any platform heuristics in the resolver wrapper.
  • ➖ Loses resolve-time pipelining benefits and can regress install wall time.
  • ➖ Still requires threading skip state to later phases; doesn’t help non-optional cases.
2. Move full installability evaluation into the resolver layer
  • ➕ Single source of truth: resolve results could carry an explicit “installable on host” bit.
  • ➕ Prefetch and materialization could both reuse the same decision without re-parsing manifests.
  • ➖ Tightens coupling between resolution and host-specific installability (node version/engine strictness, supported architectures).
  • ➖ Harder to preserve the current design where the deps-resolver stays pure and I/O-free.

Recommendation: Keep the PR’s approach: run the full installability skip computation early in the fresh-lockfile pipeline (so downstream materialization/link/build phases see the same skip set), and apply a lightweight platform-only gate in the prefetch resolver to avoid unnecessary downloads. This preserves pipelined performance while matching pnpm’s semantics for unsupported optional dependencies, and keeps engine checks in the authoritative installability pass.

Files changed (7) +435 / -48

Bug fix (4) +137 / -31
pipelines.rsPin the async CLI pipeline future before awaiting +1/-1

Pin the async CLI pipeline future before awaiting

• Wraps 'args.run(...)' in 'Box::pin(...).await', ensuring the returned future is pinned consistently for the install pipeline runner.

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

install.rsThread fresh-install skipped snapshots into pruning, filtering, and manifest writes +5/-5

Thread fresh-install skipped snapshots into pruning, filtering, and manifest writes

• Renames and repurposes the install-time skip set from a frozen-only empty default to a unified 'install_skipped' that also includes fresh-lockfile installability skips. Uses this skip set when pruning the virtual store, writing '.modules.yaml.skipped', and filtering the current lockfile.

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

install_with_fresh_lockfile.rsCompute installability skips before virtual-store materialization and return them +55/-24

Compute installability skips before virtual-store materialization and return them

• Adds an explicit fresh-install installability error variant and computes skipped optional snapshots before 'CreateVirtualStore' runs. Threads 'supported_architectures' into the prefetch context and returns the skip set in 'InstallWithFreshLockfileResult' so the outer install can persist it to '.modules.yaml'.

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

prefetching_resolver.rsSkip prefetch downloads for platform-incompatible optional packages +76/-1

Skip prefetch downloads for platform-incompatible optional packages

• Adds a platform-only prefetch gate for optional dependencies using manifest 'os/cpu/libc' (or inferred platform from native package names) plus supported-architectures overrides. Prevents spawning background tarball downloads when the package cannot run on the current host.

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

Refactor (1) +92 / -17
installability.rsFactor shared installability helpers and reuse for optional platform inference +92/-17

Factor shared installability helpers and reuse for optional platform inference

• Extracts helpers to build an installability manifest from a resolve result and to run installability checks with optional platform inference. Updates 'compute_skipped_snapshots' to call the shared 'check_installability' path, reducing duplicated inference logic and enabling reuse by the prefetch resolver.

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

Tests (2) +206 / -0
tests.rsAdd fresh-install test for skipping platform-incompatible optional dependency +98/-0

Add fresh-install test for skipping platform-incompatible optional dependency

• Introduces an end-to-end test asserting a platform-incompatible optional dep is not linked or extracted on a fresh install. Verifies the optional snapshot remains in the lockfile and that the skipped depPath is persisted into '.modules.yaml.skipped'.

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

tests.rsAdd unit tests for optional prefetch-skip behavior +108/-0

Add unit tests for optional prefetch-skip behavior

• Adds tests verifying prefetch is skipped for unsupported optional manifests and for platforms inferred from optional package names, while required deps still prefetch and get stable package IDs.

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

@github-actions

github-actions Bot commented Jul 4, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                          main                                   pr
-----                          ----                                   --
tarball/download_dependency    1.00      6.8±0.12ms   637.1 KB/sec    1.03      7.0±0.66ms   616.7 KB/sec

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

qodo-free-for-open-source-projects Bot commented Jul 4, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Action required

1. Integrity skipped for tarballs ✓ Resolved 🐞 Bug ⛨ Security
Description
PrefetchingResolver::resolve() skips populate_missing_integrity() when should_skip_prefetch()
is true, so an unsupported optional remote tarball can keep integrity=None and be persisted into
the lockfile. If that dependency later becomes installable, extract_tarball() rejects tarball
resolutions missing integrity and the install fails.
Code

pacquet/crates/package-manager/src/prefetching_resolver.rs[R379-384]

+            if let Some(result_mut) = result.as_mut()
+                && !self.should_skip_prefetch(wanted_dependency, result_mut)
+            {
            self.populate_missing_integrity(result_mut).await?;
            self.maybe_kickoff_download(result_mut);
        }
Evidence
The resolver now skips the only codepath that fills tarball.integrity for integrity-less remote
tarballs, and the installer hard-errors on tarball resolutions without integrity.

pacquet/crates/package-manager/src/prefetching_resolver.rs[176-233]
pacquet/crates/package-manager/src/prefetching_resolver.rs[371-386]
pacquet/crates/package-manager/src/install_package_from_registry.rs[234-257]

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

## Issue description
`PrefetchingResolver::resolve()` currently gates both integrity population and prefetch download behind `!should_skip_prefetch(...)`. This can leave `LockfileResolution::Tarball` entries with `integrity: None` when the dependency is optional + platform-incompatible, which is later fatal if that snapshot becomes installable because the install path refuses tarballs without integrity.
## Issue Context
- `populate_missing_integrity()` exists specifically to fill missing integrity for non-file, non-git-hosted tarballs.
- The install path’s tarball fetch/extract requires an integrity hash.
## Fix Focus Areas
- pacquet/crates/package-manager/src/prefetching_resolver.rs[371-387]
### Concrete fix direction
- Always call `populate_missing_integrity(result_mut).await?` for tarball resolutions where integrity is missing (and not `file:` / git-hosted), even if `should_skip_prefetch(...)` returns true.
- Keep the *download spawn* (`maybe_kickoff_download`) behind the platform-compatibility skip, so the change still avoids prefetching incompatible optional packages.
One simple restructuring:
- Call `populate_missing_integrity()` first.
- Then call `maybe_kickoff_download()` only when `!should_skip_prefetch(...)`.
(You may want to ensure the integrity-population path doesn’t spawn an extra download; it already inserts into `spawned_urls` to prevent duplicate spawns.)

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



Remediation recommended

2. Misleading platform error triple 🐞 Bug ◔ Observability
Description
check_platform() evaluates compatibility using supported_architectures overrides, but when it
constructs UnsupportedPlatformError it always records current as the raw host triple. This makes
ERR_PNPM_UNSUPPORTED_PLATFORM diagnostics inconsistent with the actual evaluation when
supportedArchitectures is configured.
Code

pacquet/crates/package-is-installable/src/check_platform.rs[R149-154]

+    let real_current = Platform {
+        os: vec![current_os.to_string()],
+        cpu: vec![current_cpu.to_string()],
+        libc: vec![current_libc.to_string()],
   };
+    Some(UnsupportedPlatformError::new(package_id.to_string(), owned_wanted, real_current))
Evidence
The Platform type and the supported_architectures docstring indicate the platform triple can be
overridden for evaluation, but check_platform() currently always records the raw host triple into
the error payload, so the diagnostic may not match the values used during platform_is_supported()
evaluation.

pacquet/crates/package-is-installable/src/check_platform.rs[47-54]
pacquet/crates/package-is-installable/src/check_platform.rs[132-155]

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

## Issue description
`check_platform()` uses `supported_architectures` to decide whether a wanted platform is supported, but the `UnsupportedPlatformError.current` payload is always built from the raw `current_os/current_cpu/current_libc`. This makes the error’s `(current: ...)` misleading whenever `supportedArchitectures` overrides are in effect.
## Issue Context
`Platform` is documented as "Current host platform triple, as reported (or overridden by `supported_architectures`)". The error payload should reflect the same effective triple that was used for evaluation (or otherwise clearly distinguish host vs overridden evaluation).
## Fix Focus Areas
- pacquet/crates/package-is-installable/src/check_platform.rs[132-155]
## Suggested fix approach
In the cold path (when building `UnsupportedPlatformError`), materialize `Platform { os, cpu, libc }` from `supported_architectures` when provided:
- For each axis: if override list is present, map entries so `"current"` becomes the concrete host value, and keep any other entries as-is.
- If override list is absent for an axis, default to `[current_<axis>]`.
Then use that effective `Platform` in the error instead of always using `[current_os]`, `[current_cpu]`, `[current_libc]`.

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


3. Double reachability traversal 🐞 Bug ➹ Performance
Description
filter_lockfile_for_current() now runs two separate BFS traversals (collect_reachable) over the
snapshot graph to compute reachable and metadata_reachable, roughly doubling traversal work when
writing /lock.yaml. This adds avoidable CPU/allocations on large lockfiles and extends the install
critical path.
Code

pacquet/crates/package-manager/src/current_lockfile.rs[R43-49]

+    let reachable = collect_reachable(&lockfile.importers, lockfile.snapshots.as_ref(), |key| {
+        skipped.contains(key)
+    });
+    let metadata_reachable =
+        collect_reachable(&lockfile.importers, lockfile.snapshots.as_ref(), |key| {
+            skipped.contains_optional_excluded(key)
+        });
Evidence
The code now calls collect_reachable twice, and collect_reachable is implemented as a BFS over
the snapshot graph; install.rs calls this filter right before saving the current lockfile on both
frozen and fresh install paths.

pacquet/crates/package-manager/src/current_lockfile.rs[38-50]
pacquet/crates/package-manager/src/current_lockfile.rs[152-213]
pacquet/crates/package-manager/src/install.rs[1547-1592]

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

## Issue description
`filter_lockfile_for_current()` computes snapshot reachability twice via `collect_reachable()`, which is a full BFS over the snapshot graph. This doubles work on the install hot path when persisting the current lockfile.
### Issue Context
The PR intentionally changes semantics: snapshot pruning uses the full skip set, but the package metadata map should only drop user exclusions. The implementation achieves this with two traversals; the request is to preserve behavior while reducing redundant work.
### Fix Focus Areas
- pacquet/crates/package-manager/src/current_lockfile.rs[38-110]
- pacquet/crates/package-manager/src/current_lockfile.rs[152-234]
### Suggested approach
- Keep the existing behavior, but reduce traversal cost by avoiding a second full BFS where possible.
- Options (pick one):
- Compute `reachable` once (full skip set) and compute `reachable_metadata` without a second BFS by filtering the existing `packages` map using a derived set of *user-excluded* metadata keys (e.g., map `optional_excluded` snapshot keys to `without_peer()` and drop only those metadata rows).
- Or, compute `metadata_reachable` via a targeted walk starting from installability-skipped snapshots (and/or importer roots) rather than re-walking the entire graph.
- Add a micro-benchmark or timing log (behind feature/test) if needed to validate the improvement on large graphs.

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


4. Seed skips bypass required ✓ Resolved 🐞 Bug ☼ Reliability
Description
Fresh installs now persist fresh_result.skipped into .modules.yaml, but frozen installs treat
seeded keys as unconditionally skipped before checking snapshot.optional / engine_strict. If a
snapshot key previously skipped as optional later becomes non-optional, it can be silently omitted
(no error/warn), leaving a required dependency uninstalled.
Code

pacquet/crates/package-manager/src/install.rs[R1410-1414]

     (
         fresh_result.hoisted_dependencies,
         fresh_result.hoisted_locations,
-                crate::SkippedSnapshots::new(),
+                fresh_result.skipped,
         fresh_result.wanted_lockfile,
Evidence
The PR starts persisting fresh-install skips (fresh_result.skipped), and .modules.yaml writes
the installability subset; frozen installs seed from that file. compute_skipped_snapshots
currently skips any seeded key before reading snapshot.optional, so a key that becomes required
later would still be skipped with no further checks.

pacquet/crates/package-manager/src/install.rs[1409-1415]
pacquet/crates/package-manager/src/install.rs[2033-2074]
pacquet/crates/package-manager/src/install_frozen_lockfile.rs[635-661]
pacquet/crates/package-manager/src/installability.rs[448-451]

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

## Issue description
Fresh installs now persist installability-skipped snapshot keys into `.modules.yaml.skipped` via `fresh_result.skipped`. On later installs, the frozen-lockfile path seeds `SkippedSnapshots` from `.modules.yaml` and `compute_skipped_snapshots` short-circuits any seeded key *before* it inspects the current snapshot’s `optional` flag.
If the same `PackageKey` later appears as **non-optional** (e.g., graph changes make it reachable via a required edge), the seeded skip will suppress re-evaluation and suppress `engine_strict` enforcement, causing a required dependency to be missing without an error.
### Issue Context
- Fresh install path now returns a non-empty skip set (`fresh_result.skipped`) to the outer install pipeline, which is then written to `.modules.yaml`.
- Frozen install path seeds from `.modules.yaml.skipped`.
- The skip seed is stored only as `PackageKey` strings, so it cannot encode “optional-only” and can match later required snapshots.
### Fix Focus Areas
- pacquet/crates/package-manager/src/installability.rs[448-475]
- pacquet/crates/package-manager/src/install_frozen_lockfile.rs[635-710]
- pacquet/crates/package-manager/src/install.rs[1409-1415]
### Suggested fix
In `compute_skipped_snapshots`, when encountering a seeded skip:
1. If the current `snapshot.optional` is **true**, keep the existing short-circuit (`continue`).
2. If the current `snapshot.optional` is **false**, **do not** short-circuit. Instead, remove the key from the installability seed (e.g., `skipped.installability.remove(snapshot_key)` since you’re in the same module) and proceed with normal evaluation so non-optional incompatibilities can warn/error as intended.
This preserves the “don’t re-emit skip logs” behavior for truly-optional snapshots, while preventing stale persisted skips from suppressing required dependencies.

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


View more (4)
5. Fresh installability scan cost ✓ Resolved 🐞 Bug ➹ Performance
Description
InstallWithFreshLockfile now runs compute_skipped_snapshots (and host Node detection) on the
fresh-lockfile path whenever any_installability_constraint is true, which adds an extra full
snapshot walk before virtual-store materialization. Since any_installability_constraint is
triggered by common metadata fields like engines.node/engines.pnpm, this can add measurable
overhead to many fresh installs even when only optional-platform skipping is needed.
Code

pacquet/crates/package-manager/src/install_with_fresh_lockfile.rs[R1490-1506]

+        let mut skipped = match (
+            built_lockfile.snapshots.as_ref(),
+            built_lockfile.packages.as_ref(),
+            installability_host.as_ref(),
+        ) {
+            (Some(snapshots), Some(packages), Some(host)) => {
+                crate::compute_skipped_snapshots::<Reporter>(
+                    snapshots,
+                    packages,
+                    host,
+                    requester,
+                    SkippedSnapshots::new(),
+                )
+                .map_err(InstallWithFreshLockfileError::Installability)?
+            }
+            _ => SkippedSnapshots::new(),
+        };
Evidence
The fresh-lockfile path now gates and executes a full installability skip computation before
materialization. The gate includes engines constraints (node/pnpm), and the computation iterates all
snapshots and calls into installability checks per metadata row, which is additional hot-path work
on fresh installs.

pacquet/crates/package-manager/src/install_with_fresh_lockfile.rs[1398-1506]
pacquet/crates/package-manager/src/installability.rs[375-505]
pacquet/crates/package-manager/src/installability.rs[520-554]

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

## Issue description
Fresh-lockfile installs now compute an installability-based `skipped` set before materialization by calling `compute_skipped_snapshots`. This is an O(N snapshots) pass plus a host Node detection step, and it runs whenever `any_installability_constraint` returns true.
Because `any_installability_constraint` is true for any metadata row with `engines.node`/`engines.pnpm` (and many packages declare engines), the new pass can run on a wide set of projects, potentially regressing fresh-install performance.
### Issue Context
This PR’s primary functional goal is to avoid work for unsupported *optional* dependencies (especially platform-incompatible ones) before prefetch/materialization. A cheaper pre-pass could often be sufficient (e.g., platform-only checks for optional snapshots), while keeping the full installability pass for cases that truly need it.
### Fix Focus Areas
- pacquet/crates/package-manager/src/install_with_fresh_lockfile.rs[1398-1506]
- pacquet/crates/package-manager/src/installability.rs[520-554]
- pacquet/crates/package-manager/src/installability.rs[375-505]
### Suggested implementation directions
Pick one (or combine):
1) **Narrow the gate**: only run the full `compute_skipped_snapshots` pre-pass when it can affect install output (e.g., when optional deps are included and there exists at least one `snapshot.optional == true` that has platform constraints or name-inferred platform). Keep the existing full pass behavior for frozen installs.
2) **Split fast/slow paths**: introduce a lightweight “platform-only optional skip” pass for the fresh-lockfile path (using `check_platform` + name inference) to prevent prefetch/materialization of incompatible optional packages, and defer full engine checks to a later stage if/when needed.
3) **Avoid duplicate scans**: if you keep the current design, consider threading the `any_installability_constraint` result into `compute_skipped_snapshots` so it doesn’t re-scan internally (minor, but helps on large graphs).

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


6. Optional tarball skip gap ✓ Resolved 🐞 Bug ➹ Performance
Description
PrefetchingResolver::should_skip_prefetch returns false when the derived manifest name is empty,
so optional http(s) tarball resolutions (where ResolveResult.name_ver is None) can still be
prefetched if the tarball’s package.json omits/invalidates name. This leaves a class of
optional, potentially platform-specific URL tarballs outside the new prefetch-skip behavior even
though WantedDependency.alias is available.
Code

pacquet/crates/package-manager/src/prefetching_resolver.rs[R341-352]

+    fn should_skip_prefetch(
+        &self,
+        wanted_dependency: &WantedDependency,
+        result: &ResolveResult,
+    ) -> bool {
+        if wanted_dependency.optional != Some(true) || result.manifest.is_none() {
+            return false;
+        }
+        let manifest = crate::manifest_from_resolve_result(result);
+        if manifest.name.is_empty() {
+            return false;
+        }
Evidence
The new prefetch-skip logic explicitly bails out when the derived manifest name is empty. URL
tarball resolutions set name_ver to None by design and rely on the embedded manifest for naming,
but still preserve alias, so the empty-name bail-out leaves an avoidable prefetch path for
optional URL tarballs.

pacquet/crates/package-manager/src/prefetching_resolver.rs[341-367]
pacquet/crates/resolving-tarball-resolver/src/tarball_resolver.rs[229-258]
pacquet/crates/resolving-resolver-base/src/resolve.rs[63-98]

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

## Issue description
`PrefetchingResolver::should_skip_prefetch` refuses to run platform compatibility checks when `manifest.name` is empty. For URL tarball resolutions, `ResolveResult.name_ver` is explicitly `None`, so the only name source is the tarball’s embedded `package.json`.
If that manifest is missing/invalid for `name`, the prefetch skip never triggers, and the resolver proceeds to populate integrity and potentially kick off a download for an optional dependency.
### Issue Context
The tarball resolver deliberately sets `name_ver: None` for URL tarballs and preserves the caller-provided `WantedDependency.alias`. That alias is a workable fallback identifier for name-based platform inference (the same style used for packages like `@esbuild/*-arm64`, etc.), and it’s already carried on `ResolveResult`.
### Fix Focus Areas
- pacquet/crates/package-manager/src/prefetching_resolver.rs[341-367]
- pacquet/crates/package-manager/src/installability.rs[296-317]
- pacquet/crates/resolving-tarball-resolver/src/tarball_resolver.rs[229-258]
- pacquet/crates/resolving-resolver-base/src/resolve.rs[63-98]
### Suggested fix
When `manifest_from_resolve_result(result).name` is empty, fall back to a stable name source before giving up:
- Prefer `result.alias` (or `wanted_dependency.alias`) when present.
- Only if both are missing should you bail out.
Then run `manifest_with_inferred_platform` and `check_platform` using that name so optional URL-tarball deps can benefit from the same platform-prefetch skip logic.

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


7. Manifest-gated prefetch skip ✓ Resolved 🐞 Bug ➹ Performance
Description
PrefetchingResolver::should_skip_prefetch returns early when ResolveResult.manifest is None,
even though the resolver contract allows manifest to be absent; this prevents name-based platform
inference from suppressing optional prefetch in those cases. The result is avoidable
prefetch/download work for optional deps in resolver paths that defer manifest loading.
Code

pacquet/crates/package-manager/src/prefetching_resolver.rs[R342-349]

+    fn should_skip_prefetch(
+        &self,
+        wanted_dependency: &WantedDependency,
+        result: &ResolveResult,
+    ) -> bool {
+        if wanted_dependency.optional != Some(true) || result.manifest.is_none() {
+            return false;
+        }
Evidence
The prefetch skip is disabled whenever manifest is absent, but the resolver base type documents
that manifest may be omitted by some protocols; meanwhile, manifest_from_resolve_result already
falls back to name_ver and can still support name-based inference without a manifest payload.

pacquet/crates/package-manager/src/prefetching_resolver.rs[342-353]
pacquet/crates/resolving-resolver-base/src/resolve.rs[399-405]
pacquet/crates/package-manager/src/installability.rs[287-307]

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

## Issue description
`PrefetchingResolver::should_skip_prefetch` currently short-circuits when `result.manifest` is `None`. However, `ResolveResult.manifest` is explicitly optional in the resolver contract, and `manifest_from_resolve_result()` already prefers `result.name_ver` for the package name.
This means the prefetch-skip optimization can be silently disabled for resolver implementations that legitimately defer manifest loading, even when platform incompatibility can be inferred from the package name (or when `name_ver` is present).
### Issue Context
This PR adds a prefetch shortcut to avoid downloading tarballs for platform-incompatible *optional* dependencies. The shortcut is currently gated on `result.manifest.is_some()`, which is stricter than the resolver contract.
### Fix Focus Areas
- pacquet/crates/package-manager/src/prefetching_resolver.rs[342-353]
Suggested change: remove the `result.manifest.is_none()` check from the early return, relying on `manifest_from_resolve_result()` (which already handles `manifest: None`) plus the existing `manifest.name.is_empty()` guard.

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


8. Resolver skip alloc overhead ✓ Resolved 🐞 Bug ➹ Performance
Description
PrefetchingResolver::should_skip_prefetch adds per-edge JSON parsing/cloning (including engines
parsing) and calls check_platform() (which allocates an error payload on mismatches) even though
the prefetch shortcut only needs a cheap platform-compatibility predicate. This extra work runs in
the resolver loop (called once per dependency edge) and currently runs even for non-tarball
resolutions where prefetching would be a no-op, risking measurable install slowdowns on graphs with
many optional edges.
Code

pacquet/crates/package-manager/src/prefetching_resolver.rs[R342-387]

+    fn should_skip_prefetch(
+        &self,
+        wanted_dependency: &WantedDependency,
+        result: &ResolveResult,
+    ) -> bool {
+        if wanted_dependency.optional != Some(true) || result.manifest.is_none() {
+            return false;
+        }
+        let manifest = crate::manifest_from_resolve_result(result);
+        if manifest.name.is_empty() {
+            return false;
+        }
+        let effective: PackageInstallabilityManifest;
+        let manifest = if let Some(platform) = inferred_platform(
+            &manifest.name,
+            WantedPlatformRef {
+                os: manifest.os.as_deref(),
+                cpu: manifest.cpu.as_deref(),
+                libc: manifest.libc.as_deref(),
+            },
+        ) {
+            effective = PackageInstallabilityManifest {
+                name: manifest.name.clone(),
+                engines: manifest.engines.clone(),
+                os: platform.os,
+                cpu: platform.cpu,
+                libc: platform.libc,
+            };
+            &effective
+        } else {
+            &manifest
+        };
+        check_platform(
+            &package_id(result, manifest),
+            WantedPlatformRef {
+                os: manifest.os.as_deref(),
+                cpu: manifest.cpu.as_deref(),
+                libc: manifest.libc.as_deref(),
+            },
+            self.ctx.supported_architectures.as_ref(),
+            self.ctx.current_os,
+            self.ctx.current_cpu,
+            self.ctx.current_libc,
+        )
+        .is_some()
+    }
Evidence
The resolver is explicitly documented as being invoked once per dependency edge, so extra work here
scales with graph size. The new should_skip_prefetch constructs/parses a manifest and then calls
check_platform for a boolean, but check_platform allocates an error payload on the mismatch
path; additionally, should_skip_prefetch currently runs before the existing tarball gates that
no-op on non-tarball resolutions.

pacquet/crates/package-manager/src/prefetching_resolver.rs[271-273]
pacquet/crates/package-manager/src/prefetching_resolver.rs[342-405]
pacquet/crates/package-manager/src/prefetching_resolver.rs[184-186]
pacquet/crates/package-manager/src/installability.rs[287-330]
pacquet/crates/package-is-installable/src/check_platform.rs[172-190]
REVIEW_GUIDE.md[115-127]

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 new `PrefetchingResolver::should_skip_prefetch` performs unnecessary allocations/parsing in a resolver hot path:
- It constructs a full `PackageInstallabilityManifest` from an untyped JSON manifest and parses `engines` even though the prefetch shortcut only checks platform axes.
- It uses `check_platform()` and immediately discards the error value; on the mismatch path `check_platform()` materializes owned error payloads.
- It runs even when `result.resolution` is not a tarball, although prefetching only applies to tarball-shaped resolutions.
This adds avoidable CPU/allocations during dependency resolution (which is called once per (parent, child) edge).
## Issue Context
This PR is intended to *reduce* wasted work (skip prefetching unsupported optional deps). To keep the win, the check itself should be minimal and only run when prefetching could happen.
## Fix Focus Areas
- pacquet/crates/package-manager/src/prefetching_resolver.rs[177-235]
- pacquet/crates/package-manager/src/prefetching_resolver.rs[342-405]
- pacquet/crates/package-manager/src/installability.rs[287-342]
- pacquet/crates/package-is-installable/src/check_platform.rs[135-193]
## Suggested fix approach
1. **Gate `should_skip_prefetch` on tarball resolutions** (or on the same condition that would lead to a prefetch spawn) so non-tarball results don’t pay the manifest/platform parsing cost.
2. **Avoid parsing `engines` on the prefetch-skip path**:
- Either add a platform-only helper (e.g. `platform_fields_from_resolve_result`) or change `manifest_from_resolve_result` to omit `engines` (since it’s only used by prefetch skip today).
3. **Avoid building allocation-heavy platform errors just to get a boolean**:
- Prefer a lightweight boolean predicate in `package-is-installable` (e.g. `platform_matches(...) -> bool`) that shares the same logic as `check_platform` but doesn’t allocate an error payload.
- If adding a new helper is too invasive, at least minimize allocations before calling `check_platform` (avoid cloning `engines`, avoid building a full manifest struct when only slices are needed).

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



Informational

9. Name allocation in gate ✓ Resolved 🐞 Bug ➹ Performance
Description
any_optional_installability_constraint() calls `inferred_platform(&metadata_key.name.to_string(),
...), allocating a new String` per optional snapshot just to run name-based platform inference.
infer_platform_from_package_name() strips scopes internally, so passing metadata_key.name.bare
avoids this allocation on the fresh-lockfile gating pass.
Code

pacquet/crates/package-manager/src/installability.rs[R544-560]

+    snapshots.iter().any(|(snapshot_key, snapshot)| {
+        if !snapshot.optional {
+            return false;
+        }
+        let metadata_key = snapshot_key.without_peer();
+        packages.get(&metadata_key).is_some_and(|metadata| {
+            metadata_has_meaningful_constraint(metadata)
+                || inferred_platform(
+                    &metadata_key.name.to_string(),
+                    WantedPlatformRef {
+                        os: metadata.os.as_deref(),
+                        cpu: metadata.cpu.as_deref(),
+                        libc: metadata.libc.as_deref(),
+                    },
+                )
+                .is_some()
+        })
Evidence
The new gate allocates to_string() per optional snapshot; the inference implementation immediately
strips scope by taking the substring after '/', making the bare name sufficient.

pacquet/crates/package-manager/src/installability.rs[539-560]
pacquet/crates/package-is-installable/src/infer_platform_from_package_name.rs[49-53]

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

## Issue description
`any_optional_installability_constraint()` allocates `metadata_key.name.to_string()` per optional snapshot to call `inferred_platform()`, even though the inference code ignores the scope portion and operates on the post-`/` segment.
## Issue Context
This function runs as a pre-pass gate on the fresh-lockfile path to decide whether to run a heavier installability skip computation. Avoiding per-snapshot `String` allocations keeps the gate cheaper.
## Fix Focus Areas
- pacquet/crates/package-manager/src/installability.rs[539-562]
- pacquet/crates/package-is-installable/src/infer_platform_from_package_name.rs[49-53]
### Concrete fix direction
- Replace `&metadata_key.name.to_string()` with `metadata_key.name.bare.as_str()` when calling `inferred_platform(...)` in `any_optional_installability_constraint()`.
- (Optional) Apply the same adjustment to any other *new* call sites introduced in this PR that only need the bare name for inference.

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


10. Extra inference cloning 🐞 Bug ➹ Performance
Description
When platform inference applies for optional packages, manifest_with_inferred_platform() creates a
new owned manifest and re-clones name/engines, adding per-snapshot allocations in
compute_skipped_snapshots(). This increases overhead on installs with many platform-named optional
packages (e.g. @esbuild/* variants).
Code

pacquet/crates/package-manager/src/installability.rs[R273-307]

+pub(crate) fn check_installability(
+    package_id: &str,
+    manifest: &PackageInstallabilityManifest,
+    options: &InstallabilityOptions<'_>,
+) -> Result<Option<InstallabilityError>, Box<InstallabilityError>> {
+    let manifest = if options.optional {
+        manifest_with_inferred_platform(manifest)
+    } else {
+        Cow::Borrowed(manifest)
+    };
+    check_package(package_id, manifest.as_ref(), options)
+        .map_err(|invalid| Box::new(InstallabilityError::InvalidNodeVersion(invalid)))
+}
+
+pub(crate) fn manifest_with_inferred_platform(
+    manifest: &PackageInstallabilityManifest,
+) -> Cow<'_, PackageInstallabilityManifest> {
+    let Some(platform) = inferred_platform(
+        &manifest.name,
+        WantedPlatformRef {
+            os: manifest.os.as_deref(),
+            cpu: manifest.cpu.as_deref(),
+            libc: manifest.libc.as_deref(),
+        },
+    ) else {
+        return Cow::Borrowed(manifest);
+    };
+    Cow::Owned(PackageInstallabilityManifest {
+        name: manifest.name.clone(),
+        engines: manifest.engines.clone(),
+        os: platform.os,
+        cpu: platform.cpu,
+        libc: platform.libc,
+    })
+}
Evidence
manifest_with_inferred_platform() constructs a new manifest by cloning name and engines when
inference hits, and compute_skipped_snapshots() calls check_installability() on cache misses, so
these clones can occur during the per-snapshot loop.

pacquet/crates/package-manager/src/installability.rs[273-307]
pacquet/crates/package-manager/src/installability.rs[444-467]

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

## Issue description
`check_installability()` uses `manifest_with_inferred_platform()` for optional packages, and that function constructs a new owned `PackageInstallabilityManifest` by cloning `name` and `engines` when inference succeeds. In `compute_skipped_snapshots()`, the manifest is already owned per cache miss, so these extra clones are avoidable.
### Issue Context
This runs in the per-install installability pass. The PR’s goal (skipping incompatible optional deps early) is correct; this is a small optimization to keep the new behavior from adding unnecessary allocations.
### Fix Focus Areas
- pacquet/crates/package-manager/src/installability.rs[273-307]
- pacquet/crates/package-manager/src/installability.rs[444-467]
### Suggested approach
- Replace the clone-heavy `Cow::Owned` path with an in-place transformation for owned manifests:
- Add a helper like `apply_inferred_platform_in_place(manifest: &mut PackageInstallabilityManifest)` that mutates `os/cpu/libc` when inference returns a platform.
- In `compute_skipped_snapshots()`, keep `let mut manifest = manifest_from_metadata(...)` and apply inference in-place for `snapshot.optional` before calling `check_package`.
- For the resolver-side prefetch shortcut (which also builds an owned manifest), use the same in-place helper instead of creating a second owned copy.

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


Grey Divider

Qodo Logo

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
pacquet/crates/package-manager/src/prefetching_resolver.rs (1)

354-373: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicated inferred_platform "effective manifest" construction.

This block is a near-verbatim copy of the one in installability.rs::check_installability (lines 262-283). Consider extracting a small helper (e.g. fn apply_inferred_platform(m: &PackageInstallabilityManifest) -> Option<PackageInstallabilityManifest>) in installability.rs and calling it from both sites so the two skip paths can't drift.

The only difference is the options.optional && guard in check_installability, which this caller already applies earlier via the wanted_dependency.optional != Some(true) early return.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pacquet/crates/package-manager/src/prefetching_resolver.rs` around lines 354
- 373, The `inferred_platform` “effective manifest” logic in
`prefetching_resolver.rs` is duplicated from
`installability.rs::check_installability` and can drift over time. Extract a
shared helper in `installability.rs` such as an `apply_inferred_platform`
function that builds the adjusted `PackageInstallabilityManifest`, then call it
from both `check_installability` and this resolver path; keep the existing
optional-package guard behavior at each call site, since this caller already
filters optional dependencies earlier.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pacquet/crates/package-manager/src/install/tests.rs`:
- Around line 5397-5417: Update the install test in tests.rs to also verify the
saved current lockfile under the virtual store directory, not just
pnpm-lock.yaml and .modules.yaml.skipped. Reuse the existing Lockfile parsing
and the skipped_key derived from the optional snapshot, then read the current
lockfile path and assert that this snapshot is absent there. This will extend
coverage for the fresh-path filtering behavior exercised by install.rs and
should be added alongside the existing checks in the same test.

---

Nitpick comments:
In `@pacquet/crates/package-manager/src/prefetching_resolver.rs`:
- Around line 354-373: The `inferred_platform` “effective manifest” logic in
`prefetching_resolver.rs` is duplicated from
`installability.rs::check_installability` and can drift over time. Extract a
shared helper in `installability.rs` such as an `apply_inferred_platform`
function that builds the adjusted `PackageInstallabilityManifest`, then call it
from both `check_installability` and this resolver path; keep the existing
optional-package guard behavior at each call site, since this caller already
filters optional dependencies earlier.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 05a59af8-32f7-4ea7-8894-63833caf024b

📥 Commits

Reviewing files that changed from the base of the PR and between fbf78bd and 90089a2.

📒 Files selected for processing (7)
  • pacquet/crates/cli/src/cli_args/pipelines.rs
  • pacquet/crates/package-manager/src/install.rs
  • pacquet/crates/package-manager/src/install/tests.rs
  • pacquet/crates/package-manager/src/install_with_fresh_lockfile.rs
  • pacquet/crates/package-manager/src/installability.rs
  • pacquet/crates/package-manager/src/prefetching_resolver.rs
  • pacquet/crates/package-manager/src/prefetching_resolver/tests.rs

@codecov-commenter

codecov-commenter commented Jul 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.29630% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.14%. Comparing base (2f389d6) to head (dad7bb4).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...package-manager/src/install_with_fresh_lockfile.rs 80.95% 8 Missing ⚠️
...cquet/crates/package-manager/src/installability.rs 98.03% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12809      +/-   ##
==========================================
+ Coverage   85.06%   85.14%   +0.07%     
==========================================
  Files         415      415              
  Lines       65533    65711     +178     
==========================================
+ Hits        55747    55947     +200     
+ Misses       9786     9764      -22     

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

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

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 90089a2

@zkochan

zkochan commented Jul 4, 2026

Copy link
Copy Markdown
Member Author

Addressed the remaining review items in 78067a1:

  • Fresh current lockfile persistence now filters out install-time skipped snapshots before writing <virtual_store_dir>/lock.yaml.
  • The fresh install regression now asserts the skipped optional snapshot is absent from the saved current lockfile.
  • The inferred-platform manifest adjustment is shared through manifest_with_inferred_platform, so the installability and prefetch paths do not duplicate that construction.

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pacquet/crates/package-manager/src/install.rs`:
- Around line 1581-1592: The fresh-install save path in install.rs is dropping
the metadata entry for skipped OS-incompatible optionals because
`filter_lockfile_for_current` is applied before writing the current lockfile.
Update the current-lockfile generation so `packages` stays identical to the
wanted lockfile and only the install skip is reflected in `.modules.yaml` or
materialization state; keep the `fresh_lockfile` branch and
`save_current_to_virtual_store_dir` flow, but change
`filter_lockfile_for_current` so it does not prune `packages` for
`install_skipped` entries.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 435e68fe-077b-4015-a127-58988531562c

📥 Commits

Reviewing files that changed from the base of the PR and between 90089a2 and 78067a1.

📒 Files selected for processing (4)
  • pacquet/crates/package-manager/src/install.rs
  • pacquet/crates/package-manager/src/install/tests.rs
  • pacquet/crates/package-manager/src/installability.rs
  • pacquet/crates/package-manager/src/prefetching_resolver.rs
🚧 Files skipped from review as they are similar to previous changes (3)
  • pacquet/crates/package-manager/src/install/tests.rs
  • pacquet/crates/package-manager/src/installability.rs
  • pacquet/crates/package-manager/src/prefetching_resolver.rs

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

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 78067a1

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

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 78067a1

Copilot AI review requested due to automatic review settings July 4, 2026 23:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@zkochan

zkochan commented Jul 4, 2026

Copy link
Copy Markdown
Member Author

Addressed the new PR-level review items in 2ce334f:

  • Persisted installability skips are retained only for snapshots that are still optional, so a later required dependency is rechecked instead of silently skipped.
  • The fresh-lockfile installability pre-pass now runs only when an optional snapshot can be skipped.
  • Optional tarball prefetch skipping now works without a manifest payload, falls back to the dependency alias when needed, and only runs for remote tarball resolutions.
  • The prefetch path now uses a platform-only boolean helper instead of building platform error payloads just to decide whether to skip.
  • Current-lockfile packages metadata is preserved for installability-skipped optionals while skipped snapshots remain out of the materialized graph.

Validation: focused package-manager/package-is-installable tests, clippy for touched crates, dylint for package-manager, and the full pre-push hook all passed.


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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pacquet/crates/package-manager/src/prefetching_resolver.rs`:
- Around line 349-357: The prefetch gating in
prefetching_resolver::should_prefetch is incorrectly using manifest.name as a
prerequisite for platform checks, which lets anonymous manifests bypass explicit
os/cpu/libc filtering. Update the logic around
platform_manifest_from_resolve_result, manifest_with_inferred_platform, and
platform_is_supported so explicit platform constraints are evaluated even when
the manifest name is empty, and only skip prefetch when the dependency is truly
optional/inapplicable rather than name-less.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 97f20a04-a797-4446-ba06-5536fda196cd

📥 Commits

Reviewing files that changed from the base of the PR and between 78067a1 and 2ce334f.

📒 Files selected for processing (10)
  • pacquet/crates/package-is-installable/src/check_platform.rs
  • pacquet/crates/package-is-installable/src/lib.rs
  • pacquet/crates/package-manager/src/current_lockfile.rs
  • pacquet/crates/package-manager/src/current_lockfile/tests.rs
  • pacquet/crates/package-manager/src/install/tests.rs
  • pacquet/crates/package-manager/src/install_with_fresh_lockfile.rs
  • pacquet/crates/package-manager/src/installability.rs
  • pacquet/crates/package-manager/src/installability/tests.rs
  • pacquet/crates/package-manager/src/prefetching_resolver.rs
  • pacquet/crates/package-manager/src/prefetching_resolver/tests.rs
🚧 Files skipped from review as they are similar to previous changes (2)
  • pacquet/crates/package-manager/src/install/tests.rs
  • pacquet/crates/package-manager/src/install_with_fresh_lockfile.rs

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

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 2ce334f

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

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 2ce334f

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

Copy link
Copy Markdown

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

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

Copy link
Copy Markdown

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

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

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: dad7bb4700d1

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

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 3.829 ± 0.165 3.678 4.117 1.79 ± 0.12
pacquet@main 3.850 ± 0.171 3.609 4.070 1.80 ± 0.12
pnpr@HEAD 2.149 ± 0.116 2.032 2.391 1.00 ± 0.07
pnpr@main 2.141 ± 0.107 2.025 2.325 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 3.8289849602800006,
      "stddev": 0.16469510478579924,
      "median": 3.79473890498,
      "user": 3.5848623,
      "system": 3.4120760000000003,
      "min": 3.67846957748,
      "max": 4.11736615848,
      "times": [
        4.11736615848,
        3.71243388848,
        3.69620336848,
        3.68109029348,
        3.87139721348,
        3.83165577248,
        3.75782203748,
        4.1088283714800005,
        3.83458292148,
        3.67846957748
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 3.8497418772800005,
      "stddev": 0.171211780954643,
      "median": 3.81226227898,
      "user": 3.6199889,
      "system": 3.373734699999999,
      "min": 3.60874756548,
      "max": 4.07030717948,
      "times": [
        3.60874756548,
        4.0636800734800005,
        3.72126724948,
        3.94251230748,
        4.04336505048,
        4.07030717948,
        3.71308317348,
        3.75025245848,
        3.87427209948,
        3.70993161548
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 2.14863603748,
      "stddev": 0.11635267858248813,
      "median": 2.1143683709800003,
      "user": 2.6404349,
      "system": 3.0006180999999996,
      "min": 2.03162796648,
      "max": 2.39067369848,
      "times": [
        2.03246461548,
        2.39067369848,
        2.09131241648,
        2.13742432548,
        2.03162796648,
        2.07693348348,
        2.23131190948,
        2.23642391448,
        2.05094721548,
        2.20724082948
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 2.14099668048,
      "stddev": 0.10712405596782447,
      "median": 2.0973409414799997,
      "user": 2.6820967999999996,
      "system": 3.0050861,
      "min": 2.0247839764799997,
      "max": 2.32450302948,
      "times": [
        2.08097700248,
        2.21687641548,
        2.32450302948,
        2.03160758248,
        2.29817966648,
        2.07759367248,
        2.07347509548,
        2.16826548348,
        2.11370488048,
        2.0247839764799997
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 638.9 ± 10.3 625.6 661.3 1.00
pacquet@main 690.6 ± 65.5 644.6 870.1 1.08 ± 0.10
pnpr@HEAD 698.4 ± 36.9 663.4 797.5 1.09 ± 0.06
pnpr@main 699.7 ± 35.7 662.6 773.1 1.10 ± 0.06
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.63886549128,
      "stddev": 0.010348498415444397,
      "median": 0.63665355148,
      "user": 0.37671299999999996,
      "system": 1.31662254,
      "min": 0.62562030848,
      "max": 0.66128729248,
      "times": [
        0.63539813948,
        0.63273878748,
        0.64488950348,
        0.63790896348,
        0.66128729248,
        0.64070947548,
        0.62562030848,
        0.64752042748,
        0.62958305048,
        0.63299896448
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.69057940638,
      "stddev": 0.06545701731431475,
      "median": 0.67128543548,
      "user": 0.39885669999999995,
      "system": 1.3411017399999998,
      "min": 0.64461262248,
      "max": 0.87007410748,
      "times": [
        0.71190167748,
        0.64461262248,
        0.6707789964800001,
        0.66651371448,
        0.67179187448,
        0.66014442448,
        0.67748203248,
        0.65704020948,
        0.67545440448,
        0.87007410748
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.69838034378,
      "stddev": 0.03690309046138794,
      "median": 0.68887944898,
      "user": 0.3869897,
      "system": 1.3408501400000001,
      "min": 0.66339494548,
      "max": 0.79747860048,
      "times": [
        0.68369493548,
        0.67869060948,
        0.69665830148,
        0.66339494548,
        0.68176454148,
        0.69235608748,
        0.68540281048,
        0.69524947748,
        0.79747860048,
        0.70911312848
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.6996822843799999,
      "stddev": 0.03567572660509447,
      "median": 0.69272555548,
      "user": 0.4035088,
      "system": 1.34570654,
      "min": 0.66257676548,
      "max": 0.77308738148,
      "times": [
        0.77308738148,
        0.70892953248,
        0.66541555948,
        0.69595539048,
        0.69308134548,
        0.69236976548,
        0.66257676548,
        0.68524990048,
        0.7481218254800001,
        0.67203537748
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.262 ± 0.044 4.194 4.314 1.97 ± 0.10
pacquet@main 4.254 ± 0.074 4.167 4.415 1.96 ± 0.10
pnpr@HEAD 2.239 ± 0.131 2.083 2.443 1.03 ± 0.08
pnpr@main 2.167 ± 0.105 2.025 2.356 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.2620536288399995,
      "stddev": 0.04385761683391318,
      "median": 4.27114796354,
      "user": 3.7202634800000007,
      "system": 3.34365388,
      "min": 4.19374274354,
      "max": 4.31368079454,
      "times": [
        4.31137172554,
        4.31368079454,
        4.30862211754,
        4.21374138854,
        4.22642601654,
        4.28250604554,
        4.19374274354,
        4.27573993654,
        4.22814952954,
        4.26655599054
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.254346601139999,
      "stddev": 0.0738850293972318,
      "median": 4.24494095704,
      "user": 3.771464580000001,
      "system": 3.34810288,
      "min": 4.1670211545399996,
      "max": 4.41536037754,
      "times": [
        4.3102102665399995,
        4.30216363154,
        4.41536037754,
        4.1670211545399996,
        4.20402696554,
        4.24159586554,
        4.24828604854,
        4.17061252254,
        4.25014424854,
        4.23404493054
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 2.23875888114,
      "stddev": 0.1307264412779427,
      "median": 2.18871826254,
      "user": 2.4758468799999998,
      "system": 2.89893538,
      "min": 2.08288777454,
      "max": 2.4429008595400004,
      "times": [
        2.08288777454,
        2.29102890054,
        2.38653993054,
        2.1646423875400003,
        2.20407105654,
        2.3974541995400003,
        2.1237652185400004,
        2.1209330155400004,
        2.4429008595400004,
        2.17336546854
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 2.16684375304,
      "stddev": 0.10522758701214788,
      "median": 2.15330737354,
      "user": 2.51369588,
      "system": 2.90521068,
      "min": 2.02536068354,
      "max": 2.35565551554,
      "times": [
        2.13403519554,
        2.1037135695400004,
        2.17257955154,
        2.20602441154,
        2.35565551554,
        2.10536510454,
        2.02536068354,
        2.06923245254,
        2.3217256225400003,
        2.17474542354
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.352 ± 0.017 1.331 1.385 2.05 ± 0.03
pacquet@main 1.384 ± 0.061 1.349 1.553 2.10 ± 0.09
pnpr@HEAD 0.671 ± 0.047 0.648 0.802 1.02 ± 0.07
pnpr@main 0.659 ± 0.005 0.650 0.666 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.35210983244,
      "stddev": 0.016894381735263555,
      "median": 1.34907889324,
      "user": 1.30854412,
      "system": 1.6850138599999998,
      "min": 1.33079220424,
      "max": 1.38530664624,
      "times": [
        1.33079220424,
        1.34529234624,
        1.35129781324,
        1.38530664624,
        1.34418956824,
        1.3746032222400002,
        1.34685997324,
        1.35582866224,
        1.35360291224,
        1.3333249762400001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.3836930031399999,
      "stddev": 0.060871809005805265,
      "median": 1.36456907824,
      "user": 1.37080342,
      "system": 1.69384126,
      "min": 1.3489267472400002,
      "max": 1.55258162224,
      "times": [
        1.39153187324,
        1.37217555224,
        1.35577719824,
        1.55258162224,
        1.36860146724,
        1.3489267472400002,
        1.36053668924,
        1.35296282524,
        1.35328293524,
        1.3805531212400002
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.6714383727400001,
      "stddev": 0.046932504691950795,
      "median": 0.65613129224,
      "user": 0.32970152,
      "system": 1.27851176,
      "min": 0.64762474824,
      "max": 0.8021710602400001,
      "times": [
        0.6481443532400001,
        0.6528994342400001,
        0.64762474824,
        0.8021710602400001,
        0.6807078632400001,
        0.6628395572400001,
        0.6579401502400001,
        0.6565518112400001,
        0.65571077324,
        0.6497939762400001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.65883659124,
      "stddev": 0.005324814751581101,
      "median": 0.6595917382400001,
      "user": 0.35581831999999997,
      "system": 1.27518076,
      "min": 0.6501946272400001,
      "max": 0.6657087382400001,
      "times": [
        0.6557749122400001,
        0.6501946272400001,
        0.66433368524,
        0.6536456462400001,
        0.6657087382400001,
        0.6621485532400001,
        0.66391154224,
        0.65346473124,
        0.6595095842400001,
        0.6596738922400001
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 3.049 ± 0.041 2.993 3.118 4.53 ± 0.36
pacquet@main 3.035 ± 0.061 2.968 3.163 4.51 ± 0.37
pnpr@HEAD 0.675 ± 0.010 0.660 0.691 1.00 ± 0.08
pnpr@main 0.673 ± 0.053 0.645 0.824 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 3.0489721565800005,
      "stddev": 0.041282014842346296,
      "median": 3.03654516768,
      "user": 1.76935902,
      "system": 1.9831922800000001,
      "min": 2.9929668936800002,
      "max": 3.11783547168,
      "times": [
        3.02878184868,
        3.0857094526799997,
        3.11783547168,
        3.01772571968,
        3.02174149968,
        3.04430848668,
        3.02776443368,
        3.10809085968,
        3.04479689968,
        2.9929668936800002
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 3.0346778132799996,
      "stddev": 0.06119645724254348,
      "median": 3.02427824018,
      "user": 1.83137852,
      "system": 1.9597718799999995,
      "min": 2.96813299968,
      "max": 3.16314275068,
      "times": [
        2.96920832768,
        2.96813299968,
        3.03268018568,
        3.01587629468,
        3.0153495276799998,
        3.09512139968,
        3.06914870468,
        3.16314275068,
        3.0373605756799997,
        2.98075736668
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.6753188899800001,
      "stddev": 0.009588034269769664,
      "median": 0.6747263196800001,
      "user": 0.33864841999999995,
      "system": 1.3153390799999998,
      "min": 0.6598118016800001,
      "max": 0.69102214768,
      "times": [
        0.6678065806800001,
        0.67145552168,
        0.6598118016800001,
        0.6731579736800001,
        0.6830314056800001,
        0.6762946656800001,
        0.69102214768,
        0.6866029466800001,
        0.6772242966800001,
        0.6667815596800001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.67333628298,
      "stddev": 0.05338866373896498,
      "median": 0.6586135656800001,
      "user": 0.34884612,
      "system": 1.28144448,
      "min": 0.6452363036800001,
      "max": 0.8237958896800001,
      "times": [
        0.66440019468,
        0.64657229768,
        0.6582604566800001,
        0.6504553686800001,
        0.6452363036800001,
        0.6562125506800001,
        0.66864756968,
        0.6608155236800001,
        0.65896667468,
        0.8237958896800001
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 639.3 ± 18.7 613.7 662.3 5.99 ± 0.21
pacquet@main 638.8 ± 6.8 630.8 653.6 5.98 ± 0.14
pnpr@HEAD 106.8 ± 2.1 102.8 108.4 1.00 ± 0.03
pnpr@main 106.8 ± 2.1 102.9 108.9 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.6393271747000001,
      "stddev": 0.018652324417818927,
      "median": 0.6417820331000001,
      "user": 0.6053663,
      "system": 0.15244442,
      "min": 0.6136981651000001,
      "max": 0.6622682121000001,
      "times": [
        0.6373895291000001,
        0.6257738621000001,
        0.6599741041000001,
        0.6606416201,
        0.6622682121000001,
        0.6469303401000001,
        0.6461745371000001,
        0.6154977851000001,
        0.6136981651000001,
        0.6249235921
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.6388138398000001,
      "stddev": 0.006822776699067014,
      "median": 0.6382043736,
      "user": 0.6083149000000001,
      "system": 0.15117892000000002,
      "min": 0.6307616001,
      "max": 0.6536499141000001,
      "times": [
        0.6338761781000001,
        0.6424801891,
        0.6420565201,
        0.6369160061000001,
        0.6426665581000001,
        0.6394927411000001,
        0.6307616001,
        0.6340957241,
        0.6536499141000001,
        0.6321429671000001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.10682012963846153,
      "stddev": 0.0020504760414564076,
      "median": 0.10777122160000001,
      "user": 0.026536238461538464,
      "system": 0.018130896923076924,
      "min": 0.1028096401,
      "max": 0.1083959461,
      "times": [
        0.1038005711,
        0.10741024510000001,
        0.10810914510000001,
        0.1028096401,
        0.10313146410000001,
        0.10810195210000001,
        0.1077257961,
        0.10827894410000001,
        0.10761078110000001,
        0.1082678521,
        0.1079488821,
        0.1083959461,
        0.10797012410000001,
        0.10781664710000001,
        0.1074107531,
        0.10362230310000001,
        0.1074680731,
        0.10748040610000001,
        0.10814267810000001,
        0.1076721431,
        0.10814539510000001,
        0.10285294110000001,
        0.1082940911,
        0.10788293110000001,
        0.10297187410000001,
        0.10800179110000001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.10681862962000001,
      "stddev": 0.0021423627322676962,
      "median": 0.10785603010000001,
      "user": 0.027380440000000002,
      "system": 0.01787132,
      "min": 0.10290464810000001,
      "max": 0.10886147510000001,
      "times": [
        0.10790689310000001,
        0.1084212801,
        0.1076955121,
        0.10810711110000001,
        0.1078050321,
        0.10806169610000001,
        0.10755191010000001,
        0.10290464810000001,
        0.1030774821,
        0.1079118651,
        0.10314489010000001,
        0.10292948510000001,
        0.1078975961,
        0.10785603010000001,
        0.1082763681,
        0.10865365810000001,
        0.10751510110000001,
        0.10886147510000001,
        0.10696181110000001,
        0.10343394010000001,
        0.10769850710000001,
        0.10337935910000001,
        0.10822895010000001,
        0.10828977410000001,
        0.1078953651
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 6.634 ± 0.147 6.477 6.835 1.33 ± 0.04
pacquet@main 6.605 ± 0.170 6.313 6.947 1.32 ± 0.04
pnpr@HEAD 4.986 ± 0.087 4.861 5.159 1.00
pnpr@main 4.989 ± 0.053 4.905 5.098 1.00 ± 0.02
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 6.6339720373,
      "stddev": 0.14686340957340663,
      "median": 6.5743943361,
      "user": 3.8189147000000006,
      "system": 3.6873693199999997,
      "min": 6.476810539600001,
      "max": 6.834800078600001,
      "times": [
        6.7923341246,
        6.5771560406,
        6.4925713276,
        6.5716326316,
        6.7813500586,
        6.834800078600001,
        6.502838741600001,
        6.476810539600001,
        6.5189315466,
        6.7912952836
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 6.605244313300001,
      "stddev": 0.1699490738431452,
      "median": 6.6193632606,
      "user": 3.8348845,
      "system": 3.6858077199999997,
      "min": 6.312866827600001,
      "max": 6.9466902786,
      "times": [
        6.4421325616,
        6.6410747906,
        6.312866827600001,
        6.9466902786,
        6.7303101706,
        6.646128983600001,
        6.6184343416,
        6.620292179600001,
        6.4945954696,
        6.599917529600001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 4.9859058699,
      "stddev": 0.08657637657595509,
      "median": 4.999793507600001,
      "user": 2.7681175,
      "system": 3.253076219999999,
      "min": 4.8606914336,
      "max": 5.1585161816000005,
      "times": [
        5.1585161816000005,
        4.955798549600001,
        4.8606914336,
        5.007543134600001,
        5.017649336600001,
        5.0474041366,
        5.0189088476000006,
        4.992043880600001,
        4.896953137600001,
        4.903550060600001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 4.989023788900001,
      "stddev": 0.05317102935691836,
      "median": 4.9743880136000005,
      "user": 2.8160885,
      "system": 3.24295422,
      "min": 4.905413723600001,
      "max": 5.098101472600001,
      "times": [
        4.967629720600001,
        5.0253045806,
        4.998256592600001,
        4.9607693476,
        4.9577190706000005,
        4.905413723600001,
        4.9811463066,
        5.098101472600001,
        5.034670047600001,
        4.9612270266000005
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/12809
Testbedpacquet
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
4,262.05 ms
(+0.76%)Baseline: 4,229.97 ms
5,075.97 ms
(83.97%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
3,048.97 ms
(+0.96%)Baseline: 3,019.93 ms
3,623.91 ms
(84.13%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
1,352.11 ms
(+0.80%)Baseline: 1,341.32 ms
1,609.58 ms
(84.00%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
639.33 ms
(+2.47%)Baseline: 623.90 ms
748.68 ms
(85.39%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
3,828.98 ms
(-5.63%)Baseline: 4,057.42 ms
4,868.90 ms
(78.64%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
6,633.97 ms
(-4.05%)Baseline: 6,914.08 ms
8,296.89 ms
(79.96%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
638.87 ms
(+0.57%)Baseline: 635.27 ms
762.33 ms
(83.80%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/12809
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
2,238.76 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
675.32 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
671.44 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
106.82 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
2,148.64 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
4,985.91 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
698.38 ms
🐰 View full continuous benchmarking report in Bencher

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