Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds Rust CLI support for parsing ChangesRecursive parallel run
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant CLI
participant RunContext
participant RecursiveRunner
participant ProjectRunner
CLI->>RunContext: Propagate --parallel
RunContext->>RecursiveRunner: Configure recursive parallel run
RecursiveRunner->>ProjectRunner: Start selected projects concurrently
ProjectRunner-->>RecursiveRunner: Return execution status
RecursiveRunner-->>CLI: Aggregate results and apply bail behavior
Assessment against linked issues
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ 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 |
PR Summary by QodoFix Rust CLI recursive
AI Description
Diagram
High-Level Assessment
Files changed (13)
|
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously reported thread-creation panic path now returns a contextual diagnostic through fallible scoped spawning. Reviews (3): Last reviewed commit: "test(cli): verify parallel promotes recu..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pnpm/crates/cli/src/cli_args/tests.rs`:
- Around line 175-194: Update
parallel_before_run_is_a_recursive_unsorted_run_option to remove -r and the
unnecessary --filter argument, then assert parsed.recursive is false immediately
after parsing. Keep applying parsed.apply_parallel_run_options() and assert
recursive becomes true afterward, alongside the existing no_sort and command
assertions, so the test verifies --parallel performs the promotion.
🪄 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: 4678aae8-27be-41f8-9e13-8dc54230f81e
📒 Files selected for processing (13)
.changeset/rust-parallel-recursive-run.mdpnpm/crates/cli/src/cli_args/clean.rspnpm/crates/cli/src/cli_args/cli_command.rspnpm/crates/cli/src/cli_args/dispatch.rspnpm/crates/cli/src/cli_args/dispatch_install.rspnpm/crates/cli/src/cli_args/dispatch_script.rspnpm/crates/cli/src/cli_args/restart.rspnpm/crates/cli/src/cli_args/run.rspnpm/crates/cli/src/cli_args/run/recursive.rspnpm/crates/cli/src/cli_args/script_shortcut.rspnpm/crates/cli/src/cli_args/tests.rspnpm/crates/cli/src/lib.rspnpm/crates/cli/tests/run_recursive.rs
Micro-Benchmark ResultsLinux |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13448 +/- ##
========================================
Coverage 87.64% 87.65%
========================================
Files 545 545
Lines 93978 94102 +124
========================================
+ Hits 82367 82481 +114
- Misses 11611 11621 +10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
24 rules 1. Unbounded thread fanout
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Code review by qodo was updated up to the latest commit ca7af5f |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Code review by qodo was updated up to the latest commit f1cf9eb |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Integrated-Benchmark Report (Linux)Commit: Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time). Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.5720367927399996,
"stddev": 0.14811090755765663,
"median": 2.52483046814,
"user": 1.8058751200000003,
"system": 1.4839115,
"min": 2.40357942764,
"max": 2.81357540264,
"times": [
2.5216642656399997,
2.40357942764,
2.5341689446399998,
2.52799667064,
2.4536282956399997,
2.46002278764,
2.81357540264,
2.69802059464,
2.81033830664,
2.4973732316399997
]
},
{
"command": "pacquet@main",
"mean": 2.6879212549399996,
"stddev": 0.1598648436718133,
"median": 2.7443724186400003,
"user": 1.9484623200000002,
"system": 1.5808329,
"min": 2.4023300016399998,
"max": 2.90702555164,
"times": [
2.73180146864,
2.57056711264,
2.80793041664,
2.4023300016399998,
2.7650549026399998,
2.75694336864,
2.57735936064,
2.52634344664,
2.90702555164,
2.83385691964
]
},
{
"command": "pnpr@HEAD",
"mean": 1.6076034635399998,
"stddev": 0.11517370084745965,
"median": 1.60658984114,
"user": 1.33002152,
"system": 1.4182212,
"min": 1.43826168864,
"max": 1.7748592046399998,
"times": [
1.43826168864,
1.74726203164,
1.6195175436399998,
1.52144217264,
1.71772681764,
1.6072510216399998,
1.7748592046399998,
1.58837863864,
1.45540685564,
1.60592866064
]
},
{
"command": "pnpr@main",
"mean": 1.57162012564,
"stddev": 0.12473460512957513,
"median": 1.53280350464,
"user": 1.3744131200000003,
"system": 1.4720700000000002,
"min": 1.43134212164,
"max": 1.8181638116399998,
"times": [
1.65169241564,
1.44310007364,
1.52337042464,
1.52230401064,
1.43134212164,
1.8181638116399998,
1.45466664064,
1.6613166586399999,
1.6680085146399999,
1.54223658464
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.3147566379400001,
"stddev": 0.02386441537309899,
"median": 0.31112368424000003,
"user": 0.26575188,
"system": 0.5824079799999999,
"min": 0.26789594424,
"max": 0.35678712724,
"times": [
0.31014856724,
0.32458528824,
0.35678712724,
0.34162336224,
0.29904506624,
0.31162552124000004,
0.26789594424,
0.30811475924000004,
0.31711889624,
0.31062184724
]
},
{
"command": "pacquet@main",
"mean": 0.30092852604,
"stddev": 0.021634298847873136,
"median": 0.30068016774000006,
"user": 0.25680778,
"system": 0.5818435799999999,
"min": 0.26314972124,
"max": 0.33316987824,
"times": [
0.30371950524,
0.32700385924,
0.30538629524,
0.31943964424000004,
0.29764083024000004,
0.29266126924,
0.33316987824,
0.28607803724,
0.28103622024,
0.26314972124
]
},
{
"command": "pnpr@HEAD",
"mean": 0.31987895254,
"stddev": 0.022943008625163394,
"median": 0.32335794724,
"user": 0.26541158,
"system": 0.5861158799999999,
"min": 0.28186692924,
"max": 0.34660495724,
"times": [
0.32042327124000003,
0.31986957224,
0.28186692924,
0.29626450524000003,
0.34373913524,
0.34660495724,
0.34184798324000004,
0.32629262324,
0.29135174024,
0.33052880824
]
},
{
"command": "pnpr@main",
"mean": 0.31604714434,
"stddev": 0.01929018436973897,
"median": 0.31436595774000003,
"user": 0.27390857999999996,
"system": 0.55615068,
"min": 0.27574096524,
"max": 0.34546862324,
"times": [
0.33803787924,
0.31443626024000004,
0.30931586424,
0.34546862324,
0.30772856324000003,
0.31675446324,
0.33013436724,
0.30855880224000004,
0.31429565524,
0.27574096524
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 3.06569320916,
"stddev": 0.11668577704650401,
"median": 3.01914942916,
"user": 2.4022228399999994,
"system": 1.7209474399999998,
"min": 2.94769120766,
"max": 3.3577096606600003,
"times": [
2.99950686866,
2.94769120766,
3.01592011966,
3.0004363846600004,
3.02237873866,
3.00973295166,
3.3577096606600003,
3.08462180966,
3.0705614966600003,
3.14837285366
]
},
{
"command": "pacquet@main",
"mean": 3.13591132216,
"stddev": 0.07052338719483939,
"median": 3.12185470116,
"user": 2.5604673399999998,
"system": 1.84093384,
"min": 3.02745262566,
"max": 3.2413091296600003,
"times": [
3.18857266466,
3.1191143196600004,
3.2347449366600003,
3.1245950826600004,
3.08179967066,
3.02745262566,
3.16826673066,
3.2413091296600003,
3.07934830666,
3.0939097546600003
]
},
{
"command": "pnpr@HEAD",
"mean": 1.57326101466,
"stddev": 0.16872039326870605,
"median": 1.50983974566,
"user": 1.21103984,
"system": 1.24706984,
"min": 1.45203003666,
"max": 1.92258280966,
"times": [
1.51594985066,
1.45236986466,
1.51018426266,
1.92258280966,
1.85458624866,
1.51922434166,
1.50726973966,
1.48891776366,
1.45203003666,
1.50949522866
]
},
{
"command": "pnpr@main",
"mean": 1.68222674736,
"stddev": 0.15790318628347635,
"median": 1.66246452366,
"user": 1.26053784,
"system": 1.4132072399999998,
"min": 1.49113036966,
"max": 1.90048316566,
"times": [
1.90048316566,
1.76119432366,
1.58672789666,
1.85628911666,
1.87314421166,
1.6448507536599999,
1.68007829366,
1.52571943966,
1.50264990266,
1.49113036966
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.66428376808,
"stddev": 0.030319199495792256,
"median": 0.66663987028,
"user": 0.8022200599999998,
"system": 0.71159334,
"min": 0.6082291457800001,
"max": 0.7113027647800001,
"times": [
0.6839134257800001,
0.6796183497800001,
0.6082291457800001,
0.6914412927800001,
0.6569019767800001,
0.6632789227800001,
0.62899396378,
0.64915702078,
0.6700008177800001,
0.7113027647800001
]
},
{
"command": "pacquet@main",
"mean": 0.7877902591800001,
"stddev": 0.1062281035199773,
"median": 0.78942093978,
"user": 0.98102736,
"system": 0.7965500399999998,
"min": 0.64274185378,
"max": 0.9482874747800001,
"times": [
0.64274185378,
0.6791307127800001,
0.6570834777800001,
0.7918666977800001,
0.7869751817800001,
0.8807600447800001,
0.8264603367800001,
0.9089539537800001,
0.7556428577800001,
0.9482874747800001
]
},
{
"command": "pnpr@HEAD",
"mean": 0.36601362258000003,
"stddev": 0.03940899624382405,
"median": 0.36235114478,
"user": 0.25129086,
"system": 0.61911674,
"min": 0.32080785278,
"max": 0.46675600178000004,
"times": [
0.36823246978,
0.37903007878,
0.33980357778000003,
0.36744489078000003,
0.32080785278,
0.46675600178000004,
0.36612152578,
0.35438643678000004,
0.35858076378000003,
0.33897262778000004
]
},
{
"command": "pnpr@main",
"mean": 0.39277219348000003,
"stddev": 0.035105144782844704,
"median": 0.38648928728,
"user": 0.28762385999999995,
"system": 0.64015954,
"min": 0.36085184778,
"max": 0.45757545078,
"times": [
0.45757545078,
0.39300229878000004,
0.39324132678,
0.36589398678,
0.36445635878000004,
0.38103132678,
0.45243971578000003,
0.36728237478000003,
0.39194724778,
0.36085184778
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.265585415,
"stddev": 0.11245908835367852,
"median": 2.2644034184,
"user": 1.5112307,
"system": 0.9760106999999998,
"min": 2.1322249024,
"max": 2.4424903954,
"times": [
2.1322249024,
2.1435533174,
2.1350869074000003,
2.1958088754,
2.3622486174,
2.2626935674,
2.3296501454,
2.4424903954,
2.3859841524000003,
2.2661132694000004
]
},
{
"command": "pacquet@main",
"mean": 2.1745947249000004,
"stddev": 0.09487928611059016,
"median": 2.1437261549000004,
"user": 1.4037209000000002,
"system": 0.9176002999999998,
"min": 2.0801580354,
"max": 2.4031890954,
"times": [
2.1722009474,
2.4031890954,
2.1209273434,
2.2701386994,
2.1668997514,
2.1462824604,
2.1079517234000003,
2.0801580354,
2.1411698494,
2.1370293434
]
},
{
"command": "pnpr@HEAD",
"mean": 0.35108442100000004,
"stddev": 0.014705149950065987,
"median": 0.3528405874,
"user": 0.24372599999999994,
"system": 0.6026583999999999,
"min": 0.3276642184,
"max": 0.3787897864,
"times": [
0.3276642184,
0.35672613940000003,
0.3534755344,
0.3634506584,
0.3787897864,
0.3558987254,
0.3412508164,
0.3478482664,
0.33353442440000003,
0.3522056404
]
},
{
"command": "pnpr@main",
"mean": 0.3562944809,
"stddev": 0.02412602005160089,
"median": 0.3516672939,
"user": 0.2554241,
"system": 0.5800327,
"min": 0.3267806604,
"max": 0.3872017554,
"times": [
0.38263707140000003,
0.3745011824,
0.3267806604,
0.3596940234,
0.3351662194,
0.33987492140000003,
0.3293491334,
0.3436405644,
0.3840992774,
0.3872017554
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.38721431008,
"stddev": 0.01758912125239543,
"median": 0.39045694788,
"user": 0.38763559999999997,
"system": 0.055630900000000004,
"min": 0.36221448138,
"max": 0.41198770938,
"times": [
0.41198770938,
0.40610134438000006,
0.36555178938000005,
0.39397470938,
0.40132287938000005,
0.36875002638000004,
0.39582227938000003,
0.37947869538000006,
0.38693918638,
0.36221448138
]
},
{
"command": "pacquet@main",
"mean": 0.5151916308800001,
"stddev": 0.07965983506047125,
"median": 0.51964739988,
"user": 0.4880362999999999,
"system": 0.0978942,
"min": 0.41387868938000005,
"max": 0.63846530538,
"times": [
0.49186833938,
0.44384017838000006,
0.45052261938000004,
0.41387868938000005,
0.42811294138000006,
0.63846530538,
0.54742646038,
0.57928032338,
0.55811166638,
0.60040978538
]
},
{
"command": "pnpr@HEAD",
"mean": 0.09100532723185184,
"stddev": 0.006073901311929836,
"median": 0.08923363938000001,
"user": 0.02286698148148148,
"system": 0.01106696296296296,
"min": 0.08520209738000001,
"max": 0.10670547238,
"times": [
0.10361834438,
0.10520274038,
0.10670547238,
0.10116289338000001,
0.09192273938000001,
0.09117876238,
0.08923363938000001,
0.08520209738000001,
0.09171258538,
0.09308158638000001,
0.08945017638000001,
0.09100779138000001,
0.09059462538,
0.09152336938000001,
0.08647165238,
0.08620466138,
0.08760597238000001,
0.08553944238000001,
0.08887007738000001,
0.08802945838000001,
0.08529242838000001,
0.08803284438,
0.08909131238000001,
0.09024667138,
0.08589205338,
0.08585871138000001,
0.08841172638
]
},
{
"command": "pnpr@main",
"mean": 0.08743687280424244,
"stddev": 0.0016135850523698592,
"median": 0.08711476938,
"user": 0.021464045454545454,
"system": 0.009946642424242425,
"min": 0.08511189838000001,
"max": 0.09168474338,
"times": [
0.08511189838000001,
0.08712512938,
0.08740366338000001,
0.08696901738,
0.08640666038,
0.08655253438,
0.08725021438000001,
0.08747434538,
0.08695152438,
0.08549738338,
0.08718241738,
0.08765679838,
0.08778895638,
0.08630378638000001,
0.08711476938,
0.08795512938000001,
0.09141207038,
0.08678969938,
0.08552957338,
0.08699997438,
0.09168474338,
0.08657501638000001,
0.08652868038,
0.08683854138000001,
0.08699743038,
0.09011156938,
0.09028599638000001,
0.08542554738000001,
0.08896796038,
0.08989093438000001,
0.08715043638,
0.08607864338,
0.08740575738
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.582944854020001,
"stddev": 0.10275859582872185,
"median": 4.53682397572,
"user": 2.0076315,
"system": 1.4793128599999998,
"min": 4.4590228527199995,
"max": 4.76012444972,
"times": [
4.51059091072,
4.4590228527199995,
4.65958009072,
4.69809874972,
4.5184415837200005,
4.66144156572,
4.76012444972,
4.52233633872,
4.48850038572,
4.55131161272
]
},
{
"command": "pacquet@main",
"mean": 4.61713645692,
"stddev": 0.11593662715757883,
"median": 4.6176626897199995,
"user": 2.2748405,
"system": 1.7318401599999997,
"min": 4.45086519672,
"max": 4.87453452872,
"times": [
4.53182354572,
4.45086519672,
4.51797501672,
4.64919523672,
4.57652887072,
4.65616463572,
4.87453452872,
4.58652705672,
4.6789521587200005,
4.64879832272
]
},
{
"command": "pnpr@HEAD",
"mean": 3.63669134962,
"stddev": 0.11429678808724894,
"median": 3.62974503022,
"user": 1.4405740999999999,
"system": 1.42433466,
"min": 3.47661830272,
"max": 3.88696401872,
"times": [
3.59046913672,
3.64139535472,
3.61809470572,
3.68970656272,
3.71060549072,
3.88696401872,
3.66014951472,
3.5756119757200002,
3.5172984337199997,
3.47661830272
]
},
{
"command": "pnpr@main",
"mean": 3.5911214402200002,
"stddev": 0.09968104257093093,
"median": 3.55965136672,
"user": 1.3115384999999997,
"system": 1.3336762599999996,
"min": 3.47956219272,
"max": 3.77151038572,
"times": [
3.77151038572,
3.48137254272,
3.56021008572,
3.66194267872,
3.7064002827199998,
3.55909264772,
3.50357560172,
3.54670078472,
3.47956219272,
3.64084719972
]
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/13448 |
| 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 | 1,452.03 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 327.66 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 320.81 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 85.20 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,438.26 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,476.62 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 281.87 ms |
Summary
Closes #13443.
The Rust CLI now recognizes
--parallelbefore recursiveruncommands instead of passing it through as the script name. It applies pnpm's recursive and no-sort shorthand settings, then starts every selected project's script concurrently.The TypeScript CLI already has this behavior, so no TypeScript implementation change is needed.
Parser tests cover both sides of the forwarding boundary:
--parallelbeforerunis a pnpm option, while the same token after the script name is forwarded unchanged. The recursive-run regression test synchronizes two projects so it fails under sequential execution.Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting.pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
Written by an agent (Codex, GPT-5).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
--parallelflag for run-like script commands to start scripts concurrently across selected projects (recursive, unsorted).--parallelbeing misread as a script name when placed beforerunin recursive commands.--parallelplaced after the script name is treated as a script argument.clean/purgeand restart flows non-parallel, and propagated parallel behavior through recursive execution.--parallelplacement/handling.