#402 - test(multisig_split_refund): add extreme-value boundary tests for checked arithmetic - #427
Merged
godamongstmen897 merged 2 commits intoSep 1, 2026
Conversation
|
@qa-eden Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #402
Summary
multisig_split_refundalready delegates all arithmetic tosplit_round_nearest, which useschecked_mul,checked_add, andchecked_subthroughout. The BPS pair addition is also guarded withchecked_add. No production-code changes are required.What was missing was test coverage proving that extreme operands (
i128::MAX,i128::MIN, negatives) return typed errors rather than panicking or wrapping.Changes
multisig_split_refund_tests.rs— new dedicated test file, 12 tests across 6 sections:total_amountboundary guards —i128::MIN, negatives, and zero all returnError::InvalidAmounti128::MAXwith every non-trivial BPS pair returnsError::InvalidAmount;u32::MAXBPS pair returnsError::InvalidRatioi128::MAXwith 0-bps client completes correctly;i64::MAX50/50 split sums exactly to the inputsplitrefevent; all failure paths emit nonetest.rs— adds the#[path] moddeclaration following the existing pattern used bymultisig_admin_override_refund_testsandmultisig_transfer_admin_tests.Testing