Skip to main content

validate_workflow

Function validate_workflow 

Source
pub fn validate_workflow(ir: &WorkflowIr) -> IrResult<()>
Expand description

Validate a WorkflowIr. Returns Ok(()) if valid, Err with the first violation found otherwise.

Validation rules:

  1. workflow_id and version are non-empty; version is valid semver
  2. No duplicate node ids
  3. start_node exists in nodes
  4. All edge targets exist
  5. All nodes are reachable from start_node
  6. All paths from start lead to a terminal node (“end” or a terminal kind)
  7. All tool_ref, model_ref, agent_ref resolve to known definitions
  8. All MCP servers referenced by mcp_tool nodes are configured
  9. All remote agents referenced by a2a_task nodes are configured