Cyclium. Workflow. DAG
(Cyclium v0.1.5)
Copy Markdown
Shared DAG validation for workflow step dependencies.
Used by both the compile-time Workflow DSL and the runtime DynamicWorkflow.Loader to detect circular dependencies.
Summary
Functions
Topological sort of a DAG. Returns {:ok, ordered_list} or {:error, cycle_node}.
Validates that a set of steps forms a valid DAG (no circular dependencies).
Validates step references: all depends_on entries must reference existing step IDs.
Functions
Topological sort of a DAG. Returns {:ok, ordered_list} or {:error, cycle_node}.
Validates that a set of steps forms a valid DAG (no circular dependencies).
Accepts a map of %{step_id => [dependency_ids]}.
Returns :ok or raises with the cycle node.
Validates step references: all depends_on entries must reference existing step IDs.