1.6 KiB
1.6 KiB
id, name, status, depends_on, scope, risk, impact, level
| id | name | status | depends_on | scope | risk | impact | level | |||
|---|---|---|---|---|---|---|---|---|---|---|
| analysis/template-validation | Implement validateTemplate and validatePreconditions | completed |
|
moderate | medium | component | implementation |
Description
Implement the template validation functions that check workflow templates against operation graphs, and the precondition validation that verifies all required inputs are provided by predecessors.
Acceptance Criteria
validatePreconditions(graph: FlowGraph<OperationNodeAttrs, OperationEdgeAttrs>): ValidationError[]— for each node, checks input required fields are provided by predecessor outputs; returnsValidationError[]validateTemplate(template: UNode, operationGraph: FlowGraph<OperationNodeAttrs, OperationEdgeAttrs>): AnyValidationError[]— validates template against operation graph- Template validation checks: (1) all Operation names exist in registry/graph, (2) no cycles in rendered DAG, (3) type compatibility between sequential operations, (4) reachability from start, (5) no orphan nodes
- Template validation is advisory — returns warnings AND errors, never throws
- Both functions follow the "collect all errors" pattern
- Unit tests: valid template returns empty, missing operation, cycle in template, type incompatibility, unreachable nodes, orphan nodes
References
- docs/architecture/analysis.md — validatePreconditions, validateTemplate specifications
- docs/architecture/workflow-templates.md — validation checks
Notes
To be filled by implementation agent
Summary
To be filled on completion