DocsCliRepair

quell repair

Repair mode is designed for codebases where AI tools (GitHub Copilot, ChatGPT, Cursor) generated your tests. These suites often have high statement coverage but let many mutants survive because they don't assert specific values.

quell repair runs mutation testing internally, finds all survivors, and writes verified killing tests.

Usage

quell repair [TEST_DIR] [OPTIONS]

Arguments

ArgumentDefaultDescription
TEST_DIRtests/Directory containing existing tests

Options

OptionDefaultDescription
--sourcesrc/Source code directory
--show-onlyFalseShow what would be fixed, don't write
--llmNoneLLM provider for UNKNOWN operators
--root, -r.Project root directory

Examples

# Repair tests/ against src/
quell repair

# Show what would be fixed (dry run)
quell repair --show-only

# Custom test and source directories
quell repair tests/unit --source app/

# With LLM for complex mutations
quell repair --llm anthropic

What it does

  1. Checks for an existing .mutmut-cache. If missing, runs mutmut run first.
  2. Reads all survived mutants in the source directory.
  3. For each mutant: generates → verifies → writes (same as quell auto).
  4. Reports score before and after.
Repairing tests/ against src/ ...

  Running mutmut (no cache found)... done in 4m 12s

  Found 31 survived mutants

  [1/31]  BOUNDARY_SHIFT   payments.py:22   ✓ killed → written
  [2/31]  RETURN_MUTATION  auth.py:88       ✓ killed → written
  ...

  ─────────────────────────────────────────
  22 tests written   4 skipped   5 failed
  Score: 52% → 83%  (+31%)

If you have a large project and no existing .mutmut-cache, the initial mutmut run can take 20–30 minutes. Subsequent runs use the cache.

When to use repair vs. fix

Use caseCommand
You have mutation results and want to fix them interactivelyquell fix
You want to auto-fix all survivors without promptsquell auto
You have an AI-generated test suite and want to harden itquell repair
You're in CI and want to enforce a thresholdquell ci