if. The example above reads immutable run input, so
there is no stale-read hazard: ctx.input.deployToProduction is the same value
on every frame of that run. When the condition depends on an upstream task, read
with ctx.outputMaybe(...), coalesce the missing first-frame value, and let the
render loop re-evaluate after the upstream task persists:
Notes
ifre-evaluates every render frame; run input is immutable, and task outputs become visible on later frames after they persist.- Read incomplete upstream outputs with
ctx.outputMaybe()rather thanctx.output(). - Each branch takes one element; wrap multiples in
<Sequence>or<Parallel>. - Unselected branch tasks are absent from the task graph.
<Branch>takes no children; pass branches viathen/else. Writing<Branch>...</Branch>throwsINVALID_INPUT(children would otherwise be silently dropped).