Repository navigation
fix(default-reporter): render install stats once - #13103
Conversation
Buffer the paired stats events before rendering. This prevents append-only output from printing an intermediate stats block.
PR Summary by QodoFix Rust default reporter printing install stats twice
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
|
Warning Review limit reached
Next review available in: 18 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 (2)
📝 WalkthroughWalkthroughThe default reporter now collects added and removed package statistics before rendering, flushes incomplete statistics at summary time, and includes tests and a pacquet patch changeset documenting the fix. ChangesPacquet statistics rendering
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant StatsMessage
participant ReporterState
participant ReporterRenderer
StatsMessage->>ReporterState: provide added or removed statistics
ReporterState->>ReporterState: collect both matching values
ReporterState->>ReporterRenderer: render complete or summary-flushed statistics
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 |
Confidence Score: 5/5The change is safe to merge: focused, well-tested fix to buffering logic in the append-only reporter with no effect on the interactive TTY path. The fix correctly defers rendering until both stats events arrive, clears state with .take() to avoid double-renders, and guards the summary-flush with a prefix match to avoid premature output. New tests directly exercise both the complete-pair and incomplete-pair paths. No files require special attention. Reviews (3): Last reviewed commit: "fix(default-reporter): scope stats summa..." | Re-trigger Greptile |
Code Review by Qodo
Context used✅ Compliance rules (platform):
18 rules 1.
|
Micro-Benchmark ResultsLinux |
PR Code Suggestions ✨Warning
|
|||||||||
Render a partial stats pair when the run summary arrives.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13103 +/- ##
=======================================
Coverage 85.45% 85.45%
=======================================
Files 501 501
Lines 80654 80664 +10
=======================================
+ Hits 68924 68934 +10
Misses 11730 11730 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Code review by qodo was updated up to the latest commit b29593e |
PR Code Suggestions ✨Warning
|
|||||||||
Keep unrelated importer summaries from consuming buffered stats.
|
Addressed Qodo's "Summary flush wrong prefix" finding in 748be4d. The summary prefix is now forwarded to the reporter state, and only the matching current-project summary can flush incomplete stats. The regression test sends a foreign summary first and verifies that the buffered stats are preserved until the matching summary arrives. Written by an agent (Codex, GPT-5). |
|
Code review by qodo was updated up to the latest commit 748be4d |
PR Code Suggestions ✨Warning
|
|||||||||
Summary
Fix duplicate
Packages: +Nstatistics output from Rust pnpm installs inappend-only and non-interactive terminals.
The installer emits separate added and removed statistics events. The
TypeScript reporter combines this pair, while the Rust reporter rendered after
each event and therefore printed the same block twice when the removed count
was zero. The Rust reporter now buffers the pair and renders the combined
statistics once. If the run ends with only one event, it flushes the partial
statistics at summary time, matching the TypeScript stream-completion fallback.
The TypeScript implementation already has the intended behavior, so it does not
need a matching code change.
Reproduction: https://github.com/pnpm/pnpm/actions/runs/29564581286/job/87834282836
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
Bug Fixes
Tests
Release
pacquet.