Skip to content

Fix flaky round_value property test#509

Closed
gcomte wants to merge 0 commit intomasterfrom
fix/property-test-floating-point-v2
Closed

Fix flaky round_value property test#509
gcomte wants to merge 0 commit intomasterfrom
fix/property-test-floating-point-v2

Conversation

@gcomte
Copy link
Copy Markdown
Owner

@gcomte gcomte commented Mar 30, 2026

Summary

  • Both the original round_value_has_correct_decimal_places and the idempotency rewrite failed for large BTC values (e.g. 37515032.691102825) because (value * 1e8).round() / 1e8 introduces f64 representation errors at that magnitude
  • Replaced with a bounded-error test: rounding must not move the value by more than half a unit of the last decimal place (+ f64 tolerance proportional to magnitude)
  • Supersedes Fix flaky round_value property test #508

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

Warning

Rate limit exceeded

@gcomte has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 32 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 3 minutes and 32 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 94f84b39-fc0c-423d-a3b8-d36fa8984a28

📥 Commits

Reviewing files that changed from the base of the PR and between 4eebf6a and 558801e.

📒 Files selected for processing (5)
  • .github/workflows/build.yml
  • .github/workflows/code-analysis.yml
  • src/currency/btc.rs
  • src/defaults.rs
  • tests/int_tests.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/property-test-floating-point-v2

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 and usage tips.

@gcomte gcomte closed this Mar 30, 2026
@gcomte gcomte force-pushed the fix/property-test-floating-point-v2 branch from 558801e to 4eebf6a Compare March 30, 2026 08:48
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