Skip to content

test(cli): pass the restart log path through process.argv - #13621

Merged
zkochan merged 1 commit into
mainfrom
claude/windows-portable-restart-test-fapqbz
Aug 3, 2026
Merged

zkochan merged 1 commit into
mainfrom
claude/windows-portable-restart-test-fapqbz

Conversation

@KSXGitHub

@KSXGitHub KSXGitHub commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Resolves #12720.

The node -e helper in the restart tests interpolated the log file's path into a single-quoted JavaScript string literal, so a Windows path such as C:\Users\...\log.txt has \U and \n parsed as escape sequences and the script appends to a mangled path instead of the log the test reads back. The helper now passes the path as a script argument and reads it from process.argv[1], never letting it reach the JavaScript parser; the argument that pnpm restart forwards to each script follows at process.argv[2].

Both copies of the helper are updated: the unit tests in pnpm/crates/cli/src/cli_args/restart/tests.rs and the integration tests in pnpm/crates/cli/tests/restart.rs. The sibling shell helpers need no equivalent change — they interpolate into a double-quoted POSIX shell word, which does not eat backslashes.

Both tests remain #[cfg(unix)], so this fixes a latent defect rather than an observed failure; lifting the gates needs a Windows machine to verify and is not part of this change. There is nothing to port to the TypeScript CLI, whose test helpers already pass paths as shell-quoted arguments rather than embedding them in JavaScript source.

Squash Commit Body

The `node -e` helper in the restart tests interpolated the log file's
path straight into a single-quoted JavaScript string literal. A Windows
temp path such as `C:\Users\...\log.txt` is then parsed as JS text, so
`\U` and `\n` become escape sequences and the script appends to a
mangled path instead of the log the test reads back.

Pass the path as a script argument and read it from `process.argv[1]`
instead, so it never reaches the JavaScript parser. The argument that
`pnpm restart` forwards to each script follows it at `process.argv[2]`.

Both copies of the helper are updated: the unit tests in
`cli_args/restart/tests.rs` and the integration tests in
`tests/restart.rs`.

The sibling shell helpers in the same files interpolate the path into a
double-quoted POSIX shell word, which does not eat backslashes, and
those tests are gated to Unix; they need no equivalent change.

Resolves https://github.com/pnpm/pnpm/issues/12720.

Checklist

  • I checked the referenced issue and verified that none of the PRs
    already linked to it solves it.
  • The change is implemented in both the TypeScript CLI and the Rust
    pnpm/ port, or the description notes what still needs porting.
  • Added or updated tests.

Written by an agent (Claude Code).

Generated by Claude Code

Summary by CodeRabbit

  • Tests
    • Improved restart argument-forwarding test coverage to handle log paths and forwarded script arguments more reliably.
    • Reduced test fragility by passing values through process arguments instead of embedding them in generated script code.

The `node -e` helper in the restart tests interpolated the log file's
path straight into a single-quoted JavaScript string literal. A Windows
temp path such as `C:\Users\...\log.txt` is then parsed as JS text, so
`\U` and `\n` become escape sequences and the script appends to a
mangled path instead of the log the test reads back.

Pass the path as a script argument and read it from `process.argv[1]`
instead, so it never reaches the JavaScript parser. The argument that
`pnpm restart` forwards to each script follows it at `process.argv[2]`.

Both copies of the helper are updated: the unit tests in
`cli_args/restart/tests.rs` and the integration tests in
`tests/restart.rs`.

The sibling shell helpers in the same files interpolate the path into a
double-quoted POSIX shell word, which does not eat backslashes, and
those tests are gated to Unix; they need no equivalent change.

Resolves #12720.
@coderabbitai

coderabbitai Bot commented Aug 3, 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: 4ee9365a-b9a0-47d0-9138-5a7f87c8f2bd

📥 Commits

Reviewing files that changed from the base of the PR and between ee3bb4b and 98bd3a9.

📒 Files selected for processing (2)
  • pnpm/crates/cli/src/cli_args/restart/tests.rs
  • pnpm/crates/cli/tests/restart.rs

📝 Walkthrough

Walkthrough

The restart argument-forwarding tests now pass the log path as a Node.js process argument. The helper reads the log path from process.argv[1] and the forwarded restart argument from process.argv[2], avoiding Windows path escaping in JavaScript source.

