# `Juggernaut.Report.Overview`
[🔗](https://github.com/holsee/juggernaut/blob/v0.4.0/lib/juggernaut/report/overview.ex#L1)

The overview page's data (design notes §11): the recorded verdict, each gate rule with
the recorded score it was judged on and whether the run's recorded failures name it,
the counts and kill kinds, the survivors with the new ones first, the mutants killed only
by integration tests, new ignores, triage claims, reuse and the wall time.

A rule is shown as failed exactly when the run's summary lists a failure for it; the
page never re-judges the gate. The run records thresholds only with its failures, so a
threshold taken from today's configuration instead is marked `:configured`.

# `build`

```elixir
@spec build(Juggernaut.Run.t(), MapSet.t() | nil, Juggernaut.View.options()) :: map()
```

The overview of `run`; `new_keys` from `new_survivor_keys/3`.

# `integration_only`

```elixir
@spec integration_only(Juggernaut.Run.t(), Juggernaut.View.options()) :: [map()]
```

The mutants of `run` killed only by integration tests (`Juggernaut.View.integration_only/2`:
they count as killed), each with its killing test's id.

# `kill_kinds`

```elixir
@spec kill_kinds(map()) :: [%{kind: atom(), count: non_neg_integer()}]
```

Kill kind counts as `[%{kind, count}]` in `Juggernaut.Result.kill_kinds/0` order.

# `new_survivor_keys`

```elixir
@spec new_survivor_keys(
  Juggernaut.Run.t(),
  Juggernaut.Run.t() | nil,
  Juggernaut.View.options()
) ::
  MapSet.t() | nil
```

The keys of `run`'s survivors that `previous` did not list as survivors, or `nil` when
there is no previous run to compare with. Mutants pair by canonical key.

# `rules`

```elixir
@spec rules(Juggernaut.Run.t(), keyword()) :: [map()]
```

The gate rules of `run`, in order: the core rule (when the run has core mutants or a
core failure), the changed rule per non-core file or for the whole run, then every
`no_coverage` and `incomplete` failure. Each has the recorded score, a threshold, its
`threshold_basis` and `passed`.

A rule is failed exactly when the run's summary lists a failure for it, and the page
never re-judges. The run records thresholds only with its failures, so a failed rule
shows the threshold it was judged against (`threshold_basis: :recorded`). A passing
rule takes the threshold a failure of the same rule recorded when there is one, and
otherwise the one in `configured` (today's `.juggernaut.exs`), with
`threshold_basis: :configured`. Whether the changed rule is per file or per run
follows the recorded changed failures, and `configured[:per]` only when there are none.

# `survivors`

```elixir
@spec survivors(Juggernaut.Run.t(), MapSet.t() | nil, Juggernaut.View.options()) :: [
  map()
]
```

The survivors of `run` (`Juggernaut.View.survivors/2`), new ones first (core first
within each group), each with `new` as in `Juggernaut.Report.Data.mutant/5`.

# `thresholds`

```elixir
@spec thresholds(Juggernaut.Run.t(), keyword()) :: %{
  required(atom()) =&gt; %{value: term(), basis: atom()}
}
```

The thresholds the overview shows: for `:core` and `:changed` the one a recorded
failure of that rule names, else the one in `configured`; for `:per` how the recorded
changed failures were judged, else `configured[:per]`. Each is `%{value, basis}` with
`basis` `:recorded` or `:configured`.

---

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