-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
Milestone
Description
Context
Follow-up from #618. Implement mutation testing coverage for the order and trade logic modules — the most critical area in Mostro since it handles real money.
Scope
Target these modules in src/app/:
order.rs— Order creation, validation, state transitionsorders.rs— Order listing, filteringtake_buy.rs— Taking buy orderstake_sell.rs— Taking sell ordersfiat_sent.rs— Fiat sent confirmationrelease.rs— Payment release logiccancel.rs— Order cancellationtrade_pubkey.rs— Trade key managementlast_trade_index.rs— Trade index tracking
Goal
- Run
cargo mutants --file src/app/order.rs --file src/app/take_buy.rs ...on each module - Document baseline mutation score per module
- Kill surviving mutants by writing targeted tests
- Target: >70% mutation score for order/trade modules
Priority Mutants to Kill
- State transition logic (e.g.,
active→pending→success) - Price/amount validation boundaries
- Fee calculation correctness
- Expiration checks
- Double-spend prevention guards
Acceptance Criteria
- Baseline mutation report for each module
- All critical mutants in state transitions killed
- All critical mutants in amount/fee validation killed
- Mutation score documented in PR
- No regression in existing tests
Ref: #618
Reactions are currently unavailable