Skip to main content

Module model

Module model 

Source
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 of parallel/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
KindInfo
A step kind’s metadata.
Retry
Step
One step (the cross-cutting fields typed; kind fields in spec).
Workflow
A parsed, validated workflow.
WorkflowLimits

Enums§

OnError
on_error policy.
OnOverflow
OnReplay

Constants§

COMMON_FIELDS
Cross-cutting fields every step may carry (RFC 0027 §5).
DIALECT
The dialect this model speaks.
KINDS
The node catalogue (RFC 0027 §4–§5). implemented marks 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, None when 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).