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.
rf validate [options]Options
Section titled “Options”| Flag | Description |
|---|---|
--file <path> | Path to the pipeline file. Default: pipeline.rf.yaml. |
--format <fmt> | Output format: text (default) or json. |
What it checks
Section titled “What it checks”| Check | Description |
|---|---|
| Schema compatibility | Output port schemas are compatible with connected input port schemas. Field names and types must match. |
| Cycle detection | The node graph is a DAG. Circular dependencies are rejected. |
| Missing references | Every ref() points to a node and port that exist. |
| Type mismatches | A Value output cannot connect to a Table input. Port data types must be compatible. |
| Duplicate node IDs | Every node has a unique slug. |
| Required fields | Nodes have the required type, op, and port declarations. |
| Unknown operations | The op value is a recognized built-in or registered custom operation. |
Example: valid pipeline
Section titled “Example: valid pipeline”$ rf validate
Validating pipeline.rf.yaml...
read-leads OK score-leads OK filter-top OK write-output OK
4 nodes validated. No errors.Example: errors detected
Section titled “Example: errors detected”$ 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.
Example: cycle detection
Section titled “Example: cycle detection”$ rf validate
Validating pipeline.rf.yaml...
ERROR Cycle detected: node-a → node-b → node-c → node-a
1 error found.JSON output
Section titled “JSON output”Use --format json for machine-readable output in CI pipelines.
$ 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}CI integration
Section titled “CI integration”Add validation to your CI pipeline to catch errors before merge.
rf validate --format json || exit 1Pair with rf inspect to review the full graph structure after validation passes.