Description
If reinstate may only return to Active, enforce it; if Suspended is allowed, test both outcomes.
Requirements and context
- Single clear rule in code.
- Documentation updated.
Suggested execution
Fork and branch
Fork the repo and create a branch:
git checkout -b fix/reinstate-target-status
Implement changes
- Audit
reinstate_credit_line in lib.rs.
- Add tests for each valid target status.
Test and commit
Run the full test suite, cover edge cases, and include test output plus security notes (assumptions, trust boundaries, failure modes) in the PR description.
Run tests
cargo test -p creditra-credit
Example commit message
fix(credit): clarify reinstate target status rules
Guidelines
-
Minimum 95% line coverage (cargo llvm-cov as documented in the contracts README).
-
Clear documentation (Rust /// doc comments on public items; update docs/credit.md when behavior changes).
-
Timeframe: 96 hours.
-
Optionally run: cargo llvm-cov --workspace --all-targets --fail-under-lines 95 before merge.
Description
If reinstate may only return to
Active, enforce it; ifSuspendedis allowed, test both outcomes.Requirements and context
Suggested execution
Fork and branch
Fork the repo and create a branch:
Implement changes
reinstate_credit_lineinlib.rs.Test and commit
Run the full test suite, cover edge cases, and include test output plus security notes (assumptions, trust boundaries, failure modes) in the PR description.
Run tests
cargo test -p creditra-creditExample commit message
Guidelines
Minimum 95% line coverage (
cargo llvm-covas documented in the contracts README).Clear documentation (Rust
///doc comments on public items; updatedocs/credit.mdwhen behavior changes).Timeframe: 96 hours.
Optionally run:
cargo llvm-cov --workspace --all-targets --fail-under-lines 95before merge.