Behaviour and compile-time validation helpers for workflow modules.
Workflows are declared with use Hephaestus.Workflow and must expose:
start/0transit/3— static clauses ignore context with_ctx, dynamic clauses use@targets
The Hephaestus.Workflow macro extracts the workflow DAG at compile time,
validates it, and generates helper functions for runtime coordination.
Summary
Functions
Validates the workflow DAG built from the given start target and edges.
Types
Callbacks
Functions
@spec validate!( module(), module() | {module(), map() | struct()}, [edge()], Macro.Env.t() ) :: %{ graph: Graph.t(), predecessors: %{optional(module()) => MapSet.t(module())} }
Validates the workflow DAG built from the given start target and edges.
Checks that the graph is acyclic, all steps are reachable from start,
leaf nodes terminate at Hephaestus.Steps.Done, fan-out branches converge,
context keys don't collide, and step events match transit clauses.
Returns the validated graph and a predecessors map. Raises CompileError on any violation.