Changes

Restart test portability

Layer / File(s) Summary
Pass test values through Node.js arguments
pnpm/crates/cli/src/cli_args/restart/tests.rs, pnpm/crates/cli/tests/restart.rs
Both test helpers stop interpolating the log path into JavaScript. They pass it through process.argv[1] and read the forwarded restart argument from process.argv[2].

Estimated code review effort: 1 (Trivial) | ~5 minutes

Assessment against linked issues

Objective Addressed Explanation
Pass the restart test log path through process.argv so the Node.js helper is Windows-portable [#12720] ✅

Possibly related PRs

  • pnpm/pnpm#13300: Updates restart argument-forwarding tests for related RunArgs and restart behavior.

Suggested labels: product: pacquet

Suggested reviewers: zkochan

✨ 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 claude/windows-portable-restart-test-fapqbz

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.

@KSXGitHub KSXGitHub changed the title test(pacquet/cli): pass the restart log path through process.argv test(pacquet/cli): pass the restart log path through process.argv Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                                            main                                   pr
-----                                            ----                                   --
lockfile/parse_pnpm_lock                         1.00     16.6±1.31ms    22.5 MB/sec    1.06     17.6±2.02ms    21.2 MB/sec
packument/parse                                  1.05     47.9±5.95µs  1386.2 MB/sec    1.00     45.7±4.18µs  1450.5 MB/sec
tarball/download_dependency                      1.07      4.0±0.74ms  1087.1 KB/sec    1.00      3.7±1.19ms  1164.4 KB/sec
tarball_batch/cold_store_many_medium_tarballs    1.00   272.8±16.96ms 58.7 KElem/sec    1.06   287.8±14.91ms 55.6 KElem/sec
workspace_resolution/hoist_heavy                 1.00   391.7±36.03ms        ? ?/sec    1.03   403.1±22.71ms        ? ?/sec

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.01%. Comparing base (37b387f) to head (98bd3a9).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13621      +/-   ##
==========================================
+ Coverage   87.99%   88.01%   +0.01%     
==========================================
  Files         568      568              
  Lines       98002    98017      +15     
==========================================
+ Hits        86239    86271      +32     
+ Misses      11763    11746      -17     

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

@KSXGitHub
KSXGitHub marked this pull request as ready for review August 3, 2026 22:41
@KSXGitHub
KSXGitHub requested a review from zkochan as a code owner August 3, 2026 22:41
Copilot AI review requested due to automatic review settings August 3, 2026 22:41
@greptile-apps

greptile-apps Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The updated helpers use the correct Node eval-mode argument positions, and the Unix shell preserves the generated log path as one argument.

Reviews (1): Last reviewed commit: "test(cli): pass the restart log path thr..." | Re-trigger Greptile

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.

Pull request overview

Updates pacquet restart tests to avoid embedding filesystem paths directly into node -e JavaScript source (which can misparse Windows backslashes as escape sequences). Instead, the log file path is passed as a Node argument and read from process.argv, improving portability and preventing path corruption.

Changes:

  • Pass the restart test log file path via node -e … <logPath> and read it from process.argv[1].
  • Shift the forwarded pnpm restart argument to process.argv[2] in the Node helper.
  • Apply the same fix to both the unit-level and integration-level restart tests.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pnpm/crates/cli/src/cli_args/restart/tests.rs Updates the in-process RestartArgs::run unit test helper to pass the log path via process.argv rather than interpolating it into JS source.
pnpm/crates/cli/tests/restart.rs Updates the CLI integration test helper similarly, ensuring the forwarded restart arg is read from the correct process.argv index.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Aug 3, 2026
@KSXGitHub KSXGitHub changed the title test(pacquet/cli): pass the restart log path through process.argv test(cli): pass the restart log path through process.argv Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 98bd3a9fa877

Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm. Bencher consumes pacquet@HEAD and pnpr@HEAD.

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

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.563 ± 0.151 2.399 2.837 1.61 ± 0.21
pacquet@main 2.776 ± 0.202 2.494 3.064 1.74 ± 0.24
pnpr@HEAD 1.591 ± 0.182 1.407 1.887 1.00
pnpr@main 1.629 ± 0.168 1.417 1.908 1.02 ± 0.16
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.562503892,
      "stddev": 0.15059392535967833,
      "median": 2.5262361918000003,
      "user": 1.9552609199999995,
      "system": 1.60741464,
      "min": 2.3989426368,
      "max": 2.8366152288000004,
      "times": [
        2.6589849428,
        2.8366152288000004,
        2.3989426368,
        2.4400588428,
        2.4246688998000003,
        2.5127526908,
        2.7498480138000003,
        2.6290139358,
        2.4344340358000003,
        2.5397196928000003
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.7761249369,
      "stddev": 0.20214788057461233,
      "median": 2.8631188338,
      "user": 2.3478236200000002,
      "system": 1.8286075399999997,
      "min": 2.4941141298000002,
      "max": 3.0640419138,
      "times": [
        2.5097609758000003,
        2.8866166388,
        2.8625011698000002,
        2.5729722638,
        2.4941141298000002,
        2.9138654408,
        2.9483997758,
        3.0640419138,
        2.8637364978,
        2.6452405628
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5910466914,
      "stddev": 0.18160914583412002,
      "median": 1.5425197918,
      "user": 1.48734572,
      "system": 1.48030414,
      "min": 1.4072344008,
      "max": 1.8869613638,
      "times": [
        1.6249182748,
        1.4601213088,
        1.6299102288,
        1.4196317848,
        1.4388411518,
        1.4573021588,
        1.7488352698,
        1.8367109717999999,
        1.8869613638,
        1.4072344008
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.6289800011,
      "stddev": 0.16799669367091266,
      "median": 1.6304511478000001,
      "user": 1.5380003199999999,
      "system": 1.63107134,
      "min": 1.4170486388,
      "max": 1.9084065308,
      "times": [
        1.5302299398,
        1.4669568458,
        1.6314447698,
        1.4655831378,
        1.8797298598,
        1.6884017758,
        1.4170486388,
        1.6725409868,
        1.9084065308,
        1.6294575258000001
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 375.3 ± 35.1 320.8 422.5 1.00
pacquet@main 416.1 ± 20.7 384.8 449.0 1.11 ± 0.12
pnpr@HEAD 403.4 ± 41.2 355.1 486.5 1.07 ± 0.15
pnpr@main 446.7 ± 39.8 395.9 521.6 1.19 ± 0.15
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.37533691054000007,
      "stddev": 0.03507434887394915,
      "median": 0.38327071834000004,
      "user": 0.3143328799999999,
      "system": 0.72117738,
      "min": 0.32084959034000005,
      "max": 0.42245077634,
      "times": [
        0.33023550034000004,
        0.34157076334,
        0.38201983234000003,
        0.42245077634,
        0.38452160434000004,
        0.40776499034,
        0.40656303634,
        0.36240586234,
        0.32084959034000005,
        0.39498714934
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.41605271344000005,
      "stddev": 0.020704967200524175,
      "median": 0.41644973734,
      "user": 0.36144258,
      "system": 0.7592102799999999,
      "min": 0.38475218034,
      "max": 0.44897470234000003,
      "times": [
        0.44174141634,
        0.38475218034,
        0.40289364534000005,
        0.44897470234000003,
        0.42875078534000005,
        0.39659361734000004,
        0.42572865234,
        0.41854637134,
        0.41435310334000003,
        0.39819266034
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.40344281144000005,
      "stddev": 0.041223014639834216,
      "median": 0.40568365134,
      "user": 0.34244897999999996,
      "system": 0.7343674800000002,
      "min": 0.35505216234000003,
      "max": 0.48651124334,
      "times": [
        0.40295812634,
        0.42659822034,
        0.35849246334,
        0.40886327234000003,
        0.38208705134000004,
        0.40840917634,
        0.35505216234000003,
        0.36410220134000004,
        0.44135419734000003,
        0.48651124334
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.44674467083999997,
      "stddev": 0.03975643884042932,
      "median": 0.43121478184,
      "user": 0.38608667999999996,
      "system": 0.77648308,
      "min": 0.39589019334000003,
      "max": 0.52156384434,
      "times": [
        0.42530356134,
        0.42734046834,
        0.41531550634000003,
        0.52156384434,
        0.39589019334000003,
        0.41939408934,
        0.43508909534,
        0.45298472734,
        0.48922584734,
        0.48533937534000005
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.973 ± 0.144 2.785 3.249 1.84 ± 0.14
pacquet@main 2.766 ± 0.068 2.671 2.892 1.72 ± 0.11
pnpr@HEAD 1.612 ± 0.091 1.482 1.751 1.00
pnpr@main 1.736 ± 0.104 1.513 1.834 1.08 ± 0.09
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.9726611223200003,
      "stddev": 0.1443626536559499,
      "median": 2.95004381292,
      "user": 2.40643428,
      "system": 2.04385996,
      "min": 2.78475582192,
      "max": 3.24935088792,
      "times": [
        3.1411928819200003,
        2.93958816192,
        3.24935088792,
        3.04476996092,
        2.91459773592,
        2.99178508092,
        2.90938237092,
        2.96049946392,
        2.78475582192,
        2.79068885692
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.7660233210200005,
      "stddev": 0.06767963671266236,
      "median": 2.7759100619200003,
      "user": 1.8964045799999998,
      "system": 1.6039443599999998,
      "min": 2.67078261992,
      "max": 2.89190755192,
      "times": [
        2.68890263392,
        2.81161697292,
        2.79464087292,
        2.75872152792,
        2.79309859592,
        2.73176934592,
        2.81142669292,
        2.89190755192,
        2.7073663959200003,
        2.67078261992
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.61229171082,
      "stddev": 0.09084122014356674,
      "median": 1.61509763292,
      "user": 1.30044998,
      "system": 1.4224735600000002,
      "min": 1.48221317692,
      "max": 1.75095971992,
      "times": [
        1.60584166992,
        1.63503823092,
        1.75095971992,
        1.50935487592,
        1.57096105692,
        1.73379467892,
        1.67678090792,
        1.48221317692,
        1.62435359592,
        1.53361919492
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.7360450932200002,
      "stddev": 0.10375145089924107,
      "median": 1.77813536642,
      "user": 1.2820454799999998,
      "system": 1.4022160600000002,
      "min": 1.51301111292,
      "max": 1.83417268792,
      "times": [
        1.51301111292,
        1.67360878292,
        1.79762225492,
        1.83417268792,
        1.76398111292,
        1.8193037189199999,
        1.79228961992,
        1.61356078592,
        1.79478886792,
        1.75811198792
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 503.8 ± 26.5 464.9 543.6 1.38 ± 0.14
pacquet@main 440.5 ± 20.8 405.2 486.4 1.20 ± 0.12
pnpr@HEAD 366.4 ± 11.8 350.5 382.9 1.00 ± 0.09
pnpr@main 366.2 ± 30.5 323.7 409.9 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.5038192996400002,
      "stddev": 0.026488705002129687,
      "median": 0.5037523689400001,
      "user": 0.6802115400000002,
      "system": 0.84583832,
      "min": 0.46489125794,
      "max": 0.54358636194,
      "times": [
        0.46489125794,
        0.5001720899400001,
        0.54358636194,
        0.54147035594,
        0.51219203194,
        0.52136913894,
        0.50733264794,
        0.47993751194,
        0.48590179694,
        0.48133980294
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.44050884854000005,
      "stddev": 0.020829355123072067,
      "median": 0.43953235794,
      "user": 0.58496704,
      "system": 0.76739962,
      "min": 0.40519794994,
      "max": 0.48636723394000003,
      "times": [
        0.43339833294,
        0.40519794994,
        0.42733861794,
        0.44434452194,
        0.44014660494,
        0.48636723394000003,
        0.45531407794,
        0.44295352294,
        0.43110951194,
        0.43891811094
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.36643293624,
      "stddev": 0.011756440931501232,
      "median": 0.36823821644,
      "user": 0.24295603999999993,
      "system": 0.6370391200000001,
      "min": 0.35054303194,
      "max": 0.38289170994,
      "times": [
        0.37363052394,
        0.38289170994,
        0.38210158094,
        0.37096451194,
        0.37112539394,
        0.35345851394,
        0.36126159394,
        0.35284058094,
        0.35054303194,
        0.36551192094
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.36616252514,
      "stddev": 0.030450985512930295,
      "median": 0.36710658494000004,
      "user": 0.26308654000000004,
      "system": 0.62085802,
      "min": 0.32368991594,
      "max": 0.40992685794,
      "times": [
        0.36787403094,
        0.32368991594,
        0.40992685794,
        0.39544596894,
        0.36982179994000003,
        0.32860901494,
        0.36633913894000003,
        0.40531252594,
        0.34030655894,
        0.35429943894
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.888 ± 0.082 1.795 2.059 5.77 ± 0.38
pacquet@main 1.808 ± 0.048 1.758 1.916 5.53 ± 0.31
pnpr@HEAD 0.336 ± 0.015 0.314 0.366 1.03 ± 0.07
pnpr@main 0.327 ± 0.016 0.310 0.356 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.88778849382,
      "stddev": 0.08175546989122622,
      "median": 1.89477683152,
      "user": 0.99513344,
      "system": 0.9226993200000001,
      "min": 1.79540012852,
      "max": 2.0593365345200003,
      "times": [
        1.90107152952,
        1.90643585452,
        1.91526139852,
        1.88848213352,
        1.79540012852,
        1.8032593135200001,
        1.81512376252,
        1.96127709152,
        2.0593365345200003,
        1.83223719152
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.80782053012,
      "stddev": 0.04758705019942494,
      "median": 1.79206113802,
      "user": 0.89080844,
      "system": 0.83189602,
      "min": 1.7584390485199999,
      "max": 1.91597031452,
      "times": [
        1.91597031452,
        1.8572278975199998,
        1.79092166252,
        1.82626892752,
        1.78291704152,
        1.7584390485199999,
        1.78016084852,
        1.76817915652,
        1.79320061352,
        1.8049197905199998
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.33623745312000003,
      "stddev": 0.01469950284055364,
      "median": 0.33661072802,
      "user": 0.22724434,
      "system": 0.5666912199999999,
      "min": 0.31376815252,
      "max": 0.36564858552,
      "times": [
        0.33805690852000003,
        0.33782654352,
        0.32018472952000004,
        0.31376815252,
        0.33182628052,
        0.34233826252000005,
        0.33539491252000003,
        0.36564858552,
        0.34966720952,
        0.32766294652
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.32692100382,
      "stddev": 0.01640664921607473,
      "median": 0.31846778052,
      "user": 0.21602373999999996,
      "system": 0.5759559199999998,
      "min": 0.31016630752,
      "max": 0.35649027252000004,
      "times": [
        0.34891166652000005,
        0.35649027252000004,
        0.31950919652000004,
        0.33617269952,
        0.33665800152,
        0.31742636452,
        0.31612435052000004,
        0.31016630752,
        0.31300007552000003,
        0.31475110352
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 179.9 ± 3.1 175.2 184.6 1.93 ± 0.16
pacquet@main 180.3 ± 4.2 172.5 189.0 1.93 ± 0.16
pnpr@HEAD 93.3 ± 7.4 84.8 117.9 1.00
pnpr@main 107.8 ± 6.5 95.6 117.3 1.16 ± 0.12
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.17993279757249997,
      "stddev": 0.003127699313130196,
      "median": 0.18024769176000002,
      "user": 0.16611596,
      "system": 0.07045348750000001,
      "min": 0.17515868476000002,
      "max": 0.18458445176000002,
      "times": [
        0.17844455476,
        0.17671141976000002,
        0.17826083776,
        0.17621236976000001,
        0.17569813076000002,
        0.18458445176000002,
        0.18043561576000003,
        0.18308491576000002,
        0.17763416776000002,
        0.18114789676,
        0.18005976776000002,
        0.18363727676000002,
        0.17515868476000002,
        0.18301332176000001,
        0.18128289076,
        0.18355845876000002
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.180299832385,
      "stddev": 0.00423660582090804,
      "median": 0.18043245876000003,
      "user": 0.15919196000000002,
      "system": 0.0751713625,
      "min": 0.17254584276,
      "max": 0.18895975276000002,
      "times": [
        0.18335383276000003,
        0.18895975276000002,
        0.17553631576,
        0.17254584276,
        0.18511670276000003,
        0.17722651976,
        0.17800488576,
        0.17670885476,
        0.17670201176000003,
        0.17797856676,
        0.18168150176000003,
        0.18383149276000002,
        0.18023536776000001,
        0.18062954976,
        0.18421345176,
        0.18207266876000003
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.09326850922874999,
      "stddev": 0.007448409687793149,
      "median": 0.09259526426,
      "user": 0.02395555375,
      "system": 0.011612281250000002,
      "min": 0.08482635376,
      "max": 0.11793054676,
      "times": [
        0.08785238376,
        0.08482635376,
        0.08583491375999999,
        0.08707549076,
        0.08729837176,
        0.08642411376,
        0.09088665075999999,
        0.08672518075999999,
        0.08601170776,
        0.08713116576,
        0.08632330476,
        0.08684739176,
        0.08662456176,
        0.08868900076,
        0.10825285576,
        0.11793054676,
        0.10264264676,
        0.10092332776,
        0.10130184176,
        0.09264974176,
        0.09546866276,
        0.09254078676,
        0.09683491676,
        0.09529290175999999,
        0.08966375676,
        0.09438186476,
        0.09410852076,
        0.09642001375999999,
        0.09566089476,
        0.09579746076,
        0.09819040876,
        0.09798055476
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.10782533389793109,
      "stddev": 0.006531754417872788,
      "median": 0.10938244376,
      "user": 0.031255753103448275,
      "system": 0.0161254724137931,
      "min": 0.09556690776,
      "max": 0.11733980376,
      "times": [
        0.09660381076,
        0.10322993376,
        0.09556690776,
        0.09795985475999999,
        0.10557297676,
        0.09636260676,
        0.09912508975999999,
        0.10716550676,
        0.10493574676,
        0.10938244376,
        0.10748008076,
        0.10710248776,
        0.10824452076,
        0.11101652076,
        0.10153777576,
        0.11152754376,
        0.11415380176,
        0.11629558676,
        0.11698615776,
        0.11259749876,
        0.11105401276,
        0.11624658376,
        0.11733980376,
        0.11180689076,
        0.11378591876,
        0.11003010276,
        0.11058090176,
        0.11187773376,
        0.10136588276
      ]
    }
  ]
}

Scenario: Isolated linker: peer-heavy resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 723.6 ± 162.4 480.7 959.3 1.00
pacquet@main 1023.2 ± 142.7 795.8 1158.9 1.41 ± 0.37
pnpm@HEAD 2983.7 ± 94.1 2846.4 3156.0 4.12 ± 0.93
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.7236367941422223,
      "stddev": 0.16243294286272808,
      "median": 0.73050329292,
      "user": 0.6662816488888889,
      "system": 0.14191036888888886,
      "min": 0.48069622892,
      "max": 0.95926775492,
      "times": [
        0.84497494792,
        0.95926775492,
        0.7598981979200001,
        0.59287178892,
        0.73050329292,
        0.61673810892,
        0.91990501292,
        0.48069622892,
        0.6078758139200001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.0231519555866668,
      "stddev": 0.14274386363076833,
      "median": 1.09019331492,
      "user": 0.9472992044444442,
      "system": 0.2331825911111111,
      "min": 0.7957826069200001,
      "max": 1.15885910892,
      "times": [
        1.15630003892,
        1.1220845429200001,
        1.15637552192,
        0.9529228919200001,
        0.9164660339200001,
        0.85938353992,
        1.15885910892,
        0.7957826069200001,
        1.09019331492
      ]
    },
    {
      "command": "pnpm@HEAD",
      "mean": 2.983654156586667,
      "stddev": 0.09410871480079641,
      "median": 2.97638870692,
      "user": 4.581814426666667,
      "system": 0.2601391466666667,
      "min": 2.84638740692,
      "max": 3.15597297992,
      "times": [
        3.06185672292,
        2.87523315592,
        2.84638740692,
        2.9591855589200002,
        2.97638870692,
        2.9554493399200004,
        3.0384060869200002,
        3.15597297992,
        2.98400745092
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.622 ± 0.148 4.419 4.905 1.21 ± 0.07
pacquet@main 4.939 ± 0.174 4.700 5.263 1.30 ± 0.07
pnpr@HEAD 3.973 ± 0.291 3.567 4.579 1.04 ± 0.09
pnpr@main 3.809 ± 0.171 3.609 4.070 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.621882632959999,
      "stddev": 0.14805341936874955,
      "median": 4.61483642046,
      "user": 2.11220566,
      "system": 1.6487950199999997,
      "min": 4.41903660246,
      "max": 4.90534899046,
      "times": [
        4.46568903646,
        4.63573274546,
        4.50316536546,
        4.41903660246,
        4.90534899046,
        4.59394009546,
        4.68190356346,
        4.68670874446,
        4.77550260446,
        4.55179858146
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.93911769246,
      "stddev": 0.17415179339493966,
      "median": 4.94735692346,
      "user": 2.99455476,
      "system": 2.2096140199999996,
      "min": 4.69959838646,
      "max": 5.26333034746,
      "times": [
        5.00171441346,
        5.26333034746,
        4.75852588346,
        5.08541843646,
        4.89385301446,
        4.69959838646,
        5.06146085446,
        5.00086083246,
        4.81476489646,
        4.81164985946
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.9732941658599996,
      "stddev": 0.2906040752344871,
      "median": 3.90593683596,
      "user": 2.05487456,
      "system": 2.23143382,
      "min": 3.56651657346,
      "max": 4.57851034846,
      "times": [
        4.04488412546,
        3.56651657346,
        3.87781037846,
        3.80898608046,
        4.30039606346,
        4.57851034846,
        3.74097945946,
        3.93406329346,
        3.8345834394600002,
        4.04621189646
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.808945151059999,
      "stddev": 0.17118053220389212,
      "median": 3.74889155096,
      "user": 1.86599866,
      "system": 1.9478834200000001,
      "min": 3.60907874146,
      "max": 4.06957634946,
      "times": [
        3.81035124046,
        3.67534724446,
        4.06419606246,
        3.75969626846,
        3.6398655674600002,
        3.7380868334599997,
        4.06957634946,
        3.60907874146,
        3.73660373746,
        3.98664946546
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13621
Testbedpacquet

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
isolated-linker.fresh-restore.hot-cache.hot-storeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
320.85 ms
(+29.33%)Baseline: 248.09 ms
297.70 ms
(107.78%)

Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,784.76 ms
(+7.85%)Baseline: 2,582.00 ms
3,098.40 ms
(89.88%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,795.40 ms
(+3.59%)Baseline: 1,733.18 ms
2,079.82 ms
(86.32%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
464.89 ms
(+19.21%)Baseline: 389.97 ms
467.97 ms
(99.34%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
175.16 ms
(-1.72%)Baseline: 178.23 ms
213.87 ms
(81.90%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,398.94 ms
(+1.66%)Baseline: 2,359.73 ms
2,831.67 ms
(84.72%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,419.04 ms
(-0.25%)Baseline: 4,430.05 ms
5,316.06 ms
(83.13%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
🚨 view alert (🔔)
320.85 ms
(+29.33%)Baseline: 248.09 ms
297.70 ms
(107.78%)

isolated-linker.peer-heavy-resolve.hot-cache.offline📈 view plot
🚷 view threshold
480.70 ms
(-38.75%)Baseline: 784.77 ms
941.72 ms
(51.04%)
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit 46d7d3e into main Aug 3, 2026
35 of 36 checks passed
@zkochan
zkochan deleted the claude/windows-portable-restart-test-fapqbz branch August 3, 2026 23:42
KSXGitHub pushed a commit that referenced this pull request Aug 4, 2026
Brings in the restart-test fix from #13621, which touches only the
`restart` tests and does not overlap this branch's publish and config
changes. Merged cleanly with no conflicts.
KSXGitHub pushed a commit that referenced this pull request Aug 4, 2026
Picks up #13609, which normalizes a BOM or CRLF line endings
before splitting the combined `pnpm-lock.yaml` into its env and main
documents, and #13621, which passes the restart tests' log
path through `process.argv` instead of interpolating it into a JS
string literal.

Neither touches the files this branch edits, so the merge is clean.
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 state: automerge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

restart test: pass the log path via process.argv so the Node helper is Windows-portable

5 participants