Skip to content

rf validate

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 integrate it into CI.

Terminal window
rf validate [options]
FlagDescription
--file <path>Path to the pipeline file. Default: pipeline.rf.yaml.
--format <fmt>Output format: text (default) or json.
CheckDescription
Schema compatibilityOutput port schemas are compatible with connected input port schemas. Field names and types must match.
Cycle detectionThe node graph is a DAG. Circular dependencies are rejected.
Missing referencesEvery ref() points to a node and port that exist.
Type mismatchesA Value output cannot connect to a Table input. Port data types must be compatible.
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 pipeline.rf.yaml...
read-leads OK
score-leads OK
filter-top OK
write-output OK
4 nodes validated. No errors.
Terminal window
$ rf validate
Validating pipeline.rf.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.

Exit code is 0 when validation passes, 1 when errors are found.

Terminal window
$ rf validate
Validating pipeline.rf.yaml...
ERROR Cycle detected: node-a node-b node-c node-a
1 error found.

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

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 to catch errors before merge.

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

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