Expand description
Configuration validation engine.
§Responsibility
Validate semantic constraints on a parsed PipelineConfig that cannot
be expressed through the type system alone (e.g., range checks, cross-field
invariants).
§Guarantees
- Every validation rule has at least one test that triggers it
- Validation collects all errors before returning (no short-circuit)
- Error messages include the field path and the invalid value
§NOT Responsible For
- Parsing TOML (that belongs to
loader) - File I/O (that belongs to
loader)
§Validation Rules
| Field path | Rule | Error variant |
|---|---|---|
resilience.retry_base_ms | Must be ≤ retry_max_ms | InvalidField |
resilience.retry_attempts | Must be ≥ 1 | InvalidField |
resilience.circuit_breaker_success_rate | Must be in [0.0, 1.0] | InvalidField |
resilience.circuit_breaker_threshold | Must be ≥ 1 | InvalidField |
resilience.circuit_breaker_timeout_s | Must be ≥ 1 | InvalidField |
stages.inference.temperature | If set, must be in [0.0, 2.0] | InvalidField |
stages.inference.model | Must not be blank/whitespace-only | InvalidField |
pipeline.name | Must not be blank/whitespace-only | InvalidField |
pipeline.version | Must not be blank/whitespace-only | InvalidField |
stages.rag.timeout_ms | Must be ≥ 1 when stages.rag.enabled = true | InvalidField |
stages.rag.max_context_tokens | Must be ≥ 1 when stages.rag.enabled = true | InvalidField |
stages.rag.channel_capacity | If set, must be ≥ 1 | InvalidField |
stages.assemble.channel_capacity | Must be ≥ 1 | InvalidField |
stages.post_process.channel_capacity | Must be ≥ 1 | InvalidField |
stages.stream.channel_capacity | Must be ≥ 1 | InvalidField |
deduplication.window_s | Must be ≥ 1 when deduplication.enabled = true | InvalidField |
deduplication.max_entries | Must be ≥ 1 when deduplication.enabled = true | InvalidField |
observability.metrics_port | If set, must be ≥ 1 | InvalidField |
Enums§
- Config
Error - Errors arising from configuration parsing, validation, or I/O.
Functions§
- validate
- Validate all semantic constraints on a
PipelineConfig.