Skip to content

fix(lockfile): match pnpm's runtime dependency lockfile format - #12277

Merged
zkochan merged 1 commit into
mainfrom
pacquet-runtime-version
Jun 9, 2026
Merged

zkochan merged 1 commit into
mainfrom
pacquet-runtime-version

Conversation

@zkochan

@zkochan zkochan commented Jun 9, 2026 •

Copy link
Copy Markdown
Member

PR Summary by Qodo

Fix runtime dependency lockfile shape to match pnpm byte-for-byte
🐞 Bug fix 🧪 Tests 📝 Documentation 🕐 20-40 Minutes

Grey Divider

Walkthroughs

User Description

What

Part of the pacquet ↔ pnpm lockfile-parity effort (#12266). A runtime: dependency (node@runtime:<ver>, a Variations resolution) diverged from the pnpm-lock.yaml pnpm produces in three independent ways. This reconciles all three toward pnpm so a runtime entry round-trips byte-for-byte.

1. Importer version kept the node@ prefix

pacquet recorded the importer dep as node@runtime:<ver>; pnpm writes the prefix-stripped runtime:<ver>. real_name returned None for Variations resolutions (the canonical name lives only in the fetched manifest), so importer_dep_version couldn't strip the node@ prefix. It now reads the manifest name for Variations, matching the existing remote-http-tarball path and pnpm's depPathToRef.

2. Variant bin was a bare string

Each variant serialized bin: bin/node (string) instead of pnpm's named map bin: { node: bin/node }. bin_spec_for_platform now returns the BinarySpec::Map form ({ node: node.exe } on win32).

3. Missing version field on the package entry

The packages: entry omitted version: <ver>. pnpm's toLockfileDependency emits it whenever the depPath carries a :, the manifest declares a version, and the resolution isn't a directory. A version field was added to PackageMetadata, populated under the same condition (and ordered by the existing sortLockfileKeys port, so it lands after resolution).

Verification

  • Byte-identical against pnpm 11.5.2 on a { "node": "runtime:26.3.0" } fixture (diff is empty).
  • Whole-monorepo pacquet install --lockfile-only diff is unaffected (the monorepo has no runtime deps); the only remaining gaps there stay pnpmfileChecksum / patchedDependencies.
  • New regression tests, each confirmed to fail without its fix:
    • dependencies_graph_to_lockfile::tests::runtime_dependency_strips_importer_prefix_and_records_package_version
    • node_resolver::tests::bin_spec_is_a_named_map
  • Full pacquet-lockfile (193) + affected pacquet-package-manager module suites (173) pass; fmt / clippy / cargo doc -D warnings / dylint clean.

Test porting

Ports the lockfile-shape assertions of installing/deps-installer/test/install/nodeRuntime.ts:236-269 (importer version: runtime:<ver>, packages[node@runtime:<ver>].version, variants[].resolution.bin: { node }). The full download-and-reinstall integration tests remain unported (they fetch real runtime artifacts); tracked in pacquet/plans/TEST_PORTING.md.


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

AI Description
• Align runtime: dependency importer refs with pnpm by stripping the name@ prefix
• Serialize runtime variant bin as a named map ({ node: … }) instead of a string
• Emit packages[*].version for non-registry, non-directory entries when manifests declare it
Diagram
graph TD
PM["package-manager"] --> DG2LF["graph→lockfile"] --> LF[("Lockfile model")] --> YAML["YAML output"]
NR["Node runtime resolver"] --> DG2LF
T[["Regression tests"]] --> NR
T --> DG2LF
subgraph Legend
direction LR
_mod["Module"] ~~~ _db[("Data model")] ~~~ _test[["Tests"]]
end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Post-process lockfile output for runtime entries
  • ➕ Localizes changes to a single serialization/writer step
  • ➕ Avoids expanding core structs like PackageMetadata
  • ➖ Adds special-case logic that’s easy to miss for other non-registry depPath forms
  • ➖ Harder to unit-test at the semantic boundary (graph→lockfile)
  • ➖ Risks divergence if pnpm rules change (duplication of logic)
2. Introduce a shared `depPathToRef`-style utility for all non-registry deps
  • ➕ Centralizes importer-ref normalization and reduces one-off rules
  • ➕ Creates a clear extension point for future parity work (file:, git, etc.)
  • ➖ Larger refactor and broader behavioral surface area than this PR’s targeted runtime fix
  • ➖ May require decisions about currently-intentional pacquet differences for file/git

Recommendation: Keep the PR’s approach: encode pnpm parity where the data is produced (resolver/graph→lockfile) and where the schema is modeled (PackageMetadata). It minimizes special-casing in serialization while matching pnpm’s documented conditions (manifest-derived names for Variations, named-bin map, conditional version emission). A broader depPathToRef utility is worth considering later when expanding parity beyond runtime/http-tarball cases.

Grey Divider

File Changes

Enhancement (1)
package_metadata.rs Add optional 'version' field to 'PackageMetadata' with pnpm-aligned semantics +7/-0

Add optional 'version' field to 'PackageMetadata' with pnpm-aligned semantics

• Introduces 'PackageMetadata.version: Option<String>' and documents when it should be emitted (non-registry depPaths with ':' when manifest has a version and resolution is not a directory). Uses 'skip_serializing_if' to avoid churn for registry packages.

pacquet/crates/lockfile/src/package_metadata.rs


Bug fix (2)
node_resolver.rs Serialize runtime variant 'bin' as a named map keyed by 'node' +9/-2

Serialize runtime variant 'bin' as a named map keyed by 'node'

• Changes runtime 'bin_spec_for_platform' to return 'BinarySpec::Map({ node: ... })' rather than a single string path. Mirrors pnpm’s 'variants[].resolution.bin' shape for runtime dependencies across unix and win32.

pacquet/crates/engine-runtime-node-resolver/src/node_resolver.rs


dependencies_graph_to_lockfile.rs Match pnpm for runtime importer refs and conditional 'packages[*].version' +29/-11

Match pnpm for runtime importer refs and conditional 'packages[*].version'

• Extends 'real_name' to read manifest names for 'Variations' resolutions (in addition to remote http tarballs) so importer versions can be prefix-stripped like pnpm’s 'depPathToRef'. Adds pnpm-aligned logic in 'build_package_metadata' to emit 'PackageMetadata.version' only for non-registry depPaths containing ':' when manifest declares a version and the resolution is not a directory.

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


Refactor (2)
lib.rs Initialize new 'PackageMetadata.version' field for directory entries +1/-0

Initialize new 'PackageMetadata.version' field for directory entries

• Updates directory-resolution package insertion to include 'version: None' to satisfy the expanded 'PackageMetadata' struct.

pacquet/crates/lockfile/src/lib.rs


build_snapshot.rs Set 'version: None' when building registry snapshots +1/-0

Set 'version: None' when building registry snapshots

• Updates 'build_package_snapshot' to populate the new 'PackageMetadata.version' field as 'None' for registry resolutions.

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


Tests (14)
tests.rs Add regression test for named-map 'bin' spec +20/-1

Add regression test for named-map 'bin' spec

• Adds 'bin_spec_is_a_named_map' asserting '{ node: bin/node }' on linux and '{ node: node.exe }' on win32. Imports 'bin_spec_for_platform' for direct verification.

pacquet/crates/engine-runtime-node-resolver/src/node_resolver/tests.rs


tests.rs Update build-modules tests for new 'PackageMetadata.version' field +5/-0

Update build-modules tests for new 'PackageMetadata.version' field

• Adds 'version: None' to multiple 'PackageMetadata' literals used in build module/side-effects cache tests, keeping fixtures compiling and structurally complete.

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


tests.rs Update virtual store tests for new metadata field +4/-0

Update virtual store tests for new metadata field

• Adds 'version: None' to helper constructors for registry/git/tarball metadata in virtual store tests.

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


tests.rs Update current-lockfile tests for new metadata field +1/-0

Update current-lockfile tests for new metadata field

• Extends package metadata fixtures with 'version: None' to match the updated lockfile schema.

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


tests.rs Add regression test for runtime importer version and package version field +75/-1

Add regression test for runtime importer version and package version field

• Adds a focused test ensuring 'node@runtime:<ver>' becomes importer 'version: runtime:<ver>' and that 'packages[node@runtime:<ver>].version' is populated from the manifest ('<ver>'). Uses a 'VariationsResolution' with manifest-only name/version to cover the previously failing path.

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


tests.rs Update deps-graph tests for new metadata field +1/-0

Update deps-graph tests for new metadata field

• Adds 'version: None' to registry metadata fixtures used by deps graph tests.

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


tests.rs Update hoist tests for new metadata field +1/-0

Update hoist tests for new metadata field

• Adds 'version: None' to 'PackageMetadata' fixtures used in hoisting-related tests.

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


tests.rs Update hoisted-dep-graph tests for new metadata field +1/-0

Update hoisted-dep-graph tests for new metadata field

• Adds 'version: None' to the metadata stub used by hoisted dependency graph tests.

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


tests.rs Update install-by-snapshot tests for new metadata field +1/-0

Update install-by-snapshot tests for new metadata field

• Adds 'version: None' to registry metadata fixtures in snapshot installation tests.

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


tests.rs Update installability tests for new metadata field +1/-0

Update installability tests for new metadata field

• Adds 'version: None' to synthetic package metadata used by installability tests.

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


tests.rs Update link-bins tests for new metadata field +1/-0

Update link-bins tests for new metadata field

• Adds 'version: None' to 'PackageMetadata' fixtures used to test bin linking behavior.

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


tests.rs Update virtual-store layout tests for new metadata field +6/-0

Update virtual-store layout tests for new metadata field

• Adds 'version: None' to multiple 'PackageMetadata' fixtures to reflect the expanded schema without altering test intent.

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


tests.rs Update real-hoist tests for new metadata field +1/-0

Update real-hoist tests for new metadata field

• Adds 'version: None' to 'PackageMetadata' fixtures used in real-hoist test helpers.

pacquet/crates/real-hoist/src/tests.rs


tests.rs Update lockfile-reuse tests for new metadata field +1/-0

Update lockfile-reuse tests for new metadata field

• Adds 'version: None' to registry metadata fixtures used in lockfile reuse tests.

pacquet/crates/resolving-deps-resolver/src/lockfile_reuse/tests.rs


Documentation (1)
TEST_PORTING.md Document runtime lockfile-format coverage and remaining integration gaps +9/-0

Document runtime lockfile-format coverage and remaining integration gaps

• Adds a note that runtime lockfile *format* assertions are now covered by Rust unit tests, while full runtime download/reinstall integration tests remain unported due to real artifact fetching.

pacquet/plans/TEST_PORTING.md


Grey Divider

Qodo Logo

Summary by CodeRabbit

  • New Features
    • Added support for pnpm's named binary map format to improve runtime binary resolution handling.
    • Extended package metadata to include version information for non-registry package dependencies, enabling more complete lockfile tracking.

A `runtime:` dependency (`node@runtime:<ver>`, a `Variations` resolution)
diverged from pnpm's `pnpm-lock.yaml` in three ways. Reconcile all three
toward pnpm so the runtime entry round-trips byte-for-byte:

- The importer recorded `node@runtime:<ver>` instead of the prefix-stripped
  `runtime:<ver>`. `real_name` returned `None` for `Variations` resolutions
  (the name lives only in the fetched manifest), so `importer_dep_version`
  could not strip the `node@` prefix. Read the manifest name for
  `Variations`, matching the existing http-tarball path and pnpm's
  `depPathToRef`.
- Each variant's `bin` was a bare string (`bin/node`) rather than pnpm's
  named map (`{ node: bin/node }`). `bin_spec_for_platform` now returns the
  `BinarySpec::Map` form.
- The `packages:` entry omitted `version: <ver>`. pnpm's
  `toLockfileDependency` emits it whenever the depPath carries a `:`, the
  manifest declares a version, and the resolution isn't a directory. Add a
  `version` field to `PackageMetadata` populated under the same condition.

Verified byte-identical against pnpm 11.5.2 on a `node@runtime:26.3.0`
fixture; the whole-monorepo diff is unaffected (no runtime deps there).
Ports the lockfile-shape assertions of
`installing/deps-installer/test/install/nodeRuntime.ts:236-269`.
@qodo-free-for-open-source-projects

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

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider

Great, no issues found!

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

Grey Divider

Qodo Logo

@coderabbitai

coderabbitai Bot commented Jun 9, 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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c9f7ecaa-a5a0-4a83-b6bc-00877cd18388

📥 Commits

Reviewing files that changed from the base of the PR and between 7006bfa and ded04a1.

📒 Files selected for processing (20)
  • pacquet/crates/engine-runtime-node-resolver/src/node_resolver.rs
  • pacquet/crates/engine-runtime-node-resolver/src/node_resolver/tests.rs
  • pacquet/crates/lockfile/src/lib.rs
  • pacquet/crates/lockfile/src/package_metadata.rs
  • pacquet/crates/package-manager/src/build_modules/tests.rs
  • pacquet/crates/package-manager/src/build_snapshot.rs
  • pacquet/crates/package-manager/src/create_virtual_store/tests.rs
  • pacquet/crates/package-manager/src/current_lockfile/tests.rs
  • pacquet/crates/package-manager/src/dependencies_graph_to_lockfile.rs
  • pacquet/crates/package-manager/src/dependencies_graph_to_lockfile/tests.rs
  • pacquet/crates/package-manager/src/deps_graph/tests.rs
  • pacquet/crates/package-manager/src/hoist/tests.rs
  • pacquet/crates/package-manager/src/hoisted_dep_graph/tests.rs
  • pacquet/crates/package-manager/src/install_package_by_snapshot/tests.rs
  • pacquet/crates/package-manager/src/installability/tests.rs
  • pacquet/crates/package-manager/src/link_bins/tests.rs
  • pacquet/crates/package-manager/src/virtual_store_layout/tests.rs
  • pacquet/crates/real-hoist/src/tests.rs
  • pacquet/crates/resolving-deps-resolver/src/lockfile_reuse/tests.rs
  • pacquet/plans/TEST_PORTING.md
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: Dylint
  • GitHub Check: Lint and Test (windows-latest)
  • GitHub Check: Lint and Test (ubuntu-latest)
  • GitHub Check: Lint and Test (macos-latest)
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Run benchmark on ubuntu-latest
  • GitHub Check: Run benchmark on ubuntu-latest
  • GitHub Check: Code Coverage
  • GitHub Check: Compile & Lint
🧰 Additional context used
📓 Path-based instructions (1)
pacquet/**/*.rs

📄 CodeRabbit inference engine (pacquet/AGENTS.md)

pacquet/**/*.rs: Log emissions are part of matching pnpm — when porting a function that fires pnpm:<channel> events through globalLogger, logger.debug(...), or streamParser.write(...), mirror the call site, payload, and ordering so @pnpm/cli.default-reporter parses pacquet's NDJSON the same way
Declare a newtype wrapper for branded string types instead of collapsing the brand into a plain String or &str in Rust
If upstream TypeScript always validates before construction of a branded string, validate in the Rust wrapper too via TryFrom<String> and/or FromStr and do not provide an infallible public constructor
If upstream TypeScript never validates a branded string, just brand for type-safety in Rust by exposing an infallible From<String> constructor
If upstream TypeScript occasionally constructs a branded string without validation, expose from_str_unchecked in Rust as an escape hatch alongside the validating constructor
Match upstream serde behavior for branded strings crossing JSON, YAML, or INI boundaries by using #[serde(try_from = "String")] for deserialization and #[serde(into = "String")] for serialization
Derive simple conversions for branded strings using #[derive(derive_more::From)] and #[derive(derive_more::Into)] instead of handwriting impl blocks; use manual impl only when conversion needs custom logic
Model TypeScript string literal unions (like 'auto' | 'always' | 'never') as Rust enums instead of newtype wrappers, since the set of valid values is closed
Treat TypeScript string template literal types (like `${string}@${string}`) the same as branded string types in Rust, using a newtype wrapper with validation
Follow the code style guide in CODE_STYLE_GUIDE.md — imports, modules, naming, ownership and borrowing, parameter type selection, trait bounds, pattern matching, pipe-trait, error handling, test layout, and cloning of Arc and Rc
Choose owned vs. borrowed parameters to minimize copies; widen to t...

Files:

  • pacquet/crates/resolving-deps-resolver/src/lockfile_reuse/tests.rs
  • pacquet/crates/lockfile/src/package_metadata.rs
  • pacquet/crates/package-manager/src/install_package_by_snapshot/tests.rs
  • pacquet/crates/package-manager/src/current_lockfile/tests.rs
  • pacquet/crates/package-manager/src/deps_graph/tests.rs
  • pacquet/crates/package-manager/src/hoisted_dep_graph/tests.rs
  • pacquet/crates/engine-runtime-node-resolver/src/node_resolver/tests.rs
  • pacquet/crates/package-manager/src/installability/tests.rs
  • pacquet/crates/real-hoist/src/tests.rs
  • pacquet/crates/package-manager/src/build_snapshot.rs
  • pacquet/crates/package-manager/src/dependencies_graph_to_lockfile/tests.rs
  • pacquet/crates/package-manager/src/virtual_store_layout/tests.rs
  • pacquet/crates/package-manager/src/link_bins/tests.rs
  • pacquet/crates/package-manager/src/create_virtual_store/tests.rs
  • pacquet/crates/package-manager/src/hoist/tests.rs
  • pacquet/crates/lockfile/src/lib.rs
  • pacquet/crates/engine-runtime-node-resolver/src/node_resolver.rs
  • pacquet/crates/package-manager/src/dependencies_graph_to_lockfile.rs
  • pacquet/crates/package-manager/src/build_modules/tests.rs
🧠 Learnings (7)
📚 Learning: 2026-05-20T19:40:55.051Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11774
File: pacquet/crates/resolving-deps-resolver/src/resolve_peers.rs:0-0
Timestamp: 2026-05-20T19:40:55.051Z
Learning: In the pacquet Rust code, ensure the semver implementation uses the `node-semver` crate (not `nodejs-semver`). `node-semver`’s public API does not include a `satisfies_with_prerelease`-style method; prerelease-tolerant matching should be implemented inline by first calling `Range::satisfies`, and when it rejects a prerelease version, retry matching against a stripped `MAJOR.MINOR.PATCH` base of the prerelease version.

Applied to files:

  • pacquet/crates/resolving-deps-resolver/src/lockfile_reuse/tests.rs
  • pacquet/crates/lockfile/src/package_metadata.rs
  • pacquet/crates/package-manager/src/install_package_by_snapshot/tests.rs
  • pacquet/crates/package-manager/src/current_lockfile/tests.rs
  • pacquet/crates/package-manager/src/deps_graph/tests.rs
  • pacquet/crates/package-manager/src/hoisted_dep_graph/tests.rs
  • pacquet/crates/engine-runtime-node-resolver/src/node_resolver/tests.rs
  • pacquet/crates/package-manager/src/installability/tests.rs
  • pacquet/crates/real-hoist/src/tests.rs
  • pacquet/crates/package-manager/src/build_snapshot.rs
  • pacquet/crates/package-manager/src/dependencies_graph_to_lockfile/tests.rs
  • pacquet/crates/package-manager/src/virtual_store_layout/tests.rs
  • pacquet/crates/package-manager/src/link_bins/tests.rs
  • pacquet/crates/package-manager/src/create_virtual_store/tests.rs
  • pacquet/crates/package-manager/src/hoist/tests.rs
  • pacquet/crates/lockfile/src/lib.rs
  • pacquet/crates/engine-runtime-node-resolver/src/node_resolver.rs
  • pacquet/crates/package-manager/src/dependencies_graph_to_lockfile.rs
  • pacquet/crates/package-manager/src/build_modules/tests.rs
📚 Learning: 2026-05-22T00:08:44.646Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11837
File: pacquet/crates/resolving-npm-resolver/src/pick_package.rs:33-51
Timestamp: 2026-05-22T00:08:44.646Z
Learning: In the pnpm/pnpm repo’s pacquet Rust crates, do not flag Unicode ellipsis characters (U+2026, `…`) in Rust doc comments (`///` / `/** */`) as a lint violation. The pacquet crate’s `dylint.toml` only enables `perfectionist::derive_ordering`, and the Dylint `unicode-ellipsis` rule is not enabled for this project—so `…` in doc comments is an intentional, repo-consistent style.

Applied to files:

  • pacquet/crates/resolving-deps-resolver/src/lockfile_reuse/tests.rs
  • pacquet/crates/lockfile/src/package_metadata.rs
  • pacquet/crates/package-manager/src/install_package_by_snapshot/tests.rs
  • pacquet/crates/package-manager/src/current_lockfile/tests.rs
  • pacquet/crates/package-manager/src/deps_graph/tests.rs
  • pacquet/crates/package-manager/src/hoisted_dep_graph/tests.rs
  • pacquet/crates/engine-runtime-node-resolver/src/node_resolver/tests.rs
  • pacquet/crates/package-manager/src/installability/tests.rs
  • pacquet/crates/real-hoist/src/tests.rs
  • pacquet/crates/package-manager/src/build_snapshot.rs
  • pacquet/crates/package-manager/src/dependencies_graph_to_lockfile/tests.rs
  • pacquet/crates/package-manager/src/virtual_store_layout/tests.rs
  • pacquet/crates/package-manager/src/link_bins/tests.rs
  • pacquet/crates/package-manager/src/create_virtual_store/tests.rs
  • pacquet/crates/package-manager/src/hoist/tests.rs
  • pacquet/crates/lockfile/src/lib.rs
  • pacquet/crates/engine-runtime-node-resolver/src/node_resolver.rs
  • pacquet/crates/package-manager/src/dependencies_graph_to_lockfile.rs
  • pacquet/crates/package-manager/src/build_modules/tests.rs
📚 Learning: 2026-05-20T23:07:58.444Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11784
File: pacquet/crates/resolving-deps-resolver/src/hoist_peers.rs:120-133
Timestamp: 2026-05-20T23:07:58.444Z
Learning: When reviewing code in this pacquet Rust port, follow the upstream pnpm compatibility rule: only match pnpm’s behavior exactly. Do not propose review changes that intentionally deviate from pnpm’s documented/observed behavior, even if pnpm appears buggy. If you identify a real bug in pnpm behavior, the review should prioritize fixing it upstream in pnpm first, and avoid implementing a pnpm-behavior workaround here unless the same fix has already landed upstream.

Applied to files:

  • pacquet/crates/resolving-deps-resolver/src/lockfile_reuse/tests.rs
  • pacquet/crates/lockfile/src/package_metadata.rs
  • pacquet/crates/package-manager/src/install_package_by_snapshot/tests.rs
  • pacquet/crates/package-manager/src/current_lockfile/tests.rs
  • pacquet/crates/package-manager/src/deps_graph/tests.rs
  • pacquet/crates/package-manager/src/hoisted_dep_graph/tests.rs
  • pacquet/crates/engine-runtime-node-resolver/src/node_resolver/tests.rs
  • pacquet/crates/package-manager/src/installability/tests.rs
  • pacquet/crates/real-hoist/src/tests.rs
  • pacquet/crates/package-manager/src/build_snapshot.rs
  • pacquet/crates/package-manager/src/dependencies_graph_to_lockfile/tests.rs
  • pacquet/crates/package-manager/src/virtual_store_layout/tests.rs
  • pacquet/crates/package-manager/src/link_bins/tests.rs
  • pacquet/crates/package-manager/src/create_virtual_store/tests.rs
  • pacquet/crates/package-manager/src/hoist/tests.rs
  • pacquet/crates/lockfile/src/lib.rs
  • pacquet/crates/engine-runtime-node-resolver/src/node_resolver.rs
  • pacquet/crates/package-manager/src/dependencies_graph_to_lockfile.rs
  • pacquet/crates/package-manager/src/build_modules/tests.rs
📚 Learning: 2026-05-24T21:10:50.292Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11915
File: pacquet/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs:553-617
Timestamp: 2026-05-24T21:10:50.292Z
Learning: When implementing dependency “revisit”/optional-folding in pacquet, mirror pnpm’s `resolveDependencies.ts` behavior: on revisit, update the `optional` flag only for the directly visited package, and do not automatically change `optional` for transitive descendants. pnpm corrects stale optional flags later via `copyDependencySubGraph` (a BFS in `lockfile/pruner/src/index.ts`/`copyDependencySubGraph`). Until pacquet has an equivalent pruner/copy-subgraph step, be aware that the raw `node.optional` can flow through to the lockfile/virtual store via `dependencies_graph_to_lockfile.rs` → `create_virtual_store.rs` → `installability.rs`, so review changes that affect optional flag propagation for this mismatch.

Applied to files:

  • pacquet/crates/resolving-deps-resolver/src/lockfile_reuse/tests.rs
📚 Learning: 2026-05-24T21:10:50.292Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11915
File: pacquet/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs:553-617
Timestamp: 2026-05-24T21:10:50.292Z
Learning: In pacquet’s Rust resolver layer, the behavior of `ResolvedPackage.optional` “AND-folding”/revisit updates is intentionally aligned with pnpm: when a package is directly revisited, only that package’s `optional` flag is updated; transitive descendants are not re-walked/rescored in this stage. pnpm later corrects any stale optional flags downstream via its pruner/BFS logic (`copyDependencySubGraph` + `nonOptional` reachability stamping in the lockfile pruner). Since pacquet does not yet have that pruner equivalent, review should NOT flag the downstream/stale optional propagation as a bug in pacquet PRs; treat the resolver-layer optional propagation gap as expected parity until the pruning/stamping step is ported.

Applied to files:

  • pacquet/crates/resolving-deps-resolver/src/lockfile_reuse/tests.rs
📚 Learning: 2026-06-06T18:58:37.156Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 12243
File: pacquet/crates/package-manager/src/install_package_by_snapshot.rs:319-322
Timestamp: 2026-06-06T18:58:37.156Z
Learning: When reviewing Rust code, do not assume `matches!(expr, Pattern(_))` will move out of `expr` if `Pattern(_)` contains no by-value bindings. `matches!` desugars to a `match` that auto-borrows the scrutinee for discrimination, so even if `expr` is a non-`Copy` value behind a shared reference (e.g., `&T`), the macro should not move-out of the borrowed data purely due to `matches!`. Treat `matches!(&expr, Pattern(_))` as a readability/clarity improvement, not a correctness requirement. Only flag potential move-out-of-borrow risks when the pattern includes by-value bindings that would require moving the matched value.

Applied to files:

  • pacquet/crates/resolving-deps-resolver/src/lockfile_reuse/tests.rs
  • pacquet/crates/lockfile/src/package_metadata.rs
  • pacquet/crates/package-manager/src/install_package_by_snapshot/tests.rs
  • pacquet/crates/package-manager/src/current_lockfile/tests.rs
  • pacquet/crates/package-manager/src/deps_graph/tests.rs
  • pacquet/crates/package-manager/src/hoisted_dep_graph/tests.rs
  • pacquet/crates/engine-runtime-node-resolver/src/node_resolver/tests.rs
  • pacquet/crates/package-manager/src/installability/tests.rs
  • pacquet/crates/real-hoist/src/tests.rs
  • pacquet/crates/package-manager/src/build_snapshot.rs
  • pacquet/crates/package-manager/src/dependencies_graph_to_lockfile/tests.rs
  • pacquet/crates/package-manager/src/virtual_store_layout/tests.rs
  • pacquet/crates/package-manager/src/link_bins/tests.rs
  • pacquet/crates/package-manager/src/create_virtual_store/tests.rs
  • pacquet/crates/package-manager/src/hoist/tests.rs
  • pacquet/crates/lockfile/src/lib.rs
  • pacquet/crates/engine-runtime-node-resolver/src/node_resolver.rs
  • pacquet/crates/package-manager/src/dependencies_graph_to_lockfile.rs
  • pacquet/crates/package-manager/src/build_modules/tests.rs
📚 Learning: 2026-05-20T23:23:40.606Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11788
File: pacquet/crates/lockfile/src/snapshot_dep_ref.rs:52-56
Timestamp: 2026-05-20T23:23:40.606Z
Learning: In the pacquet lockfile crate, the link target is intentionally represented as a raw `Link(String)` (not a `LinkTarget` newtype) for both `SnapshotDepRef::Link` and `ImporterDepVersion::Link`. pnpm upstream preserves `link:` targets verbatim with only a prefix check (e.g., `refToRelative`), so do not suggest introducing a `LinkTarget` newtype in a bug-fix/targeted PR. If type branding is ever desired, it should be done together for both variants in a separate dedicated refactor PR rather than as part of a small fix.

Applied to files:

  • pacquet/crates/lockfile/src/package_metadata.rs
  • pacquet/crates/lockfile/src/lib.rs
🔇 Additional comments (22)
pacquet/crates/lockfile/src/package_metadata.rs (1)

16-21: LGTM!

pacquet/crates/package-manager/src/dependencies_graph_to_lockfile.rs (1)

422-443: LGTM!

Also applies to: 543-557

pacquet/crates/lockfile/src/lib.rs (1)

241-241: LGTM!

pacquet/crates/package-manager/src/build_snapshot.rs (1)

92-92: LGTM!

pacquet/crates/package-manager/src/hoisted_dep_graph/tests.rs (1)

151-151: LGTM!

pacquet/crates/package-manager/src/virtual_store_layout/tests.rs (1)

61-61: LGTM!

Also applies to: 115-115, 166-166, 225-225, 312-312, 393-393

pacquet/crates/package-manager/src/dependencies_graph_to_lockfile/tests.rs (1)

6-6: LGTM!

Also applies to: 376-448

pacquet/crates/package-manager/src/build_modules/tests.rs (1)

603-603: LGTM!

Also applies to: 948-948, 1099-1099, 1214-1214, 1395-1395

pacquet/crates/package-manager/src/create_virtual_store/tests.rs (1)

25-25: LGTM!

Also applies to: 335-335, 357-357, 436-436

pacquet/crates/package-manager/src/current_lockfile/tests.rs (1)

255-255: LGTM!

pacquet/crates/package-manager/src/hoist/tests.rs (1)

44-44: LGTM!

pacquet/plans/TEST_PORTING.md (1)

570-578: LGTM!

pacquet/crates/package-manager/src/deps_graph/tests.rs (1)

33-33: LGTM!

pacquet/crates/package-manager/src/install_package_by_snapshot/tests.rs (1)

310-310: LGTM!

pacquet/crates/package-manager/src/installability/tests.rs (1)

59-59: LGTM!

pacquet/crates/package-manager/src/link_bins/tests.rs (1)

534-534: LGTM!

pacquet/crates/real-hoist/src/tests.rs (1)

469-469: LGTM!

pacquet/crates/resolving-deps-resolver/src/lockfile_reuse/tests.rs (1)

49-49: LGTM!

pacquet/crates/engine-runtime-node-resolver/src/node_resolver.rs (2)

9-12: LGTM!


354-360: LGTM!

pacquet/crates/engine-runtime-node-resolver/src/node_resolver/tests.rs (2)

7-7: LGTM!


85-103: LGTM!


📝 Walkthrough

Walkthrough

This PR adds support for recording package versions in pnpm's lockfile for non-registry packages (runtime dependencies) while also changing the node resolver's binary representation from a single value to a named map keyed by "node". The version field is conditionally populated from package manifests based on depPath shape and resolution type, with comprehensive test coverage across multiple crates.

Changes

Runtime Binary Specification Format

Layer / File(s) Summary
Node binary spec map representation
pacquet/crates/engine-runtime-node-resolver/src/node_resolver.rs, pacquet/crates/engine-runtime-node-resolver/src/node_resolver/tests.rs
bin_spec_for_platform now constructs BinarySpec::Map keyed by "node" with OS-specific paths (node.exe on win32, bin/node otherwise) instead of BinarySpec::Single. Added BTreeMap import and unit test bin_spec_is_a_named_map validating both platforms.

Package Metadata Version Field and Integration

Layer / File(s) Summary
PackageMetadata version field definition
pacquet/crates/lockfile/src/package_metadata.rs
New optional version: Option<String> field added to PackageMetadata with Serde configuration to omit when None, documented for non-registry packages in pnpm lockfile format.
Manifest-derived naming and conditional version population
pacquet/crates/package-manager/src/dependencies_graph_to_lockfile.rs, pacquet/crates/package-manager/src/dependencies_graph_to_lockfile/tests.rs
real_name now treats Variations resolutions as manifest-derived and restricts Tarball manifest reads to remote HTTP(s) URLs; build_package_metadata conditionally populates version from manifest only when depPath contains : and resolution is not Directory. New test runtime_dependency_strips_importer_prefix_and_records_package_version verifies prefix handling and version recording.
Lockfile reconstruction and snapshot integration
pacquet/crates/lockfile/src/lib.rs, pacquet/crates/package-manager/src/build_snapshot.rs
Lockfile construction sites now set version: None when building PackageMetadata for directory resolutions and registry packages.
Test infrastructure updates
pacquet/crates/package-manager/src/build_modules/tests.rs, pacquet/crates/package-manager/src/create_virtual_store/tests.rs, pacquet/crates/package-manager/src/current_lockfile/tests.rs, pacquet/crates/package-manager/src/deps_graph/tests.rs, pacquet/crates/package-manager/src/hoist/tests.rs, pacquet/crates/package-manager/src/hoisted_dep_graph/tests.rs, pacquet/crates/package-manager/src/install_package_by_snapshot/tests.rs, pacquet/crates/package-manager/src/installability/tests.rs, pacquet/crates/package-manager/src/link_bins/tests.rs, pacquet/crates/package-manager/src/virtual_store_layout/tests.rs, pacquet/crates/real-hoist/src/tests.rs, pacquet/crates/resolving-deps-resolver/src/lockfile_reuse/tests.rs, pacquet/plans/TEST_PORTING.md
Test helpers and fixtures across 14 test files updated to initialize version: None in PackageMetadata struct literals; documentation clarified on runtime lockfile coverage boundaries.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related issues

  • pnpm/pnpm#12266: The changes directly implement lockfile runtime-dependency rendering and version parity, addressing the core issue of recording manifest package versions for non-registry dependencies.

Possibly related PRs

  • pnpm/pnpm#12076: Both PRs modify pacquet/crates/package-manager/src/dependencies_graph_to_lockfile.rs to refine manifest-derived naming logic and version field population for remote HTTP(S) tarballs and version:<url> depPath shapes.

Poem

🐰 A bunny hops through metadata maps,
Where node keys point to executable paths,
Version fields now track what's real and true,
In lockfiles old and dependencies new!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: updating lockfile format to match pnpm's runtime dependency representation, which is the core objective of the PR.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 pacquet-runtime-version

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 and usage tips.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                          main                                   pr
-----                          ----                                   --
tarball/download_dependency    1.01      5.2±0.30ms   838.2 KB/sec    1.00      5.1±0.18ms   845.3 KB/sec

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

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 10.036 ± 0.162 9.852 10.367 1.87 ± 0.04
pacquet@main 10.019 ± 0.177 9.834 10.317 1.87 ± 0.04
pnpr@HEAD 5.365 ± 0.058 5.301 5.477 1.00
pnpr@main 5.390 ± 0.063 5.299 5.522 1.00 ± 0.02
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 10.03585612822,
      "stddev": 0.16201711961200313,
      "median": 9.991206822319999,
      "user": 3.12621152,
      "system": 3.2339257600000004,
      "min": 9.85219207682,
      "max": 10.367058562819999,
      "times": [
        10.077132817819999,
        10.02009366982,
        10.06242290382,
        9.85219207682,
        10.367058562819999,
        9.96231997482,
        9.88350878382,
        9.93249648482,
        9.95496501882,
        10.246370988819999
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 10.01863485782,
      "stddev": 0.1770847725235578,
      "median": 9.95164590132,
      "user": 3.12182282,
      "system": 3.2358116600000004,
      "min": 9.83365772082,
      "max": 10.31662810982,
      "times": [
        9.89278205382,
        9.92184573282,
        10.30453869782,
        10.030238301819999,
        9.92966495082,
        10.31662810982,
        9.84896349382,
        9.83365772082,
        9.973626851819999,
        10.13440266482
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 5.36538390902,
      "stddev": 0.05832905708646105,
      "median": 5.35334945382,
      "user": 2.5754322199999997,
      "system": 2.92339986,
      "min": 5.3007417418200005,
      "max": 5.4766853298200004,
      "times": [
        5.367331834820001,
        5.361472469820001,
        5.35548871982,
        5.4587571958200005,
        5.4766853298200004,
        5.32366312182,
        5.3007417418200005,
        5.311014520820001,
        5.34747396782,
        5.3512101878200005
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 5.38978304102,
      "stddev": 0.06280204282843649,
      "median": 5.3993351058200005,
      "user": 2.57653052,
      "system": 2.90158476,
      "min": 5.299364033820001,
      "max": 5.5222341128200005,
      "times": [
        5.299364033820001,
        5.3407454768200004,
        5.5222341128200005,
        5.43526370182,
        5.343790690820001,
        5.342041191820001,
        5.39340789682,
        5.40646476782,
        5.409256222820001,
        5.405262314820001
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 657.6 ± 9.5 644.8 679.1 1.00
pacquet@main 681.7 ± 43.5 651.3 766.2 1.04 ± 0.07
pnpr@HEAD 776.3 ± 63.3 736.2 950.6 1.18 ± 0.10
pnpr@main 795.2 ± 79.6 750.4 1009.2 1.21 ± 0.12
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.65764736918,
      "stddev": 0.00949244877102304,
      "median": 0.6576116483800001,
      "user": 0.37293696000000004,
      "system": 1.3252711799999999,
      "min": 0.64478174988,
      "max": 0.6790540928800001,
      "times": [
        0.6591448078800001,
        0.6790540928800001,
        0.65450572588,
        0.66282074388,
        0.65844372988,
        0.64599159388,
        0.64478174988,
        0.65512977888,
        0.65982190188,
        0.65677956688
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.68169799238,
      "stddev": 0.04354047925481083,
      "median": 0.6651722233799999,
      "user": 0.39177786000000003,
      "system": 1.32831418,
      "min": 0.65134680688,
      "max": 0.76622532788,
      "times": [
        0.65473152088,
        0.66777804288,
        0.76622532788,
        0.65326320188,
        0.67318747388,
        0.65598038688,
        0.75965454588,
        0.66256640388,
        0.65134680688,
        0.67224621288
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.7763216259799999,
      "stddev": 0.0633461689182838,
      "median": 0.75651433538,
      "user": 0.39042816,
      "system": 1.3177053799999998,
      "min": 0.73622314388,
      "max": 0.95059982688,
      "times": [
        0.78765637788,
        0.73622314388,
        0.7619386368800001,
        0.73806858188,
        0.75938163688,
        0.75198497488,
        0.95059982688,
        0.75364703388,
        0.74568014388,
        0.77803590288
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.7952245605800001,
      "stddev": 0.07962998828062343,
      "median": 0.7602132043800001,
      "user": 0.40832686,
      "system": 1.33983408,
      "min": 0.75039630688,
      "max": 1.00922827788,
      "times": [
        0.77301436388,
        0.75039630688,
        0.82629333588,
        0.75619586588,
        0.75703020688,
        0.75152137488,
        1.00922827788,
        0.76339620188,
        0.75449476188,
        0.81067490988
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 9.241 ± 0.036 9.206 9.324 1.80 ± 0.04
pacquet@main 9.248 ± 0.049 9.186 9.332 1.80 ± 0.04
pnpr@HEAD 5.126 ± 0.100 5.010 5.378 1.00
pnpr@main 5.219 ± 0.205 5.063 5.560 1.02 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 9.241336027280003,
      "stddev": 0.03585802219375344,
      "median": 9.23805475328,
      "user": 3.6724097799999997,
      "system": 3.2656121,
      "min": 9.20643568728,
      "max": 9.32350872328,
      "times": [
        9.24193655628,
        9.23496257328,
        9.32350872328,
        9.24114693328,
        9.27454318328,
        9.20689694628,
        9.20643568728,
        9.22528925128,
        9.210270898280001,
        9.24836952028
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 9.247822922680001,
      "stddev": 0.049464866662033896,
      "median": 9.23895826228,
      "user": 3.65366968,
      "system": 3.2607392999999996,
      "min": 9.18647358528,
      "max": 9.33174111628,
      "times": [
        9.20362633828,
        9.277452374280001,
        9.24876985428,
        9.296527192280001,
        9.22914667028,
        9.33174111628,
        9.29306830928,
        9.199877390280001,
        9.18647358528,
        9.211546396280001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 5.12550227038,
      "stddev": 0.10012715756012498,
      "median": 5.10919047628,
      "user": 2.387242079999999,
      "system": 2.7994607,
      "min": 5.01006773728,
      "max": 5.378438941280001,
      "times": [
        5.1350304082800005,
        5.076299483280001,
        5.01006773728,
        5.0700783102800004,
        5.13932251028,
        5.08746569628,
        5.13091525628,
        5.06175096028,
        5.378438941280001,
        5.16565340028
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 5.219331598479999,
      "stddev": 0.20537551815722768,
      "median": 5.10260633028,
      "user": 2.3637888799999995,
      "system": 2.7863534,
      "min": 5.06338320228,
      "max": 5.56045440728,
      "times": [
        5.12730694728,
        5.06750560528,
        5.17772082028,
        5.46664547728,
        5.0777240722800006,
        5.07790571328,
        5.50551955728,
        5.06338320228,
        5.0691501822800005,
        5.56045440728
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.387 ± 0.005 1.380 1.398 2.06 ± 0.03
pacquet@main 1.433 ± 0.012 1.411 1.446 2.13 ± 0.04
pnpr@HEAD 0.672 ± 0.010 0.656 0.692 1.00
pnpr@main 0.689 ± 0.043 0.661 0.804 1.02 ± 0.07
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.3874152157999997,
      "stddev": 0.005300526624597984,
      "median": 1.3870931445999999,
      "user": 1.5176676400000002,
      "system": 1.8102484799999998,
      "min": 1.3795262461,
      "max": 1.3978396321,
      "times": [
        1.3919079741,
        1.3795262461,
        1.3978396321,
        1.3843338181,
        1.3896902120999999,
        1.3871936680999999,
        1.3869926210999999,
        1.3904389921,
        1.3825073761,
        1.3837216180999998
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.4329656436999998,
      "stddev": 0.011818683848778907,
      "median": 1.4344778021,
      "user": 1.5672379399999998,
      "system": 1.85493438,
      "min": 1.4109599781,
      "max": 1.4462416131,
      "times": [
        1.4451451211,
        1.4318148470999998,
        1.4213193521,
        1.4214558580999999,
        1.4351777761,
        1.4445558411,
        1.4392082221,
        1.4109599781,
        1.4337778281,
        1.4462416131
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.6721611371,
      "stddev": 0.01007616092200756,
      "median": 0.6681495426,
      "user": 0.33825324,
      "system": 1.2665025799999996,
      "min": 0.6561459921,
      "max": 0.6923814631,
      "times": [
        0.6923814631,
        0.6670546271000001,
        0.6685257931,
        0.6667230061,
        0.6753800311,
        0.6561459921,
        0.6673825861,
        0.6797097661,
        0.6677732921,
        0.6805348141
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.6889348451,
      "stddev": 0.04312342020768817,
      "median": 0.6726631911000001,
      "user": 0.35031034000000005,
      "system": 1.27189688,
      "min": 0.6614997821,
      "max": 0.8039108711,
      "times": [
        0.6937551991,
        0.6850648501000001,
        0.6614997821,
        0.8039108711,
        0.6728420991,
        0.6724842831000001,
        0.6666015461,
        0.7074081041000001,
        0.6630764641000001,
        0.6627052521000001
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.989 ± 0.022 4.968 5.039 7.41 ± 0.15
pacquet@main 5.031 ± 0.031 4.981 5.090 7.47 ± 0.15
pnpr@HEAD 0.674 ± 0.013 0.660 0.705 1.00
pnpr@main 0.693 ± 0.060 0.659 0.861 1.03 ± 0.09
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.98941566436,
      "stddev": 0.02155960339894522,
      "median": 4.98216660686,
      "user": 1.6962412399999998,
      "system": 1.9723600599999997,
      "min": 4.96782185536,
      "max": 5.0390445573600005,
      "times": [
        4.96782185536,
        4.97543331736,
        4.98143148036,
        5.0390445573600005,
        4.98290173336,
        5.0100865713600005,
        4.99437094636,
        4.99288562836,
        4.98133643736,
        4.96884411636
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 5.03052162546,
      "stddev": 0.031214316257665038,
      "median": 5.03053458586,
      "user": 1.7456494399999998,
      "system": 2.0199338599999996,
      "min": 4.98122582436,
      "max": 5.08976060036,
      "times": [
        5.02844149936,
        5.08976060036,
        5.0478952253600005,
        5.03262767236,
        5.01922059136,
        4.99097396636,
        4.98122582436,
        5.04051570836,
        5.01944268736,
        5.05511247936
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.6735912686600001,
      "stddev": 0.013202074336060743,
      "median": 0.6701260938600001,
      "user": 0.33372073999999996,
      "system": 1.26845966,
      "min": 0.65989812936,
      "max": 0.7047692673600001,
      "times": [
        0.7047692673600001,
        0.67672008236,
        0.6663412333600001,
        0.67313988436,
        0.6626623203600001,
        0.65989812936,
        0.6725140353600001,
        0.6677381523600001,
        0.66659301536,
        0.68553656636
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.6931772192600001,
      "stddev": 0.059851256315547184,
      "median": 0.6748397023600001,
      "user": 0.35137184,
      "system": 1.26262696,
      "min": 0.6588163333600001,
      "max": 0.86136974336,
      "times": [
        0.69648085136,
        0.66948324536,
        0.6760757983600001,
        0.6741552173600001,
        0.67295887336,
        0.86136974336,
        0.6782038503600001,
        0.6687040923600001,
        0.6755241873600001,
        0.6588163333600001
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/12277
Testbedpacquet

🚨 2 Alerts

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
isolated-linker.fresh-install.cold-cache.cold-storeLatency
seconds (s)
📈 plot
🚷 threshold
🚨 alert (🔔)
9.24 s
(+67.99%)Baseline: 5.50 s
6.60 s
(139.99%)

isolated-linker.fresh-restore.cold-cache.cold-storeLatency
seconds (s)
📈 plot
🚷 threshold
🚨 alert (🔔)
10.04 s
(+26.52%)Baseline: 7.93 s
9.52 s
(105.44%)

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
🚨 view alert (🔔)
9,241.34 ms
(+67.99%)Baseline: 5,501.04 ms
6,601.25 ms
(139.99%)

isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
4,989.42 ms
(-0.21%)Baseline: 4,999.78 ms
5,999.73 ms
(83.16%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
1,387.42 ms
(+0.87%)Baseline: 1,375.42 ms
1,650.50 ms
(84.06%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
10,035.86 ms
(+26.52%)Baseline: 7,931.95 ms
9,518.34 ms
(105.44%)

isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
657.65 ms
(+1.07%)Baseline: 650.68 ms
780.81 ms
(84.23%)
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit a06adee into main Jun 9, 2026
27 of 28 checks passed
@zkochan
zkochan deleted the pacquet-runtime-version branch June 9, 2026 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant