# `MutagenEx.Config`
[🔗](https://github.com/iautom8things/mutagen_ex/blob/v0.2.0/lib/mutagen_ex/config.ex#L1)

Parsed, validated configuration for a single `mix mutagen` invocation.

This struct is the hand-off from `MutagenEx.CLI.parse/1` to the orchestration
pipeline. It holds only **raw user input** plus a few flag-level defaults —
scope target resolution (file paths → modules → MFAs) and test target
resolution (`tag:` / `file:line` expansion) happen in later stages
(`mutagen.scope_resolution`, `mutagen.test_selection`).

Per `mutagen.cli.r1` / `r2`, `scopes` and `tests` accumulate repeated
`--scope` / `--tests` flags in the order the user supplied them. They are
stored as the raw strings the user typed; this stage performs no shape
validation on individual targets (that lives in S3a / S3b — see the
ticket's Out of Scope (intent) notes).

The internal timeout starts at 30_000 ms. The mutant deadline scales with
the measured baseline unless the user supplied a timeout.
`fail_fast` defaults to `true` and applies to mutation runs.
Per `mutagen.cli.r4`, `seed` defaults to 0.
Per `mutagen.cli.r5`, `json_path` is `nil` when output should go to stdout.
Per `mutagen.cli.r10`, `unsafe_json_outside_project` defaults to `false`.
It is set to `true` only when the user explicitly passes
`--unsafe-json-outside-project`, opting out of the default inside-root
check on `--json <path>`.

Per `mutagen.cli.r12`, `max_sites` is the upper bound on enumerated
mutation sites for one run. Defaults to 10_000. Set via `--max-sites`.

Per `mutagen.cli.r13`, `budget_ms` is an optional aggregate wall-clock
budget for the mutation phase in milliseconds. `nil` means unbounded
(the existing per-site `timeout_ms` is still enforced); set via
`--budget-ms`.

Per `mutagen.mutation_pipeline.r15` / `mutagen.json_schema.r10`,
`max_concurrency` controls the per-site parallelism of the mutation
loop. The struct default is `nil`; both the Mix task and the runner
translate `nil` to `1` (fully-serial, v1.0-equivalent). Callers that
have arranged for collision-free input pass `--max-concurrency N`
(N > 1) explicitly. `stream` toggles per-site NDJSON emission to
stdout (default `false`), and `progress` toggles the human-readable
progress feedback on stderr (default `:auto`, which evaluates "is
stdout a TTY?" at run time).

# `t`

```elixir
@type t() :: %MutagenEx.Config{
  boot_timeout_ms: pos_integer(),
  budget_ms: pos_integer() | nil,
  escalate: boolean(),
  escalate_budget_ms: non_neg_integer(),
  escalate_max_files: non_neg_integer(),
  fail_fast: boolean(),
  host_app: boolean(),
  include_host_output: boolean(),
  json_path: Path.t() | nil,
  json_requested: Path.t() | nil,
  json_root: Path.t() | nil,
  max_concurrency: pos_integer() | nil,
  max_sites: pos_integer(),
  progress: :auto | :on | :off,
  scopes: [MutagenEx.Types.scope_target()],
  seed: non_neg_integer(),
  since: String.t() | nil,
  site: String.t() | nil,
  source: boolean(),
  stream: boolean(),
  summary_max: non_neg_integer(),
  summary_path: Path.t() | nil,
  summary_requested: Path.t() | nil,
  test_alias: boolean(),
  tests: [MutagenEx.Types.test_target()],
  timeout_ms: pos_integer(),
  timeout_override: boolean(),
  unsafe_json_outside_project: boolean()
}
```

---

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