HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Modulesydtest-mutation-runtime-0.2.0.0Haskell2010

Test.Syd.Mutation.AugmentedManifest

  • 16 types
  • 13 values

A mutation record augmented with coverage data. Unlike MutationRecord, covering tests are always present (never Nothing).

Constructors

Instances9Eq, Show, Generic, FromJSON, ToJSON, Validity, …
newtypenewtype AugmentedMutationGroup
#

A group of augmented mutation records sharing one operator-at-one-location origin. The runner walks groups concurrently and walks records within a group sequentially; the first failing record in a group skips the remaining records (within-group fail-fast).

Instances9Eq, Show, Generic, FromJSON, ToJSON, Validity, …
newtypenewtype AugmentedManifest
#
Instances11Eq, Show, Generic, Semigroup, Monoid, FromJSON, …

Read and union the augmented manifests from a list of per-package coverage directories. Each directory is a coverage-subcommand output holding augmented/manifest-augmented.json; unioning them with mergeAugmentedManifests combines the per-suite covering_tests so a mutation covered by a test in any package is recorded — including cross-package coverage (a suite in one package covering another package's mutation). The run subcommand (per-library report) and the diff subcommand both consume the per-package coverage this way.

Read and union the per-test baseline timings from the same per-package coverage directories readAndUnionCoverageDirs consumes. Each holds an augmented/baseline.json (absent on older coverage output, treated as empty); the union merges by taking the slowest recorded time for each test. Used to order a mutation child's covering tests cheapest-first.

The slowest-wins merge is TestBaselineMap's Semigroup, chosen so a per-mutation timeout is never under-budgeted. Reusing it here means a test shared across suites is ordered by its slowest recorded time, which only affects ordering quality, never which tests run or the verdict.

30 seconds, used as the floor for per-mutation monotonic-clock budgets and as the initial value when a record is constructed without baseline timing (i.e. before the coverage phase has annotated it). The actual budget is max defaultTimeoutMicros (10 * sum baselines_of_covering_tests).

datadata SurvivedMutation
#

A survived mutation with an optional pointer to the raw child output file.

Constructors

Instances9Eq, Show, Generic, FromJSON, ToJSON, Validity, …
datadata TimedOutMutation
#

A mutation child that exceeded its monotonic-clock timeout and was killed by the parent. Treated as killed for the overall score (a hung mutation is still a broken mutation), but reported separately for visibility.

Constructors

Instances9Eq, Show, Generic, FromJSON, ToJSON, Validity, …
newtypenewtype UncoveredMutation
#

A mutation that was not covered by any test (never executed).

Instances9Eq, Show, Generic, FromJSON, ToJSON, Validity, …
datadata SkippedMutation
#

A mutation that was not tested because an earlier mutation in the same group already failed (survived or was uncovered). The skippedMutationCause points at the id of that earlier mutation.

Instances9Eq, Show, Generic, FromJSON, ToJSON, Validity, …

A control (no-op) mutation that was killed - i.e. the control failed.

A control changes no behaviour, so it must survive. A killed control means the mutation testing is unsound (a flaky or nondeterministic test suite, or a bug in the harness itself), so it fails the run like a survivor rather than being counted as a real kill. Carries the optional child output file, like a survivor, so the report can show what the suite did.

Constructors

Instances9Eq, Show, Generic, FromJSON, ToJSON, Validity, …
datadata MutationOutcome
#

One mutation's outcome within a group.

Constructors

Instances9Eq, Show, Generic, FromJSON, ToJSON, Validity, …
newtypenewtype MutationGroupReport
#

All outcomes for the mutations of one group, in their original order.

Instances9Eq, Show, Generic, FromJSON, ToJSON, Validity, …
datadata MutationTally
#

The score for the normal (non-control) mutations of a run.

mutationTallyKilled includes timed-out mutations: a mutation that turns a loop into one that never ends is one the suite noticed, which is what a kill means, and the overrun is retried first so that a busy machine is not what is being credited. mutationTallyTimedOut is the count of those specifically. mutationTallySkipped counts mutations that were not tested because an earlier mutation in the same group already failed.

Instances9Eq, Show, Generic, FromJSON, ToJSON, Validity, …
datadata ControlTally
#

The score for the control (no-op) mutations of a run. Controls are excluded from MutationTally; a passed control survived as it must, a failed control was killed (the mutation testing is unsound - a flaky/nondeterministic suite or a harness bug - not a real kill, and it fails the run).

Instances9Eq, Show, Generic, FromJSON, ToJSON, Validity, …
datadata MutationRunReport
#

Full JSON report written by the parent mutation process, in three parts: the normal-mutation score (mutationRunReportMutations), the control-mutation score (mutationRunReportControls), and the per-mutation detail (mutationRunReportGroups), which mirrors the manifest's group structure.

Instances9Eq, Show, Generic, FromJSON, ToJSON, Validity, …
datadata RunSoundness
#

Whether a run measured what it set out to measure.

Separate from whether the verdict was good: a run full of survivors is sound, it just says the tests are weak.

Constructors

  • RunSound

    Every control behaved, so the killed/survived split means what it says.

  • RunUnsound

    A control did not, so nothing the run says about the other mutations can be relied on.

Instances4Eq, Show, Generic, Rep

Whether the run's verdict is worth keeping.

A caller that stores a report somewhere it will be read again should ask this first: an unsound run's verdict is about the machine it ran on rather than about the code, so storing it buries a result nobody can reproduce where everybody will keep reading it.

newtypenewtype MutationProgressEvent
#

A mutation that is about to be tested, used as the progress log event.

Instances6Eq, Show, Generic, Validity, GenValid, Rep