# `Mutare.Report.Live`
[🔗](https://github.com/foxbenjaminfox/mutare/blob/v0.2.1/lib/mutare/report/live.ex#L1)

Live progress for the human report.

Progress is written to stderr so stdout remains safe for the final or machine-readable report. An interactive terminal gets a spinner, current mutant, counts, and ETA; pipes and CI logs get plain scrollback. Survivors, timeouts, and harness errors remain visible after the live display advances.

`--verbose` prints a line for every mutant and timing details for each phase. `--quiet` suppresses live progress entirely and takes precedence over `--verbose`.

This module manages the process, output modes, and terminal writes; the text of every line it draws is rendered by `Mutare.Report.Live.Lines`.

# `phase_event`

```elixir
@type phase_event() ::
  :scanning
  | :compiling
  | :baseline
  | :coverage_probe
  | {:running, non_neg_integer()}
  | {:confirming_timeouts, non_neg_integer()}
  | {:compiled, non_neg_integer()}
  | {:baseline_done, non_neg_integer()}
  | {:coverage_done, map()}
  | {:run_config, map()}
  | {:seed_app_build, map()}
  | {:inference_override_declined, map()}
  | {:poison_round, map()}
  | {:macro_poison, map()}
```

# `animating?`

```elixir
@spec animating?(GenServer.server()) :: boolean()
```

Returns whether the reporter is using an animated ANSI status block.

Plain reporters emit persistent lines but do not display the current-mutant
activity line.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `clear`

```elixir
@spec clear(GenServer.server()) :: :ok
```

Clears the current status block without stopping the reporter.

This call is synchronous, so the terminal is clear before subsequent output.

# `color_enabled?`

```elixir
@spec color_enabled?() :: boolean()
```

Returns whether persistent labels may use color.

Any non-empty `NO_COLOR` value disables color. This does not disable ANSI cursor
animation.

# `default_ansi?`

```elixir
@spec default_ansi?(boolean()) :: boolean()
```

Returns whether the default live reporter should draw its ANSI status block for
the detected stderr terminal state.

This is intentionally independent of `IO.ANSI.enabled?/0`: Elixir's flag is
initialized from stdout, but Mutare's live UI is written to stderr.

# `finish`

```elixir
@spec finish(GenServer.server()) :: :ok
```

Stops the status display and clears its terminal lines.

# `phase`

```elixir
@spec phase(GenServer.server(), phase_event()) :: :ok
```

Records a phase transition or detail event.

Phase transitions are `:scanning`, `:compiling`, `:baseline`, `:coverage_probe`,
`{:running, total}`, and `{:confirming_timeouts, count}` (the post-stream
confirmation pass, announced while the phase stays `:running`). Detail events are
verbose-only notes: `{:compiled, ms}`, `{:baseline_done, ms}`, `{:coverage_done,
summary}`, `{:run_config, cfg}` (stashed for the `{:running, total}` label),
`{:seed_app_build, summary}`, and `{:inference_override_declined, info}`.
`{:poison_round, info}` (a compile-poison recovery round) and `{:macro_poison, info}`
(the macro-expansion fallback skipping an inline DSL macro) each leave a permanent
line in every mode, not just verbose. Unrecognised events are ignored.

# `report`

```elixir
@spec report(GenServer.server(), Mutare.Result.t()) :: :ok
```

Records a completed mutant result and updates the progress display.

# `scanned`

```elixir
@spec scanned(GenServer.server(), %{
  done: non_neg_integer(),
  total: non_neg_integer(),
  found: non_neg_integer()
}) :: :ok
```

Updates scanning progress with the processed file count, total file count, and
number of mutants found.

Animated reporters redraw the status block. Plain reporters do not print a line
for each update.

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

Starts the live reporter.

Options:

  * `:device` — output device; defaults to `:standard_error`
  * `:ansi` — enables or disables animation; by default it is enabled when stderr
    is a terminal
  * `:color` — enables or disables colored persistent labels; by default it
    follows animation and `NO_COLOR`
  * `:width` — terminal width; defaults to the detected width or 80
  * `:verbose` — retains a line for every mutant and shows phase details;
    defaults to `false`

# `started`

```elixir
@spec started(GenServer.server(), Mutare.Site.t()) :: :ok
```

Records the mutant currently being tested.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
