Skip to content

v0.2.0

Latest

Choose a tag to compare

@obie obie released this 16 Oct 22:00

Macro and protocol mutation, bounded workers and faster repeat runs, from
Mike Hostetler's first community contribution (#1).

  • mix covenant.mutate --macros mutates public and private macro bodies and
    their quoted output. Callers named with --recompile are compiled in the
    order given, before the contract tests; list every direct and transitive
    caller, providers first, since discovery isn't automatic. A caller that
    fails to compile makes the mutant invalid, with no kill credit. A
    --recompile path can't name a mutation target, even through a symlink.
  • Literal defimpl bodies are mutated. Shared implementation and macro owners
    are kept for ownership and survivor matching.
  • Caller and test binaries are restored exactly, and generated and in-memory
    modules are cleaned after the baseline, each mutant and the final check.
  • --max-runtime MS bounds the whole job (default one hour), and SIGTERM
    cancels it. Each verdict is saved atomically, so a failed or cancelled job
    keeps its partial results, and never passes as a complete matrix.
    --max-mutants-per-worker N retires a worker after N verdicts (default 50),
    once the original suite passes on it, and a fresh VM takes the rest.
  • --only runs chosen mutation IDs without renumbering them or claiming full
    coverage. --fail-fast keeps partial credit for kills. --prioritize PATH,
    which requires --fail-fast, tries a test that killed the same mutant in an
    earlier matrix first.
  • --checkpoint and --resume DIR (MIX_ENV=test only) keep only verified,
    completed worker groups, fingerprinted against source, fixtures, config,
    dependencies, BEAMs and options. A resumed run always takes a fresh baseline.
  • --selective-recompile, with --macros, measures compile-time dependencies
    and recompiles only the affected callers.
  • Progress shows the baseline and elapsed worker time. Final reports use
    run-specific temporary files, so concurrent runs don't remove each other's.
  • Cleanup and selective dependency tracing need OTP 27 or later.