Relyra.Metadata.FailureClassifier (relyra v1.1.0)

Copy Markdown View Source

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.

Summary

Types

classification()

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

Functions

classify(arg1)

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