Repository navigation
Conversation
PR Summary by QodoFix
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe pnpm self-update, store-install, env-integrity, and CLI flows now derive package-manager identity from the requested version and use that identity through install, linking, slot resolution, and lockfile verification. ChangesPackage-name-aware pnpm install, linking, and verification
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested labels: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Micro-Benchmark ResultsLinux |
Code Review by Qodo
1.
|
|
Code review by qodo was updated up to the latest commit 6fc02b4 |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12820 +/- ##
==========================================
+ Coverage 85.19% 85.88% +0.68%
==========================================
Files 416 416
Lines 65920 66064 +144
==========================================
+ Hits 56160 56736 +576
+ Misses 9760 9328 -432 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Code review by qodo was updated up to the latest commit 9fcde87 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
pacquet/crates/cli/src/cli_args/self_update/install_pnpm/tests.rs (1)
40-47: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winMissing coverage for the non-semver fallback's
links_native_binaryflag.The sibling test (line 37) covers the fallback's
.name, but this test never assertspnpm_package_to_install("not-semver").links_native_binary(which the contract returns astrueperinstall_pnpm.rs). This branch is part of the version-selection logic Codecov flagged with low patch coverage.✅ Suggested addition
fn native_binary_linking_matches_pnpm_engine_layout() { assert!(pnpm_package_to_install("12.0.0-alpha.1").links_native_binary); assert!(pnpm_package_to_install("11.10.0").links_native_binary); assert!(pnpm_package_to_install("6.17.1").links_native_binary); assert!(!pnpm_package_to_install("6.16.0").links_native_binary); assert!(!pnpm_package_to_install("5.18.10").links_native_binary); + assert!(pnpm_package_to_install("not-semver").links_native_binary); }🤖 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/cli/src/cli_args/self_update/install_pnpm/tests.rs` around lines 40 - 47, The native binary linking test for pnpm version selection is missing coverage for the non-semver fallback branch. Update the `native_binary_linking_matches_pnpm_engine_layout` test in `install_pnpm/tests.rs` to also assert that `pnpm_package_to_install("not-semver").links_native_binary` is true, matching the fallback behavior implemented by `pnpm_package_to_install` in `install_pnpm.rs`.pacquet/crates/env-installer/src/resolve_package_manager_integrities.rs (2)
29-30: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRedundant
package_manager_depscomputation.
resolve_package_manager_integritiescomputespackage_manager_depsat Line 29, butis_package_manager_resolved(called right after, Line 30) independently recomputes the same slice internally via its own call topackage_manager_deps(pnpm_version)(Line 116). The Line 29 binding isn't used until Line 41, after the early-return check. Consider passing the already-computed slice intois_package_manager_resolvedto avoid the duplicate semver parse/dispatch.♻️ Proposed refactor
- let package_manager_deps = package_manager_deps(pnpm_version); - if is_package_manager_resolved(&env_lockfile, wanted_specifier, pnpm_version) { + let package_manager_deps = package_manager_deps(pnpm_version); + if is_package_manager_resolved_with_deps(&env_lockfile, wanted_specifier, pnpm_version, package_manager_deps) { return Ok(()); }Also applies to: 116-118
🤖 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/env-installer/src/resolve_package_manager_integrities.rs` around lines 29 - 30, resolve_package_manager_integrities is computing package_manager_deps before the early return, but is_package_manager_resolved recomputes the same data internally. Update resolve_package_manager_integrities and is_package_manager_resolved so the already-built package_manager_deps slice is passed through and reused instead of calling package_manager_deps(pnpm_version) twice. Keep the fix anchored around the resolve_package_manager_integrities function and the is_package_manager_resolved helper.
135-140: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low valueSilent fallback to
trueon unparseable version.If
pnpm_versionfails to parse,pnpm_exe_package_existsdefaults totrue, assuming the exe package exists. This is a reasonable defensive default givenresolve_depwould likely fail anyway on a bad specifier, but it's worth confirming this matches the intended behavior of the TS pnpm counterpart rather than silently guessing.🤖 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/env-installer/src/resolve_package_manager_integrities.rs` around lines 135 - 140, The pnpm_exe_package_exists helper currently returns true when node_semver::Version::parse fails, which silently assumes the exe package exists; verify this matches the intended behavior of the TypeScript pnpm counterpart used by resolve_package_manager_integrities, and either align the fallback explicitly there or make the failure path conservative/handled in the same way the rest of the package-manager resolution logic expects.
🤖 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/env-installer/src/resolve_package_manager_integrities.rs`:
- Around line 16-18: The PNPM executable cutoff is outdated and causes integrity
resolution to look for `@pnpm/exe` before it exists. Update the
PNPM_EXE_INTRODUCED constant in resolve_package_manager_integrities to the
correct first-published pnpm version, and ensure the logic that uses this symbol
only treats versions at or above that threshold as having the exe-based
dependency.
---
Nitpick comments:
In `@pacquet/crates/cli/src/cli_args/self_update/install_pnpm/tests.rs`:
- Around line 40-47: The native binary linking test for pnpm version selection
is missing coverage for the non-semver fallback branch. Update the
`native_binary_linking_matches_pnpm_engine_layout` test in
`install_pnpm/tests.rs` to also assert that
`pnpm_package_to_install("not-semver").links_native_binary` is true, matching
the fallback behavior implemented by `pnpm_package_to_install` in
`install_pnpm.rs`.
In `@pacquet/crates/env-installer/src/resolve_package_manager_integrities.rs`:
- Around line 29-30: resolve_package_manager_integrities is computing
package_manager_deps before the early return, but is_package_manager_resolved
recomputes the same data internally. Update resolve_package_manager_integrities
and is_package_manager_resolved so the already-built package_manager_deps slice
is passed through and reused instead of calling
package_manager_deps(pnpm_version) twice. Keep the fix anchored around the
resolve_package_manager_integrities function and the is_package_manager_resolved
helper.
- Around line 135-140: The pnpm_exe_package_exists helper currently returns true
when node_semver::Version::parse fails, which silently assumes the exe package
exists; verify this matches the intended behavior of the TypeScript pnpm
counterpart used by resolve_package_manager_integrities, and either align the
fallback explicitly there or make the failure path conservative/handled in the
same way the rest of the package-manager resolution logic expects.
🪄 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: 84cc3e1f-ec68-481f-929a-43c991aa274e
📒 Files selected for processing (7)
pacquet/crates/cli/src/cli_args/self_update.rspacquet/crates/cli/src/cli_args/self_update/install_pnpm.rspacquet/crates/cli/src/cli_args/self_update/install_pnpm/tests.rspacquet/crates/cli/src/cli_args/with/install_pnpm_to_store.rspacquet/crates/cli/src/config_deps.rspacquet/crates/env-installer/src/resolve_package_manager_integrities.rspacquet/crates/env-installer/src/tests.rs
✅ Files skipped from review due to trivial changes (1)
- pacquet/crates/cli/src/config_deps.rs
🚧 Files skipped from review as they are similar to previous changes (3)
- pacquet/crates/cli/src/cli_args/self_update.rs
- pacquet/crates/cli/src/cli_args/with/install_pnpm_to_store.rs
- pacquet/crates/cli/src/cli_args/self_update/install_pnpm.rs
|
Code review by qodo was updated up to the latest commit 9fcde87 |
|
Code review by qodo was updated up to the latest commit 876c186 |
|
Code review by qodo was updated up to the latest commit 876c186 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pacquet/crates/cli/src/with_current.rs (1)
21-21: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winHardcoded boolean-options list risks drift from
CliArgs.
BOOLEAN_LONG_OPTIONSmust be manually kept in sync with everyboolfield added toCliArgs; if a future global boolean flag is added without updating this list,long_option_consumes_valuewill wrongly treat it as value-consuming during thewith currentrewrite.with_boolean_negations(inboolean_negations.rs) already solves the identical problem by scanning the builtCommandforArgAction::SetTrueargs dynamically — consider deriving this list the same way instead of a separate hardcoded array.♻️ Sketch of a derived approach
-const BOOLEAN_LONG_OPTIONS: &[&str] = &["color", "recursive", "yes"]; +fn boolean_long_options() -> Vec<String> { + CliArgs::command() + .get_arguments() + .filter(|arg| matches!(arg.get_action(), clap::ArgAction::SetTrue)) + .filter_map(|arg| arg.get_long().map(String::from)) + .collect() +}🤖 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/cli/src/with_current.rs` at line 21, The hardcoded BOOLEAN_LONG_OPTIONS array in with_current.rs can drift from CliArgs as new bool flags are added. Replace the manual list with a derived lookup built from the Command/Arg metadata, similar to how with_boolean_negations in boolean_negations.rs scans for ArgAction::SetTrue, and update long_option_consumes_value to use that dynamic source so every current and future boolean option stays in sync automatically.
🤖 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.
Nitpick comments:
In `@pacquet/crates/cli/src/with_current.rs`:
- Line 21: The hardcoded BOOLEAN_LONG_OPTIONS array in with_current.rs can drift
from CliArgs as new bool flags are added. Replace the manual list with a derived
lookup built from the Command/Arg metadata, similar to how
with_boolean_negations in boolean_negations.rs scans for ArgAction::SetTrue, and
update long_option_consumes_value to use that dynamic source so every current
and future boolean option stays in sync automatically.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: f87e0823-26eb-4826-a687-1d7a41a44ec7
📒 Files selected for processing (5)
pacquet/crates/cli/src/cli_args/cli_command.rspacquet/crates/cli/src/cli_args/dispatch.rspacquet/crates/cli/src/with_current.rspacquet/crates/cli/src/with_current/tests.rspacquet/crates/cli/tests/with.rs
✅ Files skipped from review due to trivial changes (1)
- pacquet/crates/cli/src/cli_args/dispatch.rs
1 similar comment
There was a problem hiding this comment.
🧹 Nitpick comments (2)
pacquet/crates/cli/src/cli_args/self_update/install_pnpm/tests.rs (2)
138-138: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUse
PNPM_PACKAGE_NAMEconstant instead of hardcoded"pnpm"literal.Both new tests hardcode
"pnpm"for the wrapper package name argument, even thoughPNPM_PACKAGE_NAMEis imported into this module. Using the constant keeps tests aligned if the constant value ever changes and matches the intent of the import.♻️ Proposed fix
- let err = - link_exe_platform_binary(temp.path(), "pnpm").expect_err("escaped native source rejected"); + let err = link_exe_platform_binary(temp.path(), PNPM_PACKAGE_NAME) + .expect_err("escaped native source rejected"); assert!(err.to_string().contains("is a symlink"), "unexpected error: {err:?}"); - assert!(!package_dir(temp.path(), "pnpm").join("pnpm").exists()); + assert!(!package_dir(temp.path(), PNPM_PACKAGE_NAME).join("pnpm").exists());Also applies to: 140-140, 159-159, 162-162
🤖 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/cli/src/cli_args/self_update/install_pnpm/tests.rs` at line 138, The pnpm self-update tests are hardcoding the wrapper package name instead of using the imported PNPM_PACKAGE_NAME constant. Update the affected calls in install_pnpm/tests.rs that reference link_exe_platform_binary and related test helpers to pass PNPM_PACKAGE_NAME so the tests stay aligned with the shared symbol if the package name changes.
140-140: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAdd diagnostic logging before plain
assert!calls.Per the pacquet Rust test conventions, non-
assert_eq!assertions should havedbg!/eprintln!(or a failure message) logging before them so a failure clearly shows the actual state. These twoassert!calls have no message and no preceding logging, unlike the sibling assertions at Lines 139/161 which include{err:?}in the message.As per path instructions, "Follow logging/test guidance: add logging (
eprintln!/dbg!) before non-assert_eq!assertions, but avoid unnecessary logging for simple scalarassert_eq!."🧪 Proposed fix
- assert!(!package_dir(temp.path(), "pnpm").join("pnpm").exists()); + let linked_path = package_dir(temp.path(), "pnpm").join("pnpm"); + dbg!(&linked_path); + assert!(!linked_path.exists());Also applies to: 162-162
🤖 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/cli/src/cli_args/self_update/install_pnpm/tests.rs` at line 140, Add diagnostic output before the plain assert! checks in install_pnpm tests so failures show the actual filesystem state. Update the test cases around the pnpm package_dir assertions in install_pnpm/tests.rs by adding dbg!/eprintln! or a failure message before the non-assert_eq! assertions, similar in spirit to the neighboring error assertions that already include context. Keep the existing assertion behavior, but ensure the relevant state is logged in the test before each plain assert!.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.
Nitpick comments:
In `@pacquet/crates/cli/src/cli_args/self_update/install_pnpm/tests.rs`:
- Line 138: The pnpm self-update tests are hardcoding the wrapper package name
instead of using the imported PNPM_PACKAGE_NAME constant. Update the affected
calls in install_pnpm/tests.rs that reference link_exe_platform_binary and
related test helpers to pass PNPM_PACKAGE_NAME so the tests stay aligned with
the shared symbol if the package name changes.
- Line 140: Add diagnostic output before the plain assert! checks in
install_pnpm tests so failures show the actual filesystem state. Update the test
cases around the pnpm package_dir assertions in install_pnpm/tests.rs by adding
dbg!/eprintln! or a failure message before the non-assert_eq! assertions,
similar in spirit to the neighboring error assertions that already include
context. Keep the existing assertion behavior, but ensure the relevant state is
logged in the test before each plain assert!.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 8ac8d659-0a5a-4292-bea3-20add80d005f
📒 Files selected for processing (2)
pacquet/crates/cli/src/cli_args/self_update/install_pnpm.rspacquet/crates/cli/src/cli_args/self_update/install_pnpm/tests.rs
🚧 Files skipped from review as they are similar to previous changes (1)
- pacquet/crates/cli/src/cli_args/self_update/install_pnpm.rs
|
Code review by qodo was updated up to the latest commit a71d5fc |
Integrated-Benchmark Report (Linux)Commit: Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 3.95019289512,
"stddev": 0.13606845688219413,
"median": 3.9313200986199996,
"user": 3.8138605400000003,
"system": 3.3594620199999996,
"min": 3.79164638212,
"max": 4.20960078012,
"times": [
4.20960078012,
3.98817060312,
3.79212708612,
3.86419772512,
3.79164638212,
3.87446959412,
4.00671726412,
4.06782536212,
3.85980424112,
4.04736991312
]
},
{
"command": "pacquet@main",
"mean": 3.84667181282,
"stddev": 0.17440276577026356,
"median": 3.79455024462,
"user": 3.7088530399999997,
"system": 3.32935572,
"min": 3.63822622212,
"max": 4.11765180312,
"times": [
3.71057697012,
4.06652248412,
3.83963239812,
3.63822622212,
4.11765180312,
3.69354050812,
3.7013951451200002,
4.01420962212,
3.93549488412,
3.74946809112
]
},
{
"command": "pnpr@HEAD",
"mean": 2.13060555742,
"stddev": 0.11879173158167224,
"median": 2.0903777556199996,
"user": 2.7449343400000004,
"system": 2.94782682,
"min": 1.99967828612,
"max": 2.38601749212,
"times": [
2.38601749212,
2.17731853312,
2.08280929412,
2.0931025821199998,
2.03359407612,
2.26432288612,
2.14754392912,
2.08765292912,
2.03401556612,
1.99967828612
]
},
{
"command": "pnpr@main",
"mean": 2.1065291464199998,
"stddev": 0.09147827301753643,
"median": 2.07168254912,
"user": 2.74221714,
"system": 2.92829152,
"min": 2.00181536112,
"max": 2.25707365112,
"times": [
2.25707365112,
2.23616361212,
2.06112945812,
2.03013614412,
2.00181536112,
2.08837840512,
2.04254882012,
2.06017544312,
2.20563492912,
2.08223564012
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6495749654599999,
"stddev": 0.014002462596671414,
"median": 0.6475839853600001,
"user": 0.38214693999999994,
"system": 1.3293238200000002,
"min": 0.63286635836,
"max": 0.67727288136,
"times": [
0.65520863136,
0.63862152436,
0.6332276463600001,
0.64705904636,
0.66318545036,
0.65734675836,
0.64285243336,
0.67727288136,
0.64810892436,
0.63286635836
]
},
{
"command": "pacquet@main",
"mean": 0.64847363346,
"stddev": 0.012345780201065118,
"median": 0.64611461036,
"user": 0.38675573999999996,
"system": 1.31832182,
"min": 0.63297309536,
"max": 0.67080140136,
"times": [
0.63984246436,
0.63864062736,
0.63297309536,
0.65338782736,
0.65584122436,
0.63840740436,
0.64015766836,
0.65207155236,
0.67080140136,
0.66261306936
]
},
{
"command": "pnpr@HEAD",
"mean": 0.6971509581600001,
"stddev": 0.020945432355763138,
"median": 0.7012472563600001,
"user": 0.39026054,
"system": 1.3610845200000001,
"min": 0.66920304136,
"max": 0.73848696836,
"times": [
0.66920304136,
0.7018708193600001,
0.67548064136,
0.67235434536,
0.70712609936,
0.69279754936,
0.70255115636,
0.71101526736,
0.73848696836,
0.70062369336
]
},
{
"command": "pnpr@main",
"mean": 0.70711011196,
"stddev": 0.03317130036880055,
"median": 0.69554388036,
"user": 0.39203634000000004,
"system": 1.35182512,
"min": 0.67933768536,
"max": 0.78708534836,
"times": [
0.7151599723600001,
0.73396894236,
0.68291086636,
0.71292744736,
0.69326854336,
0.68180458336,
0.78708534836,
0.69781921736,
0.68681851336,
0.67933768536
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.277124262839999,
"stddev": 0.06208672630217506,
"median": 4.259755032539999,
"user": 3.82293984,
"system": 3.31906054,
"min": 4.1956134685399995,
"max": 4.39890963954,
"times": [
4.23466575954,
4.30481512554,
4.23875073454,
4.28075933054,
4.3246939725399995,
4.39890963954,
4.1956134685399995,
4.32961509254,
4.22864406054,
4.23477544454
]
},
{
"command": "pacquet@main",
"mean": 4.2869197865399995,
"stddev": 0.061340819509049876,
"median": 4.2809373835399995,
"user": 3.83373664,
"system": 3.2979099400000003,
"min": 4.20788092054,
"max": 4.41616773254,
"times": [
4.27550285454,
4.41616773254,
4.29538173754,
4.28637191254,
4.22183473054,
4.27157733254,
4.23686316054,
4.3182411065399995,
4.33937637754,
4.20788092054
]
},
{
"command": "pnpr@HEAD",
"mean": 2.24877423794,
"stddev": 0.12195890053651752,
"median": 2.2908120955399998,
"user": 2.5585652400000005,
"system": 2.81703274,
"min": 2.05731145754,
"max": 2.36450725954,
"times": [
2.26089221754,
2.35900289454,
2.35407049254,
2.08879943554,
2.36450725954,
2.05731145754,
2.32073197354,
2.35529970154,
2.20709422454,
2.12003272254
]
},
{
"command": "pnpr@main",
"mean": 2.13891452494,
"stddev": 0.12853088903097248,
"median": 2.11277224254,
"user": 2.58267864,
"system": 2.7940587399999997,
"min": 1.9549102295399998,
"max": 2.33942371954,
"times": [
2.30583668054,
2.12939613054,
1.9549102295399998,
2.11340205754,
2.2826389155399998,
2.11214242754,
2.02404579354,
2.07159126954,
2.05575802554,
2.33942371954
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.3863098115999999,
"stddev": 0.02347008344932778,
"median": 1.3844994475,
"user": 1.33810422,
"system": 1.71235438,
"min": 1.3553820699999999,
"max": 1.42516504,
"times": [
1.3553820699999999,
1.3625834099999998,
1.419456875,
1.37505098,
1.383105013,
1.3640324529999999,
1.385893882,
1.396210491,
1.3962179019999998,
1.42516504
]
},
{
"command": "pacquet@main",
"mean": 1.4189273257,
"stddev": 0.025169316037040403,
"median": 1.4240316845,
"user": 1.35966912,
"system": 1.7314932799999998,
"min": 1.383381262,
"max": 1.456642426,
"times": [
1.383381262,
1.426823835,
1.421239534,
1.433210296,
1.441422656,
1.437997971,
1.391279268,
1.3866727049999998,
1.456642426,
1.410603304
]
},
{
"command": "pnpr@HEAD",
"mean": 0.6706312990000002,
"stddev": 0.011234716279980836,
"median": 0.6716799420000001,
"user": 0.3507404199999999,
"system": 1.2865236799999997,
"min": 0.6553752890000001,
"max": 0.6914275830000001,
"times": [
0.6611036570000001,
0.6691581540000001,
0.6553752890000001,
0.6792286620000001,
0.6914275830000001,
0.675981232,
0.6568835670000001,
0.67747984,
0.6654732760000001,
0.67420173
]
},
{
"command": "pnpr@main",
"mean": 0.6683482643000002,
"stddev": 0.010220000912684483,
"median": 0.6684590330000001,
"user": 0.34656832,
"system": 1.2811620799999999,
"min": 0.6522535850000001,
"max": 0.6855681130000001,
"times": [
0.6679258290000001,
0.6689922370000001,
0.6522535850000001,
0.6587303440000001,
0.6596517890000001,
0.6716539650000001,
0.6855681130000001,
0.679014117,
0.6764255100000001,
0.663267154
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 3.1756688128600006,
"stddev": 0.033192215876327764,
"median": 3.17076772386,
"user": 1.8706671199999998,
"system": 2.00891194,
"min": 3.13611608286,
"max": 3.24432820686,
"times": [
3.14597193486,
3.14809397186,
3.17977243786,
3.13611608286,
3.1687082808600002,
3.15954908486,
3.17282716686,
3.1863021168600003,
3.24432820686,
3.21501884486
]
},
{
"command": "pacquet@main",
"mean": 3.21694034736,
"stddev": 0.05963139262341903,
"median": 3.22383118186,
"user": 1.8849185199999998,
"system": 2.07030564,
"min": 3.1214665578600003,
"max": 3.34104102386,
"times": [
3.16222519486,
3.22694597686,
3.21541101186,
3.22071638686,
3.16481144086,
3.24569571986,
3.22718206386,
3.34104102386,
3.1214665578600003,
3.2439080968600003
]
},
{
"command": "pnpr@HEAD",
"mean": 0.6763930579599999,
"stddev": 0.008742124523521893,
"median": 0.67699867136,
"user": 0.35479772000000004,
"system": 1.3095887399999997,
"min": 0.65761768586,
"max": 0.68660322986,
"times": [
0.65761768586,
0.66730259586,
0.67464353386,
0.68616349086,
0.68326059386,
0.67654985186,
0.67710555286,
0.67689178986,
0.68660322986,
0.6777922548599999
]
},
{
"command": "pnpr@main",
"mean": 0.69339797606,
"stddev": 0.014768561237435805,
"median": 0.69562648186,
"user": 0.34689081999999993,
"system": 1.3185278399999998,
"min": 0.67154028886,
"max": 0.72391687786,
"times": [
0.69861303086,
0.68957328186,
0.67154028886,
0.69587024086,
0.69840386586,
0.68058549686,
0.72391687786,
0.69538272286,
0.67799960386,
0.70209435086
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.66543341046,
"stddev": 0.009878638920033144,
"median": 0.66522747776,
"user": 0.62485592,
"system": 0.15440366,
"min": 0.6521353777600001,
"max": 0.6817981907600001,
"times": [
0.6817981907600001,
0.6774633967600001,
0.6738943087600001,
0.66704623776,
0.6588301207600001,
0.66699173176,
0.6634632237600001,
0.6564403077600001,
0.6562712087600001,
0.6521353777600001
]
},
{
"command": "pacquet@main",
"mean": 0.66094899746,
"stddev": 0.006808080683455631,
"median": 0.6607395747600001,
"user": 0.61484542,
"system": 0.15759396000000003,
"min": 0.6489848627600001,
"max": 0.6723384777600001,
"times": [
0.6598124647600001,
0.6723384777600001,
0.6662471117600001,
0.6568367997600001,
0.6635556207600001,
0.6489848627600001,
0.6670327937600001,
0.6538390157600001,
0.6591761427600001,
0.6616666847600001
]
},
{
"command": "pnpr@HEAD",
"mean": 0.11054256417666668,
"stddev": 0.002400747871017802,
"median": 0.11142786676000002,
"user": 0.027502244999999998,
"system": 0.021234701666666665,
"min": 0.10680943176000002,
"max": 0.11343460276000002,
"times": [
0.11129887276000001,
0.10724343976000002,
0.10716747676000002,
0.10766563976000001,
0.10695840076000002,
0.10761638676000002,
0.11291072176000001,
0.11116384376000002,
0.11343460276000002,
0.11238516876000001,
0.11105299076000001,
0.11220848376000002,
0.11211445176000001,
0.11274283476000001,
0.11155686076000002,
0.11255138276000001,
0.11163756976000001,
0.10680943176000002,
0.10743062476000001,
0.10783644176000001,
0.11220357176000001,
0.11288433276000001,
0.11112837176000001,
0.11301963776000001
]
},
{
"command": "pnpr@main",
"mean": 0.11136130850999998,
"stddev": 0.0016581998428693242,
"median": 0.11174993576,
"user": 0.02636337,
"system": 0.02248216,
"min": 0.10698405876000001,
"max": 0.11381790776000002,
"times": [
0.11231239176000002,
0.11144467576000001,
0.11270076376000002,
0.11177660476000001,
0.11167712876000001,
0.11240363576000001,
0.11318827976000001,
0.11036268476000001,
0.11172326676000001,
0.11140151376000001,
0.10698405876000001,
0.10816628776000001,
0.11143646676000002,
0.10826484276000001,
0.11125823276000002,
0.11209835976000002,
0.11231564876000001,
0.11381790776000002,
0.11132011476000002,
0.11243195976000002,
0.11234665376000001,
0.10909819776000002,
0.11206187576000001,
0.11207985176000002
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 6.633626769280001,
"stddev": 0.14364348201362137,
"median": 6.641406784080001,
"user": 3.9044494999999997,
"system": 3.6050001199999997,
"min": 6.31829613208,
"max": 6.815242292080001,
"times": [
6.31829613208,
6.589680474080001,
6.627658830080001,
6.58186529808,
6.81417218108,
6.815242292080001,
6.68540672608,
6.54462834308,
6.65515473808,
6.70416267808
]
},
{
"command": "pacquet@main",
"mean": 6.643748917980001,
"stddev": 0.07706075063456015,
"median": 6.6475315020800005,
"user": 4.011939099999999,
"system": 3.6384599200000003,
"min": 6.520192688080001,
"max": 6.764572104080001,
"times": [
6.708135434080001,
6.5797812570800005,
6.520192688080001,
6.67891082708,
6.629560141080001,
6.66550286308,
6.58691326808,
6.72290853408,
6.58101206308,
6.764572104080001
]
},
{
"command": "pnpr@HEAD",
"mean": 5.021738192580001,
"stddev": 0.15637431716814337,
"median": 5.01291983558,
"user": 2.8914638999999993,
"system": 3.17934572,
"min": 4.759964189080001,
"max": 5.256393544080001,
"times": [
4.820613042080001,
4.980066762080001,
5.18902054708,
4.94295766208,
5.11293742408,
5.011284771080001,
5.256393544080001,
5.01455490008,
5.12958908408,
4.759964189080001
]
},
{
"command": "pnpr@main",
"mean": 4.921327098280001,
"stddev": 0.06363459318877744,
"median": 4.8995584370800005,
"user": 2.8826956999999993,
"system": 3.15194962,
"min": 4.859091242080001,
"max": 5.0747441040800005,
"times": [
4.884491690080001,
4.876669549080001,
4.877268624080001,
4.958354449080001,
4.91462518408,
5.0747441040800005,
4.884479561080001,
4.859091242080001,
4.94990057708,
4.933646002080001
]
}
]
} |
|
| Branch | pr/12820 |
| Testbed | pnpr |
⚠️ 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-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | milliseconds (ms) |
|---|---|---|
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 2,248.77 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 676.39 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 670.63 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 110.54 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 2,130.61 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 5,021.74 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 697.15 ms |
Summary
Fixes the Rust
pacquetwithdowngrade path so it selects the right package layout for the resolved pnpm version:pnpmfor versions before@pnpm/exeexisted.@pnpm/exefor6.17.1through v11, using the legacy platform artifact names like@pnpm/macos-arm64.pnpmfor v12+, using the@pnpm/exe.<platform>artifact names.The install path also relinks the host native binary on cache hits, so a partially linked global-virtual-store slot is repaired instead of reused broken.
Related to #11633.
Squash Commit Body
Checklist
pacquet/port, or the description notes what still needs porting.Written by an agent (Codex, GPT-5).
Summary by CodeRabbit
--colorand--yes/-y, and updatedwith currenthandling and option parsing to preserve these flags.@pnpm/exe.withcommand behavior.