Validation
All flows MUST pass comprehensive schema validation before execution:
| Validation Type | Requirement | Example | Error Code |
|---|
| Required Fields | All mandatory properties present | name, version, nodes | 1002 - MISSING_REQUIRED_FIELD |
| Type Consistency | Values match declared types | string not number | 1003 - INVALID_TYPE |
| Format Compliance | Strings match specified formats | Email, URL, regex patterns | 1004 - INVALID_FORMAT |
| Range Validation | Numbers within acceptable ranges | timeout: 1000-300000 | 1004 - INVALID_FORMAT |
| Enum Validation | Values from allowed sets | `type: "LLM" | "EMBEDDING"` |
| Validation Type | Requirement | Check Method | Error Code |
|---|
| Unique Identifiers | IDs unique within scope | Duplicate detection | 1005 - DUPLICATE_IDENTIFIER |
| Reference Validity | Variable references resolvable | Symbol table lookup | 1007 - MISSING_DEPENDENCY |
| Dependency Analysis | No circular dependencies | Graph cycle detection | 1006 - CIRCULAR_DEPENDENCY |
| Execution Order | References only previous nodes | Topological sort | 1008 - FORWARD_REFERENCE |
| Provider Compatibility | Nodes match configured providers | Provider registry check | 1007 - MISSING_DEPENDENCY |
| Validation Type | Requirement | Validation Method | Error Code |
|---|
| Input/Output Matching | Node inputs match variable types | Type compatibility check | 1003 - INVALID_TYPE |
| Configuration Consistency | Node configurations valid | Schema validation | 1001 - SCHEMA_VALIDATION_ERROR |
| Resource Requirements | Adequate resources available | System resource check | 2007 - RESOURCE_ERROR |
| Timeout Validity | Reasonable timeout values | Range and context validation | 1004 - INVALID_FORMAT |
Validation continues during execution:
| Validation Step | Purpose | Check | Action on Failure |
|---|
| Variable Resolution | Ensure all variables resolvable | Dependency graph traversal | Abort execution |
| Provider Availability | Verify external services accessible | Health check calls | Queue or fail |
| Resource Allocation | Confirm adequate system resources | Memory, CPU, disk checks | Queue or fail |
| Permission Validation | Verify access rights | Auth token validation | Abort with auth error |
| Validation Step | Purpose | Check | Action on Failure |
|---|
| Output Schema Compliance | Verify node outputs match schema | JSON schema validation | Mark node as failed |
| Type Consistency | Ensure output types correct | Type checking | Log warning, continue |
| Result Sanitization | Clean sensitive data from outputs | Content filtering | Auto-sanitize |
| Resource Cleanup | Verify proper resource disposal | File, connection cleanup | Log warning, force cleanup |