You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem Statement
Coverage tests tests/test_collateral_manager_props.py prove the
tests ran but not that they caught a bug. Mutation testing
introduces deliberate bugs and measures how many the test suite
catches (mutation score).
Why It Matters
A calculate_health_ratio mutation that swaps <= with < will
pass a coverage test but kill a liquidatable user. A signature
mutation that skips nonce expiry will pass coverage tests and
open replay attacks.
Expected Outcome mutmut or cosmic-ray runs in a separate CI matrix on a curated
subset of files: quantara/soroban/adapters/CollateralManager.py and quantara/web_app/api/wallet_auth.py. Mutation score > 80% enforced.
Acceptance Criteria
Mutation score report in tests/mutation/<date>.html.
New mutants introduced by hand (operator swaps <= for <, == for is) are caught by the existing test suite.
Implementation Notes
mutmut run --paths-to-mutate quantara/soroban/adapters/CollateralManager.py
mutmut html
Files / Modules Affected
quantara/soroban/adapters/CollateralManager.py
quantara/web_app/api/wallet_auth.py
new .github/workflows/mutation.yml
Dependencies: standalone; pairs with #69 (property-based).
Coverage tests
tests/test_collateral_manager_props.pyprove thetests ran but not that they caught a bug. Mutation testing
introduces deliberate bugs and measures how many the test suite
catches (
mutation score).A
calculate_health_ratiomutation that swaps<=with<willpass a coverage test but kill a liquidatable user. A signature
mutation that skips nonce expiry will pass coverage tests and
open replay attacks.
mutmutorcosmic-rayruns in a separate CI matrix on a curatedsubset of files:
quantara/soroban/adapters/CollateralManager.pyandquantara/web_app/api/wallet_auth.py. Mutation score > 80% enforced.tests/mutation/<date>.html.<=for<,==foris) are caught by the existing test suite.quantara/soroban/adapters/CollateralManager.pyquantara/web_app/api/wallet_auth.py.github/workflows/mutation.yml#69(property-based).