Compile-time validation and normalization for workflow modules.
This module keeps contract enforcement in one place so the DSL in
SquidMesh.Workflow can remain compact and declarative.
Summary
Functions
Derives workflow retry declarations from per-step retry configuration.
Returns the single workflow entry step for transition-based workflows.
Returns the workflow entry steps or raises when the workflow declaration does not define a valid entry set.
Returns the first step to schedule for runtime dispatch.
Converts trigger declarations into the normalized runtime trigger shape.
Validates a compiled workflow definition and raises a compile error when the declaration is invalid.
Returns the canonical workflow payload contract derived from the trigger set.
Functions
Derives workflow retry declarations from per-step retry configuration.
@spec entry_step!(map(), Macro.Env.t()) :: atom() | nil
Returns the single workflow entry step for transition-based workflows.
Dependency-based workflows return nil because they may declare multiple root
steps instead of one singular entry step.
@spec entry_steps!(map(), Macro.Env.t()) :: [atom()]
Returns the workflow entry steps or raises when the workflow declaration does not define a valid entry set.
@spec initial_step!(map(), Macro.Env.t()) :: atom()
Returns the first step to schedule for runtime dispatch.
Converts trigger declarations into the normalized runtime trigger shape.
@spec validate!(map(), Macro.Env.t()) :: :ok
Validates a compiled workflow definition and raises a compile error when the declaration is invalid.
Returns the canonical workflow payload contract derived from the trigger set.