# Cargo Mutants Configuration for Foxhunt HFT System # This file configures mutation testing for critical system components # Test timeout (seconds) - abort tests that run longer than this timeout = 60 # Minimum test score (percentage of tests that must pass with mutants) minimum_test_score = 80 # Packages to test (focus on critical components) # We prioritize ML, trading engine, and risk management exclude_packages = [ "tli", # Pure client - less critical "data_acquisition_service", # Lower priority "monitoring_service", # Lower priority ] # Files to exclude from mutation testing exclude_files = [ # Generated code "*/proto/*.rs", "*/generated/*.rs", # Test files "**/tests/**", "**/*test*.rs", "**/*_tests.rs", # Benches "**/benches/**", "**/*bench*.rs", # Examples "**/examples/**", # Build scripts "**/build.rs", ] # Exclude specific mutants by pattern exclude_mutants = [ # Don't mutate logging statements "log::", "tracing::", "info!", "warn!", "error!", "debug!", # Don't mutate error messages "anyhow::bail!", "panic!", # Don't mutate test assertions "assert_eq!", "assert_ne!", "assert!", ] # Critical modules that MUST have high mutation score [[critical_modules]] path = "ml/src/ensemble" minimum_score = 90 [[critical_modules]] path = "trading_engine/src/engine" minimum_score = 90 [[critical_modules]] path = "risk/src/var" minimum_score = 85 [[critical_modules]] path = "ml/src/data_loaders" minimum_score = 85 # Test execution options [test_options] # Run tests with optimizations release = false # Run tests in parallel jobs = 4 # Fail fast on first error fail_fast = false # Show output from tests nocapture = true # Mutation strategies [strategies] # Replace arithmetic operators (+, -, *, /) arithmetic = true # Replace comparison operators (<, >, <=, >=, ==, !=) comparison = true # Replace logical operators (&&, ||, !) logical = true # Replace return values return_values = true # Negate conditions negate_conditions = true # Remove function calls remove_calls = false # Too aggressive for production code # Replace constants constants = true # Output configuration [output] # Output format: text, json, or both format = "json" # Output directory directory = "mutation_results" # Generate HTML report html = true # Report verbosity verbose = true