# `Juggernaut.Summary`
[🔗](https://github.com/holsee/juggernaut/blob/v0.4.0/lib/juggernaut/summary.ex#L1)

The scored outcome of a run (design notes §10.7, §14.1).

`counts` is keyed by status plus `:mutants` (all mutants), `:timeout` (timeout kills),
`:reused` and `:integration_only` (the kills, as scored, that only an integration test
made: `Juggernaut.Result.integration_only?/1`; they count as killed too). Scores are percentages, `nil` when nothing was scored. `new_ignores`,
`triage_claims` and `weakening` (the tests weakened since a cached result's commit,
`Juggernaut.Cache.Weakening`) are maps with string keys, as they appear in the agent
JSON (§5.2).
`reused.recorded_ms` is the sum of the recorded durations of the reused results: the
only basis on which time saved is ever reported. `timeouts` is the `timeouts` setting
the run was scored with (`nil` for a run recorded before it was kept). `error` is the
message of the infrastructure error that ended a run with exit 3 before its verdict
(`nil` otherwise): such a run is recorded with the phases it got through.

# `failure`

```elixir
@type failure() :: %{
  rule: rule(),
  file: String.t() | nil,
  mutant_id: String.t() | nil,
  score: float() | nil,
  threshold: number() | nil
}
```

# `rule`

```elixir
@type rule() :: :core | :changed | :no_coverage | :incomplete
```

# `t`

```elixir
@type t() :: %Juggernaut.Summary{
  advisory?: boolean(),
  counts: %{required(atom()) =&gt; non_neg_integer()},
  error: String.t() | nil,
  exit_code: 0..3,
  failures: [failure()],
  kill_kinds: %{required(atom()) =&gt; non_neg_integer()},
  new_ignores: [map()],
  reused: %{results: non_neg_integer(), recorded_ms: non_neg_integer()},
  score: %{
    run: float() | nil,
    core: float() | nil,
    files: %{required(String.t()) =&gt; float()}
  },
  timeouts: :killed | :survived | nil,
  triage_claims: [map()],
  verdict: verdict(),
  wall_ms: non_neg_integer(),
  weakening: [map()]
}
```

# `verdict`

```elixir
@type verdict() :: :pass | :fail | :incomplete | :error
```

# `count_keys`

```elixir
@spec count_keys() :: [atom()]
```

The keys `counts` may hold.

# `rules`

```elixir
@spec rules() :: [rule()]
```

Every gate rule a failure can name.

# `verdicts`

```elixir
@spec verdicts() :: [verdict()]
```

Every verdict.

---

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