MutagenEx.JsonReporter.Report (mutagen_ex v0.2.0)

Copy Markdown View Source

In-memory shape the pipeline assembles before the JSON reporter serialises it.

The struct mirrors the version 2 schema documented in mutagen.json_schema. Every field is nil-able except version (which is implicit in the reporter) and warnings / aborted (which default to empty/false). Per r5, sub-blocks the pipeline never populated stay nil rather than absent — the reporter emits them as JSON null so the schema's shape is the same on success and abort.

Field-by-field

  • :meta — versions, ExUnit seed, and the optional :fail_fast setting. The reporter adds id_scheme on the wire. Always populated by the orchestrator before any phase runs (r5).
  • :scope — list of resolved %MutagenEx.ScopeResolver.Scope{} records or anything with :file, :line_range, :module. Empty list pre-resolution.
  • :tests — %MutagenEx.TestSelector.TestFilter{}-shaped map (:include, :exclude, :files) or nil.
  • :baseline — %{passed, failed, failures} or nil.
  • :coverage — %{covered_lines: %{file => lines}} or nil.
  • :mutation — full mutation block (see mutagen.json_schema.r3 for sub-fields) or nil.
  • :warnings — list of strings. May be empty but never nil.
  • :aborted — boolean. false for full success, true for any pre-completion exit.
  • :abort_reason — string or nil. Populated iff aborted == true.
  • :details — map or nil. Phase-supplied diagnostic context for aborts; emitted as an empty map on success/non-abort documents.
  • :truncated — boolean. true when the run completed only a prefix of the enumerated mutation sites because the aggregate --budget-ms wall-clock was exhausted (per mutagen.cli.r13). The mutation block reflects the partial results; aborted may still be false since a truncated run is a graceful early exit, not an abort.

Summary

Types

t()

@type t() :: %MutagenEx.JsonReporter.Report{
  abort_reason: String.t() | nil,
  aborted: boolean(),
  baseline: map() | nil,
  coverage: map() | nil,
  details: map() | nil,
  include_host_output: boolean(),
  meta: map() | nil,
  mutation: map() | nil,
  rerun_options: map(),
  scope: list() | nil,
  source: boolean(),
  stream_end: boolean(),
  summary: map() | nil,
  summary_max: non_neg_integer(),
  tests: map() | nil,
  truncated: boolean(),
  warnings: [
    String.t() | {atom(), String.t()} | {:host_names, atom(), [term()]}
  ]
}