Description
supply_cap == 0 means disabled, supply_cap == i128::MAX means unbounded-but-enabled. Lock these semantics with a differential test asserting distinct code paths and event streams.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Relevant code:
src/test_compute_share_invariants.rs
- Test must run both configurations on identical inputs
Suggested execution
- Fork the repo and create a branch
git checkout -b test/supply-cap-boundaries
- Implement changes
- Two fixtures: cap=0 and cap=i128::MAX
- Run identical issuance sequences
- Assert expected event and state differences
- Validate security and correctness assumptions
Test and commit
- Run tests
- Cover edge cases
- Total issuance near i128::MAX
- Include test output and security notes
Example commit message
test: differential test for supply-cap boundaries
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
supply_cap == 0means disabled,supply_cap == i128::MAXmeans unbounded-but-enabled. Lock these semantics with a differential test asserting distinct code paths and event streams.Requirements and context
src/test_compute_share_invariants.rsSuggested execution
git checkout -b test/supply-cap-boundariesTest and commit
cargo test --allExample commit message
test: differential test for supply-cap boundariesGuidelines