Skip to main content

Module run

Module run 

Source
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).
StepState
One step’s durable state.

Enums§

Next
What the scheduler wants done next.
RunStatus
StepStatus

Functions§

deadline_passed
Whether the run’s deadline passed.
env_view
The env view (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_error policy: returns the steps to schedule next (a goto target) or Err(reason) when the run must fail.
schedule
Compute the ready steps. when guards are evaluated over data; a false guard skips the step (durably) — hence &mut RunState.