Skip to content

[N-01] Gaussian math audit - #474

Merged
ericnordelo merged 4 commits into
mainfrom
fix/gaussian-audit-N-01
Jul 16, 2026
Merged

[N-01] Gaussian math audit#474
ericnordelo merged 4 commits into
mainfrom
fix/gaussian-audit-N-01

Conversation

@ericnordelo

@ericnordelo ericnordelo commented Jul 13, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Documentation
    • Expanded technical documentation for probability distribution calculations.
    • Added details about possible error conditions and validation checks.
    • Clarified signed-value representation, magnitude limits, and canonical zero handling.
    • No functional behavior or public interfaces were changed.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

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: 17 minutes

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: CHILL

Plan: Pro

Run ID: f706c6d4-fe68-4b24-a5a3-c26ac11ab35d

📥 Commits

Reviewing files that changed from the base of the PR and between 59db76d and 2add14a.

📒 Files selected for processing (3)
  • math/fixed_point/sources/internal/cdf.move
  • math/fixed_point/sources/internal/inverse_cdf.move
  • math/fixed_point/sources/internal/pdf.move
📝 Walkthrough

Walkthrough

Documentation-only updates clarify SignedScaled256 representation invariants and enumerate abort conditions for CDF, PDF, and inverse-CDF rational evaluators. No executable logic, fields, signatures, or control flow changed.

Changes

Fixed-point documentation

Layer / File(s) Summary
Signed-magnitude representation documentation
math/fixed_point/sources/internal/horner.move
Documents magnitude bounds, sign handling, canonical zero, and the mag accessor.
Evaluator abort-condition documentation
math/fixed_point/sources/internal/cdf.move, math/fixed_point/sources/internal/pdf.move, math/fixed_point/sources/internal/inverse_cdf.move
Documents rational-integrity aborts and the inverse-CDF tail logarithm abort condition.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: 0xneshi, immrsd, bidzyyys

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning No PR description was provided, so the required template fields and checklist are missing. Add the template sections, including the issue reference, a brief change summary, and the Tests/Documentation/Changelog checklist.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the PR's Gaussian math audit docs changes, though it is broad rather than specific.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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/gaussian-audit-N-01

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

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.51%. Comparing base (f880455) to head (2add14a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #474      +/-   ##
==========================================
+ Coverage   96.45%   96.51%   +0.05%     
==========================================
  Files          34       34              
  Lines        3414     3411       -3     
  Branches      799      799              
==========================================
- Hits         3293     3292       -1     
  Misses         73       73              
+ Partials       48       46       -2     
Flag Coverage Δ
contracts/access 65.46% <ø> (ø)
contracts/allowance 52.40% <ø> (ø)
contracts/finance 26.66% <ø> (ø)
contracts/timelock 54.32% <ø> (ø)
contracts/utils 44.09% <ø> (ø)
math/core 86.89% <ø> (+0.14%) ⬆️
math/fixed_point 63.62% <ø> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@math/fixed_point/sources/internal/cdf.move`:
- Around line 98-105: Update the abort documentation for eval_rational and the
corresponding CDF, PDF, and inverse-CDF functions at
math/fixed_point/sources/internal/cdf.move:75-79 and 98-105,
math/fixed_point/sources/internal/pdf.move:65-69 and 87-94, and
math/fixed_point/sources/internal/inverse_cdf.move:75-82 and 128-135. Add the
inherited vector index out-of-bounds abort for mismatched magnitude/sign pairs,
noting it is unreachable with committed tables, and split EInternalNumNegative
and EInternalDenNonPositive into distinct bullets.
🪄 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: 9d6d20a4-c237-467a-8d0c-c026a82dcd82

📥 Commits

Reviewing files that changed from the base of the PR and between f880455 and 59db76d.

📒 Files selected for processing (4)
  • math/fixed_point/sources/internal/cdf.move
  • math/fixed_point/sources/internal/horner.move
  • math/fixed_point/sources/internal/inverse_cdf.move
  • math/fixed_point/sources/internal/pdf.move

Comment thread math/fixed_point/sources/internal/cdf.move Outdated

@bidzyyys bidzyyys left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@ericnordelo
ericnordelo merged commit dad4ee9 into main Jul 16, 2026
32 checks passed
@ericnordelo
ericnordelo deleted the fix/gaussian-audit-N-01 branch July 16, 2026 10: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.

3 participants