Skip to content

fix: release builds warnings removed#825

Merged
xdustinface merged 1 commit into
devfrom
fix/release-warnings
Jun 26, 2026
Merged

fix: release builds warnings removed#825
xdustinface merged 1 commit into
devfrom
fix/release-warnings

Conversation

@ZocoLini

@ZocoLini ZocoLini commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes
    • Improved error reporting during validation and formatting failures, making issues easier to diagnose.
    • Reduced noisy build warnings in non-debug environments.
  • Chores
    • Updated automated linting to run across multiple build profiles and provide clearer failure messages.

@ZocoLini ZocoLini requested a review from xdustinface June 26, 2026 09:45
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@ZocoLini, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 45 minutes and 27 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

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 credits.

🚦 How do rate 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 see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2591729e-b208-46e4-a46a-2400e3ec9ba9

📥 Commits

Reviewing files that changed from the base of the PR and between 15e3828 and e4abbcb.

📒 Files selected for processing (3)
  • contrib/run_clippy.py
  • dash/src/consensus/serde.rs
  • dash/src/sml/quorum_entry/validation.rs
📝 Walkthrough

Walkthrough

The PR changes run_clippy.py to execute clippy for both debug and release profiles. It also switches consensus formatting and quorum-entry deserialization failures to tracing::error! logging, and adds non-debug unused-variable allowances in serde.rs.

Changes

Clippy profile execution

Layer / File(s) Summary
Shared command and profile loop
contrib/run_clippy.py
The script builds a shared clippy base command, applies the Windows-specific exclusion, runs debug and release profiles in a loop, and reports failed profile commands to stderr before exiting.

Structured error logging

Layer / File(s) Summary
Logging on consensus failures
dash/src/consensus/serde.rs, dash/src/sml/quorum_entry/validation.rs
DisplayWrapper logs formatting failures with tracing::error!, two writer-checking methods add non-debug unused-variable allowances, and quorum validation logs operator public key deserialization failures with tracing::error!.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I hopped by moonlit clippy trails,
Then traced the errors through the rails.
Two profiles ran, both neat and bright,
And logs now sparkle in the night.
🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the change set’s focus on fixing release-build warnings and related logging cleanup.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-warnings

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.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
dash/src/consensus/serde.rs (1)

197-201: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Retitle or split this PR.

These logging changes alter runtime behavior, so they do not fit a cleanup-only title like fix: release builds warnings removed. Either widen the title/description or move the tracing changes into a separate focused PR. As per path instructions, "Check whether the PR title prefix allowed in the pr-title.yml workflow accurately describes the changes" and "If a PR mixes unrelated concerns ... suggest splitting it into separate focused PRs."

🤖 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 `@dash/src/consensus/serde.rs` around lines 197 - 201, The change in
serde::error! logging affects runtime behavior, so the current cleanup-only PR
framing is inaccurate; either update the PR title/description to match the
tracing/runtime behavior changes or split the logging/tracing updates into a
separate focused PR from the warning cleanup. Use the existing serde::error!
formatting path and related tracing changes as the boundary when deciding what
stays together.

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.

Inline comments:
In `@dash/src/consensus/serde.rs`:
- Around line 197-201: DisplayWrapper::fmt in consensus/serde.rs is logging
directly inside formatting, which can re-enter tracing and cause deadlocks or
recursion. Remove the tracing::error! call from Display::fmt and make it return
fmt::Error unconditionally on formatting failure, then move the error logging to
the caller that invokes DisplayWrapper::fmt so the logging happens outside the
formatting path.

In `@dash/src/sml/quorum_entry/validation.rs`:
- Line 54: The validation loop in
quorum_entry::validation::verify_aggregated_commitment_signature is logging an
error for every rejected operator key, which creates noisy N-times logging for a
single failed validation. Change this path to stop emitting an error inside the
per-masternode closure and instead propagate the first deserialization failure
as QuorumValidationError from the outer validation flow, or downgrade/throttle
the log if repeated best-effort filtering is intended. Use the existing error
handling around verify_aggregated_commitment_signature and the
QuorumValidationError variants to keep the failure surfaced once.

---

Nitpick comments:
In `@dash/src/consensus/serde.rs`:
- Around line 197-201: The change in serde::error! logging affects runtime
behavior, so the current cleanup-only PR framing is inaccurate; either update
the PR title/description to match the tracing/runtime behavior changes or split
the logging/tracing updates into a separate focused PR from the warning cleanup.
Use the existing serde::error! formatting path and related tracing changes as
the boundary when deciding what stays together.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4a23df63-c4a4-4d46-9d6c-4dc9c340f04c

📥 Commits

Reviewing files that changed from the base of the PR and between e9f3816 and 15e3828.

📒 Files selected for processing (3)
  • contrib/run_clippy.py
  • dash/src/consensus/serde.rs
  • dash/src/sml/quorum_entry/validation.rs

Comment thread dash/src/consensus/serde.rs Outdated
Comment thread dash/src/sml/quorum_entry/validation.rs
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.17%. Comparing base (e9f3816) to head (e4abbcb).

Files with missing lines Patch % Lines
dash/src/consensus/serde.rs 0.00% 1 Missing ⚠️
dash/src/sml/quorum_entry/validation.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #825      +/-   ##
==========================================
- Coverage   73.19%   73.17%   -0.02%     
==========================================
  Files         323      323              
  Lines       72294    72295       +1     
==========================================
- Hits        52912    52901      -11     
- Misses      19382    19394      +12     
Flag Coverage Δ
core 76.94% <0.00%> (-0.01%) ⬇️
ffi 47.71% <ø> (-0.02%) ⬇️
rpc 20.00% <ø> (ø)
spv 90.30% <ø> (-0.06%) ⬇️
wallet 71.81% <ø> (ø)
Files with missing lines Coverage Δ
dash/src/consensus/serde.rs 15.55% <0.00%> (-0.06%) ⬇️
dash/src/sml/quorum_entry/validation.rs 91.92% <0.00%> (ø)

... and 5 files with indirect coverage changes

@ZocoLini ZocoLini force-pushed the fix/release-warnings branch from 15e3828 to e4abbcb Compare June 26, 2026 09:59
@github-actions github-actions Bot added the ready-for-review CodeRabbit has approved this PR label Jun 26, 2026
@xdustinface xdustinface merged commit ddb59d9 into dev Jun 26, 2026
36 checks passed
@xdustinface xdustinface deleted the fix/release-warnings branch June 26, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review CodeRabbit has approved this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants