pymutant-mcp 2026-03-09
Harden v1 API contract with zero-survivor gate, changed-only targeting, and runtime project root
83 files · 7,475+ · 1,763-

Add changed-only mutation targeting and zero-survivor gate

2 files changed
  • api.py Added changed-only mode using git diff to target only modified Python files
  • mutation_gate.py New CLI command enforcing zero surviving mutants with round/time/interruption budgets
  • pymutant_run now supports changed_only=true to target only changed Python files from git diff instantiate behavioral
    1 file
    • api.py
  • Added mutation-gate command with max-rounds, max-seconds, and max-interruptions budget controls instantiate behavioral
    1 file
    • mutation_gate.py

Add runtime project root and MCP tools

4 files changed
  • main.py Added pymutant_set_project_root, pymutant_baseline_status, and pymutant_baseline_refresh tools
  • baseline.py Execution-baseline tracking with fingerprint drift detection
  • policy.py Policy gate evaluation for baseline-drop and absolute floor checks
  • trends.py Trend report from score history for drift and regression detection
  • Added nine new MCP tools including rank_survivors, explain_failure, policy_check, trend_report, and suggest_pytest_patch instantiate behavioral
    1 file
    • main.py
  • All MCP tools now return a consistent response envelope with ok, data, error, schema_version, and generated_at fields harden behavioral
    1 file
    • main.py

Reorganize runner into package with helpers split

3 files changed
  • __init__.py New runner package exposing api and helpers submodules
  • api.py High-level run orchestration extracted from monolithic runner.py
  • helpers.py Low-level helpers split from original runner.py
  • Split monolithic runner.py (747 lines) into runner package with api.py and helpers.py decouple architectural
    3 files
    • __init__.py
    • api.py
    • helpers.py

Expand CI with compliance job and mutation gate

2 files changed
  • ci.yml Added compliance job with REUSE lint and codespell; mutation-gate job on push/PR
  • .pre-commit-config.yaml Added schema validation, license check, mutation-sweep, and pytest hooks
  • CI topology split into quality, compliance, mutation-gate, and build jobs with Python 3.11-3.15 matrix harden behavioral
    1 file
    • ci.yml
  • Pre-commit hooks now include license check, JSON schema validation, and manual mutation-sweep harden internal
    1 file
    • .pre-commit-config.yaml

Test suite reorganization and survivor elimination

5 files changed
  • test_helpers.py 458 lines of runner helper tests
  • test_run_api_core.py 409 lines of core API tests
  • test_baseline_state.py 297 lines of baseline state tests
  • test_feature_modules.py 365 lines testing new feature modules
  • test_main_api.py 345 lines of MCP tool integration tests
  • Reorganized flat test files into tests/pymutant/ and tests/repo_verify/ hierarchies qualify internal
    2 files
    • test_helpers.py
    • test_baseline_state.py
  • Removed legacy test files and wrote targeted tests to kill surviving mutants qualify behavioral
    4 files
    • test_runner.py
    • test_main.py
    • test_init.py
    • test_score.py

CI baseline and schema artifacts

3 files changed
  • pymutant-policy-baseline.json Policy baseline with 0.3846 default score floor
  • pymutant-profiles.json Mutation profile with min_score 0.385 and max_drop 0.03
  • baseline-state.schema.json JSON schema for execution baseline state
  • Added six JSON schemas and five CI baseline configs for schema-validated artifact pipeline baseline internal
    2 files
    • baseline-state.schema.json
    • pymutant-policy-baseline.json