The state machine is the safety mechanism
The challenge
A transaction that can be advanced out of order, released before delivery or cancelled after payment, loses someone real money. The failure is financial, not cosmetic.
The approach
Every transition runs through server actions with the allowed transitions validated on the server and the payload checked with Zod, so an out-of-order request is rejected rather than reaching the state machine.
