# `Relyra.Metadata.FailureClassifier`
[🔗](https://github.com/szTheory/relyra/blob/v1.1.0/lib/relyra/metadata/failure_classifier.ex#L1)

Pure D-27 classifier. Maps a Phase-21 error-code atom to three flags
that drive the `[:relyra, :saml, :metadata, :auto_refresh, ...]` state
machine and telemetry payload (D-23/D-27).

Transient errors (network/connectivity blips) count toward auto-suspend
and suppress single-blip alerts (`alert_immediately?: false` → host's
`LogAlerts` reference handler suppresses the first occurrence and pages
from the 2nd).

Suspicious errors (signature/parse/validation/drift/corpus failures)
alert immediately and never count toward suspend — they need human eyes,
not silent backoff.

The three flag names match the telemetry payload keys exactly per
RESEARCH Assumption A4 (no key drift between code and docs).

Pure: no I/O, no Ecto, no Repo, no telemetry. The decision is tagged at
emit time so the telemetry payload carries the flags directly.

# `classification`

```elixir
@type classification() :: %{
  transient?: boolean(),
  counts_toward_suspend?: boolean(),
  alert_immediately?: boolean()
}
```

# `classify`

```elixir
@spec classify(atom()) :: classification()
```

---

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