Skip to content

rf validate

Terminal window
rf validate [options]

rf validate checks a pipeline definition for structural and type errors without executing any nodes. Run it before rf run to catch problems early, or add it to your CI pipeline.

FlagDefaultDescription
--strictTreat warnings as errors.
--fixAuto-fix common issues (e.g., missing output schemas inferred from upstream).
--schema-onlyCheck only schema compatibility, skip other validations.
--format <fmt>textOutput format: text or json.
Terminal window
$ rf validate
Validating flow.yaml...
read-leads OK
score-leads OK
filter-top OK
write-output OK
4 nodes validated. No errors.

Promotes warnings to errors. Useful in CI to enforce clean pipelines.

Terminal window
$ rf validate --strict
Validating flow.yaml...
read-leads OK
score-leads OK
filter-top WARNING Unused output port 'count' (strict: treated as error)
write-output OK
1 error found.
Terminal window
$ rf validate --fix
Validating flow.yaml...
read-leads OK
score-leads FIXED Added inferred output schema from upstream
filter-top OK
write-output OK
4 nodes validated. 1 fix applied. No errors.

rf validate runs these checks against your flow.yaml:

CheckDescription
Schema compatibilityOutput port schemas are compatible with connected input port schemas. Field names and types must match.
Edge compatibilityA Value output cannot connect to a Table input. Port data types must be compatible.
Cycle detectionThe node graph must be a DAG. Circular dependencies are rejected.
Missing referencesEvery ref() points to a node and port that exist.
Duplicate node IDsEvery node has a unique slug.
Required fieldsNodes have the required type, op, and port declarations.
Unknown operationsThe op value is a recognized built-in or registered custom operation.
Terminal window
$ rf validate
Validating flow.yaml...
read-leads OK
score-leads OK
filter-top ERROR Type mismatch on input 'data':
expected Table, got Value
from ref(score-leads.count)
write-output ERROR Missing reference: ref(transform.result)
node 'transform' does not exist
2 errors found.
Terminal window
$ rf validate
Validating flow.yaml...
ERROR Cycle detected: node-a -> node-b -> node-c -> node-a
1 error found.

Use --format json for machine-readable output in CI.

Terminal window
$ rf validate --format json
{
"valid": false,
"errors": [
{
"type": "type_mismatch",
"node": "filter-top",
"port": "data",
"expected": "Table",
"actual": "Value",
"source": "ref(score-leads.count)"
},
{
"type": "missing_ref",
"node": "write-output",
"port": "data",
"ref": "ref(transform.result)",
"message": "node 'transform' does not exist"
}
],
"nodes_checked": 4
}

Add validation to your CI pipeline:

Terminal window
rf validate --strict --format json || exit 1

Pair with rf inspect to review the full graph structure after validation passes.

CodeMeaning
0Pipeline is valid.
1Errors found.
2Warnings found (only with --strict).