Expand description
Shared preconditions for prepare_event: the checks that decide whether an event
may touch a step at all, before anything is folded.
Functions§
- check_
attempt - Reject an event whose
attemptis not the step’s current one:already_terminalfor a past attempt,illegal_transitionfor a future one. - check_
legal - Reject the edge
step.status → event.statuswhen the state machine has no such edge (illegal_transition). - require_
kernel_ state - The kernel state, or
invalid_eventwhen absent (onlystartedmay omit it). - require_
step - The open step the event names, or
unknown_step;illegal_transitionwhen its kind is notkind. - retry_
delay_ ms - The
delay_ms(milliseconds) aretryingevent carries in its payload object;0when there is no payload or nodelay_ms. Errors withinvalid_eventon any other shape. - set_
status - Set the status of an open step; a no-op for an unknown id.