Mealy Machines, Moore Machines, and Why Event Sourcing Works

Most event sourcing tutorials teach developers to store events instead of current state, and stop there. Let's go deeper. Automata theory explains why event sourcing works, what properties transitions need, and what breaks under replay.