Expand description
What the step scheduler needs to know about a graph, and the rules a graph with a loop must meet (docs/specs/SPEC_DRONE_GENERAL_AUTOMATION_2026_11_11.md §3.1). Pure: nothing here runs a block.
A graph may hold a cycle, but every cycle must pass through a Condition,
which is the loop’s guard. A guard has max_iterations (1 to 1,000, 25 when
absent), on_cap (end_run, the default, or exit_loop), and optionally
max_cost_usd and max_minutes. Each time a guard sends the run along an
edge that stays inside its cycle that is one more iteration; the scheduler
stops the loop at any cap.
Structs§
- ForEach
Config - A for-each block’s settings (§3.1). The body is one block of the graph, named by id, that has no edges of its own and runs once per item.
- Guard
- A Condition that sits on a cycle.
- Issue
- A reason a graph cannot run, for the author: which block, and what to do.
- Plan
- What the scheduler reads of a graph that passed
analyze.
Enums§
- OnCap
- What happens when a loop reaches its
max_iterations. - OnItem
Error - What a for-each does when one item’s body fails.
Constants§
- DEFAULT_
MAX_ ITEMS - DEFAULT_
MAX_ ITERATIONS - MAX_
ITEMS_ CEILING - MAX_
ITERATIONS_ CEILING - MAX_
TIMEOUT_ 🔒SECONDS - The longest a block may be given to run: a day.
Functions§
- analyze
- Check the graph’s loops and say how the scheduler should run it. A graph with no cycle gets an empty plan.
- check_
block_ 🔒limits - Each block’s own
timeout_secondsandretryare well formed. - check_
foreach 🔒 - Check each for-each: its settings, and that its body is a block of the graph that is not wired into it, is not a for-each, and is not another one’s body.
- check_
joins 🔒 - Each Join is set rightly and has branches to bring together.
- closure 🔒
- Every pair
(u, v)with a path of one edge or more fromutov, following only edges between nodeskeepallows. - cycle_
group 🔒 uand everything on a cycle with it.- foreach_
config - Read and check a for-each block’s settings.
- kind_of 🔒
- names 🔒
- positive 🔒
- read_
guard 🔒 - Read a guard’s settings. Errors are issues, so a bad value is named, not guessed.
- timeout_
seconds 🔒 - A block’s own
timeout_seconds, when it has one: a whole number from 1 to a day. - walk_
back_ 🔒edges - The edges that close a cycle, found by a walk from the blocks nothing leads to, and the blocks that walk never reached.