Skip to content

refactor(pipeline): resolve clippy::pedantic cast-precision lints in base.rs - #790

Merged
nh13 merged 1 commit into
mainfrom
788/nhomer/fix-base-pedantic-casts
Aug 18, 2026
Merged

nh13 merged 1 commit into
mainfrom
788/nhomer/fix-base-pedantic-casts

Conversation

@nh13

@nh13 nh13 commented Aug 16, 2026

Copy link
Copy Markdown
Member

Resolves the pre-existing clippy::pedantic cast-precision warnings in src/lib/unified_pipeline/base.rs. These live entirely in the #[cfg(feature = "memory-debug")] reporting path, so they only surface under a full cargo clippy --all-features --all-targets run and never tripped the ci-lint gate (which enables compare,simulate,profile-adjacency, not memory-debug). All are lint-only display conversions; no computed value changed.

  • PipelineStats::get_memory_breakdown — 25 u64 as f64 byte→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 below f64'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 — two f64 as u32 integer-percentage casts (clippy::cast_possible_truncation, clippy::cast_sign_loss): kept the casts and added statement-scoped allows. Both are guarded by system_rss_gb > 0.0 with 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-lint gate is unchanged. Verified: cargo ci-fmt and cargo ci-lint stay green, cargo clippy --all-features --all-targets -- -W clippy::pedantic shows no remaining cast warnings in base.rs, and the 346 unified_pipeline unit tests (run with memory-debug enabled) pass.

Closes #788

…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
@nh13
nh13 deployed to github-actions August 16, 2026 06:27 — with GitHub Actions Active
@coderabbitai

coderabbitai Bot commented Aug 16, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

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.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 174fd338-5fcd-4aaa-9801-7c6e34aba81d

📥 Commits

Reviewing files that changed from the base of the PR and between 0c307f8 and bee6941.

📒 Files selected for processing (1)
  • src/lib/unified_pipeline/base.rs

Note

Reviews paused

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.23%. Comparing base (0c307f8) to head (bee6941).
⚠️ Report is 8 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nh13

nh13 commented Aug 16, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai pause

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown
✅ Action performed

Reviews paused.

@nh13

nh13 commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
❌ Action failed

Review failed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nh13

nh13 commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. Your recent PR review activity is in the 95th percentile or higher among CodeRabbit users, so adaptive limits apply. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 20 minutes.

@nh13
nh13 merged commit 04aa912 into main Aug 18, 2026
16 checks passed
@nh13
nh13 deleted the 788/nhomer/fix-base-pedantic-casts branch August 18, 2026 01:39
@nh13 nh13 mentioned this pull request Aug 18, 2026

This branch was successfully deployed

1 active deployment
github-actions — bee6941e Deployed Aug 16, 2026 by nh13 via coverage #3562
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hygiene: resolve pre-existing clippy::pedantic cast-precision warnings in unified_pipeline/base.rs

1 participant