Skip to content

fix(consensus): collapse codec masking if into a let-chain - #590

Merged
nh13 merged 1 commit into
mainfrom
nh/fix-codec-collapsible-if
Jul 18, 2026
Merged

nh13 merged 1 commit into
mainfrom
nh/fix-codec-collapsible-if

Conversation

@nh13

@nh13 nh13 commented Jul 18, 2026

Copy link
Copy Markdown
Member

Summary

Main's lint job is currently failing — commit 0ae197c0 (#575, the MSRV/let-chain adoption) bumped the toolchain to Rust 1.93, whose clippy now fires collapsible_if on a pre-existing nested if in mask_consensus_quals_query_based (crates/fgumi-consensus/src/codec_caller.rs:1315). #575 didn't clean it up, so main and every PR rebased onto it fail cargo ci-lint.

This collapses the nested if outer_bases_length > 0 { if let Some(outer_qual) = outer_bases_qual } into a single let-chain — the idiom the newer toolchain unlocks — matching the project policy in CLAUDE.md to adopt new idioms rather than suppress the clippy lints that flag them. Behavior is unchanged.

Verification

  • cargo ci-lint (workspace, -D warnings -W clippy::pedantic) passes clean.
  • No functional change; the masking logic is byte-for-byte equivalent.

The Rust 1.93 toolchain adopted in #575 makes clippy's collapsible_if
fire on the nested `if outer_bases_length > 0 { if let Some(outer_qual)
= outer_bases_qual }` in mask_consensus_quals_query_based, failing the
lint job on main (and every PR rebased onto it). Collapse it into a
let-chain, the idiom the newer toolchain unlocks, per the project's
policy of adopting new idioms rather than suppressing the lint.
@nh13
nh13 temporarily deployed to github-actions July 18, 2026 15:04 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Jul 18, 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: 1 minute

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: 44f81be1-013c-43e6-b3dc-5a8f6b5eb0bf

📥 Commits

Reviewing files that changed from the base of the PR and between 0ae197c and 5d428fe.

📒 Files selected for processing (1)
  • crates/fgumi-consensus/src/codec_caller.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nh/fix-codec-collapsible-if

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

@codecov

codecov Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.96%. Comparing base (0ae197c) to head (5d428fe).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #590      +/-   ##
==========================================
- Coverage   92.99%   92.96%   -0.04%     
==========================================
  Files         167      167              
  Lines      103267   103266       -1     
==========================================
- Hits        96034    96000      -34     
- Misses       7233     7266      +33     

☔ 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 merged commit c94348f into main Jul 18, 2026
11 checks passed
@nh13
nh13 deleted the nh/fix-codec-collapsible-if branch July 18, 2026 15:08
@nh13 nh13 mentioned this pull request Jul 18, 2026

This branch was previously deployed

1 inactive deployment
github-actions — 5d428fe6 Deployed Jul 18, 2026 by nh13 via coverage #2688
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.

1 participant