📌 Description
tests/proptest_timestamps.rs checks ordering and the duration bound, but the
exact MAX_VAULT_DURATION boundary (end - start == MAX_VAULT_DURATION accepted
vs + 1 rejected with Error::DurationTooLong) deserves dedicated, randomized
coverage around the edge. The start_timestamp < current_time rejection path
also lacks property coverage.
Goal: extend the timestamp property tests to densely sample the duration
boundary and the past-start rejection across a randomized ledger time.
🎯 Requirements and Context
- Must be deterministic given a fixed proptest seed.
- Assert
duration == MAX_VAULT_DURATION accepts and +1 rejects with
Error::DurationTooLong.
- Assert
start_timestamp < ledger.timestamp() rejects with Error::InvalidTimestamp.
- Avoid
u64 overflow in generated start + duration (bounded strategies).
🛠️ Suggested Execution
1. Fork the repo and create a branch
git checkout -b feature/duration-boundary-proptests
2. Implement changes
- Tests: extend
tests/proptest_timestamps.rs with boundary and past-start
strategies, plus explicit edge vectors at exactly MAX_VAULT_DURATION.
- Docs: update the "Property Tests for Timestamp Ordering" section of
TESTING_GUIDE.md.
3. Test and commit
- Run
cargo test and regenerate coverage.
- Cover edge cases: duration exactly at max, max+1, start in the past, start ==
now, very large bounded start_offset.
Example commit message
test: property coverage for MAX_VAULT_DURATION boundary in create_vault
✅ Guidelines
- Minimum 95% test coverage on the duration/timestamp branches.
- Clear documentation of the new property strategies.
- 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
tests/proptest_timestamps.rschecks ordering and the duration bound, but theexact
MAX_VAULT_DURATIONboundary (end - start == MAX_VAULT_DURATIONacceptedvs
+ 1rejected withError::DurationTooLong) deserves dedicated, randomizedcoverage around the edge. The
start_timestamp < current_timerejection pathalso lacks property coverage.
🎯 Requirements and Context
duration == MAX_VAULT_DURATIONaccepts and+1rejects withError::DurationTooLong.start_timestamp < ledger.timestamp()rejects withError::InvalidTimestamp.u64overflow in generatedstart + duration(bounded strategies).🛠️ Suggested Execution
1. Fork the repo and create a branch
2. Implement changes
tests/proptest_timestamps.rswith boundary and past-startstrategies, plus explicit edge vectors at exactly
MAX_VAULT_DURATION.TESTING_GUIDE.md.3. Test and commit
cargo testand regenerate coverage.now, very large bounded
start_offset.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.