Repository navigation
Conversation
|
Warning Review limit reached
Next review available in: 13 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughProgress reporting now supports centralized rendering options, two-decimal byte formatting, expanded reporter tests, and recorded install-event assertions. Porting documentation and a pacquet patch changeset were updated accordingly. ChangesProgress reporting parity
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant InstallTest
participant RecordingReporter
participant ReporterState
participant pretty_bytes
InstallTest->>RecordingReporter: run dependency installation
RecordingReporter->>ReporterState: emit install and progress events
ReporterState->>pretty_bytes: format download byte counts
ReporterState-->>InstallTest: render configured progress frames
RecordingReporter-->>InstallTest: provide recorded LogEvents
Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches🧪 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 QodoPacquet: finish stage-7 progress reporter parity + install event assertions
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Micro-Benchmark ResultsLinux |
Confidence Score: 5/5Safe to merge — all changes are test additions plus a well-validated arithmetic fix in the byte formatter with no production logic regressions. The pretty_bytes rewrite eliminates floating-point rounding and is verified by the new truncation unit test and the frame-by-frame download scenario. The ReporterOptions struct is additive and backward-compatible. The install test static Mutex pattern has a minor poison-handling inconsistency confined to the test itself. pnpm/crates/package-manager/src/install/tests.rs — inconsistent poison-error handling between emit and the initial clear(). Reviews (4): Last reviewed commit: "fix(reporter): make progress byte format..." | Re-trigger Greptile |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pnpm/crates/package-manager/src/install/tests.rs (1)
176-186: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winStrengthen event assertions beyond presence-only checks.
The recording-reporter pattern matches pnpm/AGENTS.md's guidance, but the assertions only check that each expected event exists somewhere in
capturedvia.any(...), not the relative ordering the guideline calls for ("assert the exact captured sequence"). This won't catch regressions where events are duplicated, dropped alongside a duplicate, or emitted out of the expected order (e.g.,ImportingDonefiring before the manifest event).A full exact-sequence assert is impractical here given non-deterministic content (paths, versions), but recording each match's index and asserting relative ordering (e.g., manifest index < resolved-progress index <
ImportingDoneindex) would strengthen coverage at low cost.Based on path instructions, pnpm/AGENTS.md states: "use a recording-fake Reporter with a per-test static Mutex<Vec<LogEvent>>, clear it at the start, assert the exact captured sequence, and verify the test would fail without the emit (temporary removal discipline)."
Also applies to: 249-292
🤖 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 `@pnpm/crates/package-manager/src/install/tests.rs` around lines 176 - 186, Strengthen assertions in should_install_dependencies using the captured EVENTS sequence: record the indices of the manifest, resolved-progress, and ImportingDone events, assert each occurs exactly once, and verify their indices are strictly ordered. Apply the same ordering and uniqueness checks to the related assertions around the later test range, while retaining flexible matching for non-deterministic event fields.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 `@pnpm/crates/package-manager/src/install/tests.rs`:
- Around line 176-186: Strengthen assertions in should_install_dependencies
using the captured EVENTS sequence: record the indices of the manifest,
resolved-progress, and ImportingDone events, assert each occurs exactly once,
and verify their indices are strictly ordered. Apply the same ordering and
uniqueness checks to the related assertions around the later test range, while
retaining flexible matching for non-deterministic event fields.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: cb74e0ee-9a6c-4f0f-95d6-5b5de80c20a8
📒 Files selected for processing (6)
.changeset/pacquet-progress-reporting-parity.mdpnpm/crates/default-reporter/src/format.rspnpm/crates/default-reporter/src/state.rspnpm/crates/default-reporter/tests/render.rspnpm/crates/package-manager/src/install/tests.rspnpm/plans/TEST_PORTING.md
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13155 +/- ##
==========================================
+ Coverage 85.85% 85.91% +0.05%
==========================================
Files 505 505
Lines 84029 84091 +62
==========================================
+ Hits 72147 72246 +99
+ Misses 11882 11845 -37 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Code Review by Qodo
1. Unbounded test event capture
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Code review by qodo was updated up to the latest commit 9c26474 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Addressed the CodeRabbit maintainability note in commit 2342abf. The install reporter test now requires the manifest, direct-dependency resolution, and importing-done events to occur exactly once and in that order. Written by an agent (Codex, GPT-5). |
|
Code review by qodo was updated up to the latest commit 2342abf |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Reviewed the three Qodo findings against the current code:
Written by an agent (Codex, GPT-5). |
|
Code review by qodo was updated up to the latest commit 896c770 |
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.51477024766,
"stddev": 0.11297475317273473,
"median": 2.5012156344600003,
"user": 1.5146643800000001,
"system": 1.3099452,
"min": 2.36735093546,
"max": 2.70550570146,
"times": [
2.38611318046,
2.70550570146,
2.57611862246,
2.45149959146,
2.36735093546,
2.67409560746,
2.5395685444600002,
2.52576693546,
2.44501902446,
2.47666433346
]
},
{
"command": "pacquet@main",
"mean": 2.48735575106,
"stddev": 0.13486480476085208,
"median": 2.46182553746,
"user": 1.5376018800000002,
"system": 1.2612875000000001,
"min": 2.34532288146,
"max": 2.76176152946,
"times": [
2.41807379946,
2.34532288146,
2.49686065746,
2.5455672534600002,
2.46229892446,
2.35127800946,
2.76176152946,
2.37670815146,
2.46135215046,
2.6543341534600002
]
},
{
"command": "pnpr@HEAD",
"mean": 1.5769274673600002,
"stddev": 0.15279070639555653,
"median": 1.55887311946,
"user": 1.0566391800000001,
"system": 1.1293475,
"min": 1.38617287746,
"max": 1.78608308046,
"times": [
1.7488371044600002,
1.40712741246,
1.55385574746,
1.6399641634600002,
1.78608308046,
1.38617287746,
1.56389049146,
1.76310805846,
1.41032547746,
1.50991026046
]
},
{
"command": "pnpr@main",
"mean": 1.5242439398600003,
"stddev": 0.16085992028583196,
"median": 1.51131213146,
"user": 1.0337929799999999,
"system": 1.1592472999999999,
"min": 1.3387875494600001,
"max": 1.7862707044600001,
"times": [
1.3761175844600002,
1.3885555544600001,
1.74086506546,
1.3387875494600001,
1.37122656946,
1.7862707044600001,
1.6224359324600002,
1.46615806746,
1.55646619546,
1.59555617546
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.25727017016000003,
"stddev": 0.011658428233133188,
"median": 0.25208119066,
"user": 0.20960829999999997,
"system": 0.5390511600000001,
"min": 0.24523812966,
"max": 0.27752916066000005,
"times": [
0.25197758566,
0.24523812966,
0.26012028566,
0.25218479566,
0.26651246766000003,
0.24593847966000001,
0.24781064566,
0.25165177166,
0.27373837966000003,
0.27752916066000005
]
},
{
"command": "pacquet@main",
"mean": 0.25378662856,
"stddev": 0.009515771731695818,
"median": 0.25606715516,
"user": 0.2034678,
"system": 0.52568846,
"min": 0.24114543866,
"max": 0.26446283566,
"times": [
0.24632208166,
0.24114543866,
0.26446283566,
0.24235176066,
0.25539436266000004,
0.26314617666,
0.26081089666,
0.25673994766,
0.24358664766,
0.26390613766000004
]
},
{
"command": "pnpr@HEAD",
"mean": 0.26482719046000003,
"stddev": 0.005530178986869738,
"median": 0.26577230416000003,
"user": 0.20467450000000004,
"system": 0.53688096,
"min": 0.25622453666000006,
"max": 0.27633232866,
"times": [
0.26685637666,
0.27633232866,
0.25622453666000006,
0.25942809266000005,
0.26488089466000003,
0.26263777866000004,
0.26666371366,
0.26082161666000003,
0.26717155966000006,
0.26725500666
]
},
{
"command": "pnpr@main",
"mean": 0.26573072346000004,
"stddev": 0.005567634595447543,
"median": 0.26624160316,
"user": 0.2125184,
"system": 0.53302496,
"min": 0.25632168866000005,
"max": 0.27213277666,
"times": [
0.25632168866000005,
0.26625337966,
0.26622982666000006,
0.27179074266000003,
0.25969946266000005,
0.26035651066000004,
0.26384130566,
0.27213277666,
0.27100838866000004,
0.26967315266
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.7082945935800002,
"stddev": 0.02049337989548368,
"median": 2.7084541784800003,
"user": 1.5877690599999998,
"system": 1.26346688,
"min": 2.67066898398,
"max": 2.74271624598,
"times": [
2.74271624598,
2.72564221898,
2.71089827298,
2.72682798298,
2.69847830398,
2.7074020559800003,
2.6884370369800004,
2.7095063009800002,
2.7023685329800005,
2.67066898398
]
},
{
"command": "pacquet@main",
"mean": 2.69654249658,
"stddev": 0.01746730872671602,
"median": 2.69780034498,
"user": 1.5945599599999998,
"system": 1.25865038,
"min": 2.67017350498,
"max": 2.72216538898,
"times": [
2.69610729598,
2.6874227529800003,
2.67813404298,
2.69949339398,
2.7041855039800002,
2.72070254198,
2.67017350498,
2.72216538898,
2.68121627898,
2.70582426098
]
},
{
"command": "pnpr@HEAD",
"mean": 1.5929521116799998,
"stddev": 0.1430258122949771,
"median": 1.59790180148,
"user": 0.9984604599999998,
"system": 1.09590508,
"min": 1.39791507298,
"max": 1.80322506598,
"times": [
1.48972958398,
1.50137750798,
1.60967208698,
1.39791507298,
1.74990863598,
1.58613151598,
1.41715782698,
1.7549565359800001,
1.80322506598,
1.61944728398
]
},
{
"command": "pnpr@main",
"mean": 1.5704363332799998,
"stddev": 0.11930647060613962,
"median": 1.6043190849800002,
"user": 0.9616365599999999,
"system": 1.13151308,
"min": 1.37840020698,
"max": 1.7534725009799998,
"times": [
1.46345576198,
1.64905894298,
1.64577819198,
1.6437862089800002,
1.37840020698,
1.4381704579799999,
1.50897431198,
1.65841478798,
1.56485196098,
1.7534725009799998
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.55238555766,
"stddev": 0.00623569443473439,
"median": 0.5535187679600001,
"user": 0.6783502199999998,
"system": 0.6658889599999999,
"min": 0.54283856996,
"max": 0.55985410296,
"times": [
0.55985410296,
0.5518679379600001,
0.5576327479600001,
0.54283856996,
0.5460110759600001,
0.5590848929600001,
0.5551695979600001,
0.54982008096,
0.54486039896,
0.55671617096
]
},
{
"command": "pacquet@main",
"mean": 0.5400806159600001,
"stddev": 0.010364452996183104,
"median": 0.54264400896,
"user": 0.67411422,
"system": 0.64638586,
"min": 0.5232974399600001,
"max": 0.5530211809600001,
"times": [
0.52809993696,
0.5391506929600001,
0.54633707996,
0.5530211809600001,
0.54613732496,
0.55023574496,
0.54775094396,
0.53817800096,
0.5232974399600001,
0.52859781396
]
},
{
"command": "pnpr@HEAD",
"mean": 0.29635091996,
"stddev": 0.004793231836695944,
"median": 0.29615117846000005,
"user": 0.18793611999999998,
"system": 0.51397486,
"min": 0.28714768896000004,
"max": 0.30205061096,
"times": [
0.29266465096000005,
0.29182696296000005,
0.29661235696000005,
0.29568999996000006,
0.28714768896000004,
0.29568723496000004,
0.30027277296000005,
0.30081113696000006,
0.30205061096,
0.30074578396000007
]
},
{
"command": "pnpr@main",
"mean": 0.29371798336000005,
"stddev": 0.007281717562710552,
"median": 0.29374701496000005,
"user": 0.17413972000000003,
"system": 0.5241725599999999,
"min": 0.28355775696,
"max": 0.30439222296000007,
"times": [
0.28706335996000004,
0.29764294896000004,
0.29382842296000006,
0.29720610496000005,
0.28605858696,
0.30428093296000003,
0.28948388996,
0.29366560696000005,
0.28355775696,
0.30439222296000007
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.8526572628800004,
"stddev": 0.008936182120094857,
"median": 1.85114964618,
"user": 0.9013825399999998,
"system": 0.7341010799999999,
"min": 1.84045945868,
"max": 1.87334386368,
"times": [
1.8502667836800002,
1.8590252206800002,
1.8494793896800001,
1.8440538186800002,
1.85203250868,
1.87334386368,
1.85485802168,
1.85290577368,
1.84045945868,
1.85014778968
]
},
{
"command": "pacquet@main",
"mean": 1.8379453557799998,
"stddev": 0.008320298951831095,
"median": 1.8378228271800001,
"user": 0.8667200399999999,
"system": 0.72582348,
"min": 1.82676847868,
"max": 1.85256458168,
"times": [
1.8348307646800002,
1.82818074768,
1.85256458168,
1.83120296168,
1.84080294668,
1.84071479968,
1.84181810868,
1.84763931368,
1.83493085468,
1.82676847868
]
},
{
"command": "pnpr@HEAD",
"mean": 0.29324105118,
"stddev": 0.010808593361805787,
"median": 0.29376320868,
"user": 0.18387093999999998,
"system": 0.5269734799999999,
"min": 0.27757887268000003,
"max": 0.31864281568,
"times": [
0.29122876468000003,
0.29613386468,
0.29346682068,
0.31864281568,
0.28628264768,
0.29405959668,
0.27757887268000003,
0.28392479468,
0.29457150068,
0.29652083368
]
},
{
"command": "pnpr@main",
"mean": 0.29462011328000004,
"stddev": 0.0038876920694554404,
"median": 0.29566268718,
"user": 0.19529214,
"system": 0.52113038,
"min": 0.28918634768,
"max": 0.30021273868,
"times": [
0.29005120668,
0.29503774968,
0.30021273868,
0.29103403768,
0.28918634768,
0.29730481068000003,
0.29870257368,
0.29151867068,
0.29628762468000003,
0.29686537268
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.3149973328199999,
"stddev": 0.0061449314677626725,
"median": 0.31440990722,
"user": 0.30882438,
"system": 0.052073020000000005,
"min": 0.30870825772,
"max": 0.33033154772,
"times": [
0.31215255572,
0.31846015572,
0.31485353272,
0.31396628172,
0.31557202672,
0.33033154772,
0.30915556072,
0.31485955372,
0.30870825772,
0.31191385572
]
},
{
"command": "pacquet@main",
"mean": 0.31407868042,
"stddev": 0.0036891877641074622,
"median": 0.31361063172000003,
"user": 0.29710678,
"system": 0.06378592000000001,
"min": 0.30985109972,
"max": 0.32144602072,
"times": [
0.31504843972,
0.31370089172,
0.31080500772,
0.31140577872,
0.31174072972,
0.31412854772,
0.31913991672,
0.30985109972,
0.32144602072,
0.31352037172
]
},
{
"command": "pnpr@HEAD",
"mean": 0.0836525893082353,
"stddev": 0.001921932334718103,
"median": 0.08342953472,
"user": 0.017200850588235294,
"system": 0.010230784705882352,
"min": 0.08076990972,
"max": 0.08897610772,
"times": [
0.08278043772,
0.08591617372,
0.08444941072,
0.08619789472,
0.08661419872000001,
0.08194610572000001,
0.08286736172,
0.08186687672000001,
0.08175262172,
0.08547000272000001,
0.08494912272,
0.08263344072,
0.08182773272,
0.08350892972,
0.08123083972,
0.08395185372000001,
0.08205875872,
0.08383914072000001,
0.08759915372,
0.08524954872,
0.08076990972,
0.08482622172000001,
0.08162857672,
0.08163721372,
0.08320579872,
0.08383168672,
0.08897610772,
0.08409701872,
0.08395772472,
0.08423006772000001,
0.08335013972000001,
0.08138107172,
0.08275871572,
0.08282817772
]
},
{
"command": "pnpr@main",
"mean": 0.08283725297714285,
"stddev": 0.0014346858016907672,
"median": 0.08243043872,
"user": 0.019206780000000003,
"system": 0.008226389714285715,
"min": 0.08087833472,
"max": 0.08633337972,
"times": [
0.08087833472,
0.08258161272,
0.08173791372,
0.08243839372,
0.08304294272,
0.08156219272000001,
0.08209053772000001,
0.08243043872,
0.08287915272,
0.08143074472,
0.08502614772,
0.08611718272,
0.08243854272000001,
0.08125251872,
0.08535870372000001,
0.08414934572,
0.08298329972,
0.08136819672000001,
0.08524925672,
0.08473652172,
0.08263807972000001,
0.08227362272000001,
0.08140306272,
0.08303408572000001,
0.08218417472,
0.08242143172000001,
0.08198170272000001,
0.08223859772,
0.08197629272000001,
0.08207721272,
0.08358186672000001,
0.08235080772,
0.08115542672,
0.08390212972000001,
0.08633337972
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.5314817427400005,
"stddev": 0.10551488114853874,
"median": 4.518449370839999,
"user": 1.69285796,
"system": 1.3767393199999998,
"min": 4.415776965339999,
"max": 4.74516979434,
"times": [
4.415776965339999,
4.74516979434,
4.537870272339999,
4.42938320434,
4.42975921234,
4.4775026123399995,
4.49902846934,
4.6449465523399995,
4.54677834434,
4.58860200034
]
},
{
"command": "pacquet@main",
"mean": 4.513872265739999,
"stddev": 0.12374719387308447,
"median": 4.44978877134,
"user": 1.7037773599999997,
"system": 1.3601520199999997,
"min": 4.429125390339999,
"max": 4.78028226134,
"times": [
4.442118553339999,
4.452153795339999,
4.429125390339999,
4.447423747339999,
4.43299001734,
4.43829613334,
4.695212433339999,
4.78028226134,
4.486780586339999,
4.534339739339999
]
},
{
"command": "pnpr@HEAD",
"mean": 3.5103898307400003,
"stddev": 0.07152278178480256,
"median": 3.48464144834,
"user": 1.19277816,
"system": 1.2352140199999997,
"min": 3.44764833734,
"max": 3.65771154834,
"times": [
3.53464100834,
3.47912094934,
3.45427838534,
3.50433769934,
3.46164468134,
3.61276807134,
3.46158567934,
3.65771154834,
3.4901619473400003,
3.44764833734
]
},
{
"command": "pnpr@main",
"mean": 3.5385775090399996,
"stddev": 0.09622264979835629,
"median": 3.49942862784,
"user": 1.17729606,
"system": 1.24099812,
"min": 3.46733706234,
"max": 3.74915056534,
"times": [
3.67465647534,
3.47673289234,
3.50782344534,
3.74915056534,
3.46757590334,
3.50025372634,
3.49860352934,
3.55308957934,
3.46733706234,
3.49055191134
]
}
]
} |
|
| Branch | pr/13155 |
| 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,397.92 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 277.58 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 287.15 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 80.77 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,386.17 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,447.65 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 256.22 ms |
Summary
Related to #13146.
pacquetpatch changeset for the user-visible formatting parity fix.The TypeScript implementation and tests already define the behavior; this PR ports that existing behavior to the Rust CLI.
Validation:
just ready(6,413 tests passed, 3 skipped; workspace clippy clean).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
/codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit