refactor(pipeline): resolve clippy::pedantic cast-precision lints in base.rs - #790
Conversation
…base.rs The memory-debug reporting path in unified_pipeline/base.rs carried pre-existing clippy::pedantic cast lints that surface under a full --all-features clippy run (the ci-lint gate does not enable the memory-debug feature). All are lint-only display conversions: byte counts to GB/MB for log lines, and non-negative percentages truncated to u32. Annotated each with a scoped allow and rationale rather than changing any computed value. Closes #788
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 20 minutes Limit details: You’ve used all 1 included review currently available under your plan. You completed 139 included PR reviews in the past 7 days; at that activity level, included reviews refill at 1 review per hour. 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: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
Note Reviews pausedUse the following commands to manage reviews:
Use the checkboxes below for quick actions:
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #790 +/- ##
=======================================
Coverage 94.22% 94.23%
=======================================
Files 186 186
Lines 111822 111822
=======================================
+ Hits 105369 105371 +2
+ Misses 6453 6451 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai pause |
✅ Action performedReviews paused. |
|
@coderabbitai review |
❌ Action failedReview failed.
|
|
@coderabbitai full review |
|
Resolves the pre-existing
clippy::pedanticcast-precision warnings insrc/lib/unified_pipeline/base.rs. These live entirely in the#[cfg(feature = "memory-debug")]reporting path, so they only surface under a fullcargo clippy --all-features --all-targetsrun and never tripped theci-lintgate (which enablescompare,simulate,profile-adjacency, notmemory-debug). All are lint-only display conversions; no computed value changed.PipelineStats::get_memory_breakdown— 25u64 as f64byte→GB/MB conversions (clippy::cast_precision_loss): kept the casts and added a single function-scoped#[allow(clippy::cast_precision_loss)]with a rationale. Real RSS/queue sizes are far belowf64's 2^52-byte exact-integer limit (4 PiB), so the precision loss is unobservable and the truncated GB/MB figure is exactly what the log line wants.log_comprehensive_memory_stats— twof64 as u32integer-percentage casts (clippy::cast_possible_truncation,clippy::cast_sign_loss): kept the casts and added statement-scoped allows. Both are guarded bysystem_rss_gb > 0.0with non-negative numerators (one via saturating subtraction), so truncating toward zero and dropping the never-present sign is the intended display behavior.No crate- or module-wide blanket allow was added and the
ci-lintgate is unchanged. Verified:cargo ci-fmtandcargo ci-lintstay green,cargo clippy --all-features --all-targets -- -W clippy::pedanticshows no remaining cast warnings inbase.rs, and the 346unified_pipelineunit tests (run withmemory-debugenabled) pass.Closes #788