Repository navigation
fix(cli): align dedupe check reporting - #13462
Conversation
PR Summary by QodoFix Rust CLI dedupe --check progress and error reporting parity
AI Description
Diagram
High-Level Assessment
Files changed (12)
|
|
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 (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthrough
ChangesDedupe reporter parity
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant CLI
participant DedupeArgs
participant Reporter
participant Process
CLI->>DedupeArgs: run dedupe --check
DedupeArgs->>Reporter: emit resolved progress
DedupeArgs->>Reporter: emit structured dedupe-check error
Reporter-->>CLI: render output for selected reporter
CLI->>Process: return failure exit code
Possibly related 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 |
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (2): Last reviewed commit: "chore: address dedupe reporter review" | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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/dedupe/tests.rs`:
- Around line 20-31: Update the test check_error_matches_pnpm_reporter_format to
print the rendered report immediately before the multiline assert_eq! assertion,
so CI output includes the actual value when the reporter-format comparison
fails.
In `@pnpm/crates/default-reporter/src/lib.rs`:
- Around line 85-88: Update the documentation for set_hide_added_pkgs_progress
to state that it must be called before the reporter is first initialized because
the underlying OnceLock accepts only the first value and ignores subsequent
updates; preserve the existing function behavior.
In `@pnpm/crates/reporter/src/lib.rs`:
- Line 808: Update the rustdoc for the pnpm dedupe check failure payload to
document its non-obvious terminal-versus-wire representation invariant, or
remove the comment if that contract cannot be stated accurately; do not leave
documentation that merely repeats the type name.
🪄 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: 631b02c3-ea2d-41fd-9b5f-32fe36e23692
📒 Files selected for processing (12)
.changeset/friendly-dedupes-report.mdpnpm/crates/cli/src/bin/main.rspnpm/crates/cli/src/cli_args/dedupe.rspnpm/crates/cli/src/cli_args/dedupe/tests.rspnpm/crates/cli/src/cli_args/dispatch.rspnpm/crates/cli/src/cli_args/reporter.rspnpm/crates/cli/src/lib.rspnpm/crates/cli/tests/dedupe.rspnpm/crates/default-reporter/src/lib.rspnpm/crates/default-reporter/src/state.rspnpm/crates/reporter/src/lib.rspnpm/crates/reporter/src/tests.rs
Micro-Benchmark ResultsLinux |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13462 +/- ##
==========================================
+ Coverage 87.66% 87.68% +0.02%
==========================================
Files 546 546
Lines 94260 94379 +119
==========================================
+ Hits 82630 82759 +129
+ Misses 11630 11620 -10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
1 similar comment
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.58881150976,
"stddev": 0.16536290259192313,
"median": 2.6402863094600004,
"user": 1.8899191600000003,
"system": 1.4968759,
"min": 2.38639631346,
"max": 2.78932192146,
"times": [
2.6580681964600004,
2.40890067046,
2.3975604514600004,
2.76192516046,
2.38639631346,
2.4263543744600002,
2.71463405846,
2.7224495284600003,
2.78932192146,
2.62250442246
]
},
{
"command": "pacquet@main",
"mean": 2.6631779458600002,
"stddev": 0.19893347545472445,
"median": 2.74892420946,
"user": 1.99793546,
"system": 1.4625761000000002,
"min": 2.3802501194600003,
"max": 2.87847625746,
"times": [
2.84986459446,
2.74643470046,
2.3802501194600003,
2.87847625746,
2.4762767824600003,
2.42506343846,
2.8354637414600004,
2.7514137184600003,
2.81481417646,
2.4737219294600004
]
},
{
"command": "pnpr@HEAD",
"mean": 1.5360756693600002,
"stddev": 0.09163904767179029,
"median": 1.5285133059599998,
"user": 1.3942420599999994,
"system": 1.4750324,
"min": 1.42592576646,
"max": 1.7092896284599999,
"times": [
1.61886841546,
1.7092896284599999,
1.59566644246,
1.44251432346,
1.50544880246,
1.42592576646,
1.4353940004599999,
1.5765138674599999,
1.55157780946,
1.49955763746
]
},
{
"command": "pnpr@main",
"mean": 1.66415965586,
"stddev": 0.1276469670343267,
"median": 1.70592320796,
"user": 1.4259308599999998,
"system": 1.4835335,
"min": 1.4681583944599998,
"max": 1.86891515146,
"times": [
1.70179478146,
1.71779997846,
1.72073178046,
1.78757403246,
1.53157601546,
1.7100516344599999,
1.51648002046,
1.61851476946,
1.4681583944599998,
1.86891515146
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.31172678154000005,
"stddev": 0.010865333191824984,
"median": 0.31471454304,
"user": 0.25900534,
"system": 0.62568172,
"min": 0.29363825504,
"max": 0.32688233104000003,
"times": [
0.31757119404,
0.32087319304,
0.29363825504,
0.31716841504000004,
0.32688233104000003,
0.31390228304,
0.31552680304,
0.31368951304000003,
0.29659711804000005,
0.30141871004000004
]
},
{
"command": "pacquet@main",
"mean": 0.30739634464000004,
"stddev": 0.011795485218774585,
"median": 0.30996366404000003,
"user": 0.26348344,
"system": 0.6166925199999999,
"min": 0.28922040404000005,
"max": 0.32806982804,
"times": [
0.30116329704,
0.29075311104,
0.30992099404,
0.32806982804,
0.31451437604000004,
0.31654097304,
0.28922040404000005,
0.31000633404000005,
0.30297553204000005,
0.31079859704
]
},
{
"command": "pnpr@HEAD",
"mean": 0.31096269404,
"stddev": 0.013787014244142285,
"median": 0.31279481204000004,
"user": 0.2515212399999999,
"system": 0.58845282,
"min": 0.29150385404,
"max": 0.33451051004000004,
"times": [
0.29150385404,
0.29826727404000003,
0.33451051004000004,
0.32643746304000004,
0.31578455804000005,
0.31234889704,
0.31862776304,
0.30283557904,
0.31324072704000006,
0.29607031504000003
]
},
{
"command": "pnpr@main",
"mean": 0.3154773169400001,
"stddev": 0.011829440429823491,
"median": 0.31594110004000003,
"user": 0.27144203999999994,
"system": 0.5837241199999998,
"min": 0.29537025704000003,
"max": 0.33095779804000003,
"times": [
0.33095779804000003,
0.31916749004,
0.29816400904,
0.29537025704000003,
0.31663060104,
0.32247846704000005,
0.33072269504,
0.31525159904000005,
0.31490858304,
0.31112167004
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.9900217806,
"stddev": 0.05349776775883602,
"median": 2.9824873092999997,
"user": 2.31927884,
"system": 1.6495267200000001,
"min": 2.9175557853,
"max": 3.0808834393,
"times": [
3.0481753593,
3.0808834393,
2.9567913613,
2.9482053483,
3.0144346523,
2.9349818893,
3.0342153523,
2.9952199283,
2.9175557853,
2.9697546903
]
},
{
"command": "pacquet@main",
"mean": 2.8848492380000006,
"stddev": 0.05488286343917539,
"median": 2.8792120253,
"user": 2.07891224,
"system": 1.48900822,
"min": 2.8173009183,
"max": 2.9775269403,
"times": [
2.9775269403,
2.9633492543,
2.8298809643,
2.9004488373000004,
2.8368704503,
2.8593664033,
2.8562269093,
2.8173009183,
2.9084640553,
2.8990576473
]
},
{
"command": "pnpr@HEAD",
"mean": 1.6246870309,
"stddev": 0.14106248881195013,
"median": 1.6485844383000001,
"user": 1.1956174400000001,
"system": 1.33843432,
"min": 1.4395764963,
"max": 1.8445529293,
"times": [
1.6725563923000002,
1.6840029343,
1.4395764963,
1.8026933313,
1.4602197813000002,
1.4660546123,
1.6246124843,
1.5681384883,
1.8445529293,
1.6844628593
]
},
{
"command": "pnpr@main",
"mean": 1.5728538266999998,
"stddev": 0.13421558459295405,
"median": 1.5175926993000002,
"user": 1.24292814,
"system": 1.32744362,
"min": 1.4745453653,
"max": 1.8612127503,
"times": [
1.4986886913,
1.8612127503,
1.4745453653,
1.5306141373000002,
1.4845529453,
1.7743514653,
1.5820302663,
1.5097019863,
1.5254834123,
1.4873572473
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.65936521474,
"stddev": 0.015921538362045976,
"median": 0.65562763654,
"user": 0.8033749199999999,
"system": 0.7184752999999999,
"min": 0.63714117054,
"max": 0.69090499054,
"times": [
0.64755947454,
0.65745972254,
0.65379555054,
0.64517889954,
0.69090499054,
0.66918415654,
0.65241734454,
0.66518871154,
0.63714117054,
0.67482212654
]
},
{
"command": "pacquet@main",
"mean": 0.67737161874,
"stddev": 0.03839313467034798,
"median": 0.67500381354,
"user": 0.8338220199999998,
"system": 0.7404799000000002,
"min": 0.62494423554,
"max": 0.74224718954,
"times": [
0.69974044254,
0.62494423554,
0.65022206954,
0.69230671154,
0.74224718954,
0.72677489554,
0.6821563215399999,
0.63977098354,
0.66785130554,
0.64770203254
]
},
{
"command": "pnpr@HEAD",
"mean": 0.33258139044,
"stddev": 0.01450152417454618,
"median": 0.33578507354,
"user": 0.23963652,
"system": 0.5597115,
"min": 0.30559228754,
"max": 0.34855560354000004,
"times": [
0.34835849354000004,
0.32401086154000003,
0.31497703454000003,
0.30559228754,
0.33872180054,
0.33994030554000004,
0.34522539054,
0.32758378054000004,
0.34855560354000004,
0.33284834654
]
},
{
"command": "pnpr@main",
"mean": 0.3368958778400001,
"stddev": 0.015163754902722112,
"median": 0.33809115804,
"user": 0.22269921999999998,
"system": 0.5727423,
"min": 0.32007667054000005,
"max": 0.36203758954000004,
"times": [
0.35272923554,
0.34644254454,
0.36203758954000004,
0.34685872854000005,
0.33715617154000005,
0.33902614454,
0.32213904554,
0.32201585354,
0.32007667054000005,
0.32047679454000005
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.0941690571399993,
"stddev": 0.053218509488016,
"median": 2.10755582524,
"user": 1.2837151400000002,
"system": 0.8937500400000001,
"min": 1.9939426027399998,
"max": 2.1677931787399998,
"times": [
2.08561247274,
2.06081039474,
2.1328335097399997,
2.1677931787399998,
2.09414455374,
2.13473374874,
2.12096709674,
2.12166979174,
2.02918322174,
1.9939426027399998
]
},
{
"command": "pacquet@main",
"mean": 1.97083100154,
"stddev": 0.04456522789130468,
"median": 1.94602308074,
"user": 1.0598603399999997,
"system": 0.80730974,
"min": 1.91915666574,
"max": 2.04521830674,
"times": [
2.04521830674,
2.01289769674,
2.02433498074,
1.99716155574,
1.93094902674,
1.91915666574,
1.94422504474,
1.94478051974,
1.94726564174,
1.9423205767399998
]
},
{
"command": "pnpr@HEAD",
"mean": 0.33344597194,
"stddev": 0.014960415246278416,
"median": 0.33032989424000003,
"user": 0.22848613999999995,
"system": 0.58725614,
"min": 0.31936665374,
"max": 0.36714498974000004,
"times": [
0.34217155974,
0.32004117474000005,
0.33374194174000005,
0.36714498974000004,
0.31943785874,
0.34585721074000003,
0.33038973674,
0.31936665374,
0.32603854174,
0.33027005174
]
},
{
"command": "pnpr@main",
"mean": 0.32151036404,
"stddev": 0.00986705323831751,
"median": 0.32114307474000003,
"user": 0.22120843999999998,
"system": 0.55398754,
"min": 0.30285967174,
"max": 0.33752364474,
"times": [
0.32147664874000004,
0.32108809574,
0.32085810374,
0.33752364474,
0.31735648774,
0.32367913674000004,
0.30285967174,
0.31378398874,
0.32119805374000004,
0.33527980874
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.45109385902000004,
"stddev": 0.03776201503723699,
"median": 0.44516285002,
"user": 0.43897558,
"system": 0.0752997,
"min": 0.41733413152000004,
"max": 0.5481303915200001,
"times": [
0.45948448752000004,
0.43920136152,
0.44407465052,
0.44625104952,
0.41733413152000004,
0.41765136952000004,
0.42310565252000004,
0.45821259052,
0.5481303915200001,
0.45749290552000005
]
},
{
"command": "pacquet@main",
"mean": 0.53324987812,
"stddev": 0.027275219557096157,
"median": 0.53151065602,
"user": 0.52594378,
"system": 0.080327,
"min": 0.49200641552,
"max": 0.57441795652,
"times": [
0.5375308255200001,
0.5254904865200001,
0.54007678152,
0.52145679852,
0.49738554752,
0.5252781365200001,
0.5468778515200001,
0.57441795652,
0.5719779815200001,
0.49200641552
]
},
{
"command": "pnpr@HEAD",
"mean": 0.09883860882000002,
"stddev": 0.004966257267564379,
"median": 0.09843330702,
"user": 0.025353413333333335,
"system": 0.015218333333333334,
"min": 0.08987592852000001,
"max": 0.11015740052,
"times": [
0.09422965952000001,
0.10240569952,
0.10415425352,
0.11015740052,
0.10281025152,
0.09844157252,
0.10091926952000001,
0.10585445652,
0.09616883152,
0.10119736252,
0.10014114452,
0.10547099352,
0.10564163452,
0.09842504152,
0.10662593852,
0.09755738752000001,
0.09564659752,
0.09456678452,
0.09895055152,
0.09055450552000001,
0.09449997852,
0.09490038252,
0.09816120452,
0.09983704152,
0.09853329452000001,
0.09456834652,
0.09226675152000001,
0.09688631352,
0.09570968652,
0.08987592852000001
]
},
{
"command": "pnpr@main",
"mean": 0.10683633814068966,
"stddev": 0.01036562489884631,
"median": 0.10438781352000001,
"user": 0.03148869724137931,
"system": 0.014756027586206899,
"min": 0.09532528252,
"max": 0.13820697452,
"times": [
0.09813775052000001,
0.09553995652000001,
0.09749201352,
0.09629419752,
0.09630299452,
0.10584396652,
0.10840778452000001,
0.10040569252,
0.10538779552000001,
0.10712219252,
0.10096398352000001,
0.09991041952,
0.11450184352000001,
0.10165746052,
0.09636869752,
0.09744329252,
0.10408908952000001,
0.09532528252,
0.10920737152,
0.12175873352000001,
0.11990166552,
0.13820697452,
0.10438781352000001,
0.10998229152000001,
0.10404350452000001,
0.11441001152000001,
0.11911383152,
0.12425748952,
0.11178970552
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.834241967820001,
"stddev": 0.09752548800484581,
"median": 4.8359306140200005,
"user": 2.9400950000000003,
"system": 2.113148099999999,
"min": 4.70231906252,
"max": 5.00061554752,
"times": [
4.824571848520001,
5.00061554752,
4.88217033252,
4.74296801952,
4.70231906252,
4.8525229775200005,
4.84728937952,
4.773072845520001,
4.74804115452,
4.96884851052
]
},
{
"command": "pacquet@main",
"mean": 4.94348517032,
"stddev": 0.1840424385361702,
"median": 4.91528221652,
"user": 2.9565457000000004,
"system": 2.1468881,
"min": 4.72562585352,
"max": 5.19704790852,
"times": [
5.12390124852,
4.79424907252,
5.03813704252,
4.85390744552,
5.19704790852,
4.72562585352,
4.79980831352,
4.74050124352,
4.97665698752,
5.18501658752
]
},
{
"command": "pnpr@HEAD",
"mean": 3.62818718782,
"stddev": 0.17309629646636265,
"median": 3.5899772045200002,
"user": 1.3241182999999999,
"system": 1.3482692999999997,
"min": 3.46782283252,
"max": 3.97263749352,
"times": [
3.84005801852,
3.48477239852,
3.46782283252,
3.49858881352,
3.75519927952,
3.97263749352,
3.5950989465200003,
3.6080659715200003,
3.58485546252,
3.4747726615200003
]
},
{
"command": "pnpr@main",
"mean": 3.58248267352,
"stddev": 0.08289941237431692,
"median": 3.55717314502,
"user": 1.2866597,
"system": 1.3532162,
"min": 3.46612382152,
"max": 3.73132935752,
"times": [
3.46612382152,
3.73132935752,
3.51034072652,
3.5530462165200003,
3.6339129955200002,
3.56130007352,
3.54466358652,
3.5914105595200003,
3.5351480735200003,
3.69755132452
]
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/13462 |
| 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,439.58 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 319.37 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 305.59 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 89.88 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,425.93 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,467.82 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 291.50 ms |
Summary
Aligns the Rust pnpm implementation’s
dedupe --checkreporting with the TypeScript CLI:The TypeScript CLI already has the desired behavior, so this change only updates the Rust implementation. Related to item 2 of #13457.
Squash Commit Body
Checklist
pnpm/port is aligned by this PR.pacquetpatch changeset.Written by an agent (Codex, GPT-5).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
pnpm dedupe --checkprogress and error reporting with the TypeScript CLI.pnpm dedupe --check, including machine-readable error details and diff payloads.