Registration snapshot for one flow/job module, as returned by
PgFlow.FlowStarter.module_status/1 and embedded in status/0 results.
Tracks where the module is in the registration lifecycle (:status),
which phase it last executed (registry, worker start, DB notify setup,
notify registration), how many attempts have run, and the classified
last error, if any.
Summary
Types
@type error_class() :: :transient | :permanent
@type phase() :: :registry | :worker | :notify_db | :notify_register
@type status() :: :pending | :retrying | :succeeded | :failed_permanent
@type t() :: %PgFlow.FlowStarter.ModuleState{ attempts: non_neg_integer(), last_error: nil | %{class: error_class(), phase: phase(), reason: term(), at: DateTime.t()}, module: module(), status: status(), type: String.t(), updated_at: DateTime.t() }