Expand description
The dialect-3 workflow model (RFC 0027 §2–§5, §8): a named DAG of steps
beginning at start nodes, parsed from a JSON/YAML document with a strict
per-kind field check (unknown fields are refused — the RFC 0021 §4.1 typo
shield carried over), validated for acyclicity, reachability, finish
reachability, dependency existence, schema well-formedness, CEL
compilation and the caps. The node catalogue is one table (KINDS) —
the validator, the executor and --workflow-schema all read it.
Structs§
- Body
- A nested sub-DAG: the body of
foreach/batch/iterate/subgraph, or one branch ofparallel/race. Body steps depend only on siblings; steps with no dependencies are the entry points; steps nothing depends on are the sinks whose outputs form the body’s result (one sink ⇒ its output; many ⇒ an object keyed by step id). - Concurrency
- Kind
Info - A step kind’s metadata.
- Retry
- State
Decl - One declared run variable.
- Step
- One step (the cross-cutting fields typed; kind fields in
spec). - Workflow
- A parsed, validated workflow.
- Workflow
Limits
Enums§
- OnError
on_errorpolicy.- OnOverflow
- OnReplay
Constants§
- COMMON_
FIELDS - Cross-cutting fields every step may carry (RFC 0027 §5).
- DEFAULT_
FAN_ OUT - Lanes a
foreach/batchuses when the definition does not say. - DIALECT
- The dialect this model speaks.
- KINDS
- The node catalogue (RFC 0027 §4–§5).
implementedmarks the P3 executor subset; the rest arrives with the P4 engine. - MAX_
BATCH_ PARALLEL - MAX_
ID_ LEN - MAX_
ITERATIONS - MAX_
NESTING - MAX_
STEPS - Caps (RFC 0027 §8).
- RAW_
FIELDS - Fields never rendered as templates before execution (expressions the step evaluates itself, and nested definitions).
Functions§
- canonical
- Canonical JSON (sorted keys — serde_json’s Map is a BTreeMap here) for hashing.
- duration_
ms - A duration field:
"30s","5m", bare seconds, or ms as{"ms": n}. - duration_
ms_ opt Some(ms)for a duration field,Nonewhen absent/invalid.- implemented_
kinds - The kinds implemented by this build’s engine.
- is_
raw_ field - kind_
info - parse_
workflow - Parse + validate a dialect-3 document. Errors name every problem.
- valid_
id [a-zA-Z_][a-zA-Z0-9_-]{0,63}.- workflow_
schema - The dialect-3 JSON Schema (
--workflow-schema).