📌 Description
create_vault enforces MIN_AMOUNT ≤ amount ≤ MAX_AMOUNT. Snapshots like
test_amount_below_minimum, test_amount_above_maximum, and
test_amount_exactly_max_allowed exist, but tests/proptest_amounts.rs should
densely cover both exact boundaries and the just-inside/just-outside neighbours,
all returning Error::InvalidAmount on rejection.
Goal: extend the amount property tests so MIN_AMOUNT and MAX_AMOUNT are
accepted, MIN_AMOUNT - 1 and MAX_AMOUNT + 1 are rejected, with randomized
sampling across the valid interior.
🎯 Requirements and Context
- Must be deterministic under a fixed proptest seed.
- Assert exact boundary acceptance and neighbour rejection with
Error::InvalidAmount.
- Mint sufficient USDC so rejections come from the amount check, not a balance
failure (distinguish InvalidAmount from "balance is not sufficient").
- Cover zero and negative amounts explicitly.
🛠️ Suggested Execution
1. Fork the repo and create a branch
git checkout -b feature/amount-boundary-proptests
2. Implement changes
- Tests: extend
tests/proptest_amounts.rs with boundary strategies and explicit
edge vectors at MIN_AMOUNT, MAX_AMOUNT, and their neighbours.
- Docs: add an "Amount Bounds" section to
TESTING_GUIDE.md.
3. Test and commit
- Run
cargo test and regenerate coverage.
- Cover edge cases:
MIN_AMOUNT, MIN_AMOUNT - 1, MAX_AMOUNT, MAX_AMOUNT + 1,
0, negative.
Example commit message
test: amount boundary property coverage for create_vault
✅ Guidelines
- Minimum 95% test coverage on the amount-validation branches.
- Clear documentation of the boundary cases.
- All tests deterministic under a fixed seed.
- Timeframe: 96 hours.
🏷️ Labels
type-testing · area-contracts · MAYBE REWARDED · GRANTFOX OSS ·
OFFICIAL CAMPAIGN
💬 Community & Support
- Join the Disciplr contributor Discord to coordinate, ask questions, and get
unblocked fast: https://discord.gg/xvNAvMJf
- Please introduce yourself before you start so we can avoid duplicate work,
pair you with a reviewer, and merge your PR quickly.
📌 Description
create_vaultenforcesMIN_AMOUNT ≤ amount ≤ MAX_AMOUNT. Snapshots liketest_amount_below_minimum,test_amount_above_maximum, andtest_amount_exactly_max_allowedexist, buttests/proptest_amounts.rsshoulddensely cover both exact boundaries and the just-inside/just-outside neighbours,
all returning
Error::InvalidAmounton rejection.🎯 Requirements and Context
Error::InvalidAmount.failure (distinguish
InvalidAmountfrom "balance is not sufficient").🛠️ Suggested Execution
1. Fork the repo and create a branch
2. Implement changes
tests/proptest_amounts.rswith boundary strategies and explicitedge vectors at
MIN_AMOUNT,MAX_AMOUNT, and their neighbours.TESTING_GUIDE.md.3. Test and commit
cargo testand regenerate coverage.MIN_AMOUNT,MIN_AMOUNT - 1,MAX_AMOUNT,MAX_AMOUNT + 1,0, negative.Example commit message
✅ Guidelines
🏷️ Labels
type-testing·area-contracts·MAYBE REWARDED·GRANTFOX OSS·OFFICIAL CAMPAIGN💬 Community & Support
unblocked fast: https://discord.gg/xvNAvMJf
pair you with a reviewer, and merge your PR quickly.