By: Tom Sydney Kerckhove <syd@cs-syd.eu>
Add dedicated sydtest-mutation-driver, strip parent flags from sydtest
Today every sydtest test suite is capable of being a mutation parent: its
--help is polluted with --mutation, --mutation-coverage, --mutation-suite-exe,
--mutation-report-dir, etc., and nix/mutationCheck.nix has to hijack the first
test suite's Cabal checkPhase to run the harness from inside the sandbox.
Carve out a new sydtest-mutation-driver package whose single executable is
the only mutation parent. Suite executables keep only the child-side flags
(--mutation-one, --mutation-coverage-one, --mutation-coverage-output,
--mutation-coverage-baseline-output, --mutation-augmented-manifest-dir,
--mutation-suite-name, --mutation-fail-fast) plus the new
--mutation-coverage-list child mode the driver uses to enumerate leaf tests.
The driver is configured by a YAML file rendered by Nix via builtins.toJSON,
covering manifests, the suite-name → {exe, resourceDir} map, child memory
limit, coverage-jobs/retry, and fail-fast. Per-suite resourceDir lets the
driver cd into each suite's source tree before spawning children so golden
files and relative paths resolve.
Side effects:
- sydtest/Test/Syd/MutationMode.hs is now a thin re-export shim over Common
(shared helpers), Single, and the new SingleCoverage submodule.
- runMutationMode and runCoverageMode no longer use getExecutablePath; they
take an explicit child-exe Path Abs File.
- nix/mutationCheck.nix is now a plain stdenv.mkDerivation that renders the
driver config and invokes ${driver}/bin/sydtest-mutation-driver. No more
Cabal checkPhase hijack, no more 'report' second output.
- nix/{compileMutationReport,makeMutationReport,runMutations}.nix deleted;
mutationCheck is the single Nix entry point.
- sydtest-mutation-driver-gen provides GenValid + roundtrip tests for the
config types.
All 103 mutations still die on sydtest-mutation-example; nix flake check
passes.