Expand description
The run record and the scheduler (RFC 0027 §6, §7, §9): a run is a
durable transition log over a workflow’s DAG — per-step {status, attempt, started, finished, output, error}, vars, the start payload, budgets and
the terminal outcome. The scheduler is pure: given a workflow and a run it
names the steps that are ready (all depends_on terminal, when true),
applies step outcomes (on_error routing, goto recovery edges), and
decides the run’s terminal state (finish reached, failed, cancelled, or
stalled — no ready step and no finish).
Structs§
- RunState
- The durable run record (RFC 0025 §3.3
run, RFC 0027 §9). - Start
- How the run started (RFC 0027 §3
run.start). - Step
State - One step’s durable state.
Enums§
- Next
- What the scheduler wants done next.
- RunStatus
- Step
Status
Functions§
- deadline_
passed - Whether the run’s deadline passed.
- env_
view - The
envview (curated, secret-free) the templates see. - render_
spec - Render a step’s spec against the run data (every field, recursively).
- route_
failure - Apply a failed step’s
on_errorpolicy: returns the steps to schedule next (agototarget) orErr(reason)when the run must fail. - schedule
- Compute the ready steps.
whenguards are evaluated overdata; a false guard skips the step (durably) — hence&mut RunState.