estimate_audit
Estimate the mutant count and wall-clock time for an audit before running full mutation tests, guiding your decision to audit, downscope, or skip.
Instructions
Cheap pre-flight estimate of how big/long auditing a file will be, WITHOUT running the full mutation test cycle. Returns an approximate mutant count (for Rust, an exact count of the mutants cargo-mutants --list GENERATES — the audit scores fewer, excluding unviable ones as incompetent; a source heuristic for TS/JS/Python/PHP, labeled fidelity:"approx"). Set withTiming:true to also run the test suite once and estimate wall-clock time. Use this before audit_code_resilience to decide whether to audit now, scope down, or skip.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to the source file to estimate, within the workspace. Example: "src/math.ts". | |
| timeoutMs | No | The audit budget in milliseconds this estimate is GRADED against: budgetMs echoes it, and fitsBudget/recommendation compare the estimated time to it. Resolved exactly as audit_code_resilience resolves its own timeoutMs (same argument, config keys, and per-language defaults), so an estimate answers the question for the audit you would actually run. Default: 300000 (5 minutes). Must be <= 2147483647 (the largest delay a timer accepts). Example: 120000. | |
| withTiming | No | When true, run the test suite once to measure a baseline and estimate total wall-clock time (mutants × baseline / concurrency). Default false (count only, no test run). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | Yes | ||
| basis | Yes | ||
| target | Yes | ||
| mutants | Yes | ||
| budgetMs | No | ||
| fidelity | Yes | ||
| language | Yes | ||
| baselineMs | No | ||
| fitsBudget | No | ||
| concurrency | No | ||
| estimatedMs | No | ||
| optimisticMs | No | ||
| upperBoundMs | No | ||
| recommendation | No | ||
| timingConfidence | No |