Builds the chart for ONE item. Called once per executed branch, with the
item and its index — close over them, or read the item / index values
seeded into the branch's own scope.
OptionalfailFan-out error policy — the SAME policy the existing parallel fan-out uses.
true = Promise.all (the first failing branch rejects the stage);
omitted/false = best-effort Promise.allSettled (every branch runs; a
failed branch's slot in the results array is undefined).
State key the ordered results array is written to on the parent scope. REQUIRED — a key derived from the stage id could silently overwrite state the chart already owns.
Picks the items to fan out over, from the live scope. Reads here are tracked like any other stage read, so the fan-out's own inputs show up in the trace and in a backward slice.
Hard ceiling on branches per execution. REQUIRED: an unbounded fan-out driven by model output is a resource attack, so there is no default to forget. Extra items do not run — the truncation is recorded, never silent.
Runtime fan-out config — one branch per item, branch COUNT decided at runtime from the payload. Design: docs/design/execution-control.md (D2).
Each branch runs as a generated SUBFLOW (isolated runtime, own commit log, addressable at
<stageId>~<index>in every trace query), which is what makes branches unable to corrupt each other's in-flight state.