The Contract Roll State Machine in Elixir
How a production GenServer encodes a four-state machine in three struct fields, drives every transition off a handle_cast, a pattern-matched handle_info clause, and a timeout message, and refuses to resume ambiguous state after a crash rather than guess.
Read next Protecting PII in Elixir Before It Reaches Logs, APIs, and LLMs
