Human gates
Run and observeSuspend a Run for a person's decision — the form, the review queue, and timeouts.
A human gate is a step that does not run anything: it suspends the Run until a person answers a form. It is how a factory waits for an approval — a deploy, a spend, a publish — without polling or a separate system.
type Verdict = enum { approved, rejected }
step approve:
kind: gate
config: { timeout: "1h", default: { verdict: rejected } }
in: { ticket: start.ticket }
out:
verdict: Verdict
note: text?
The form is the out: ports
A gate's out: declares what the person fills in, expanded with the same rules
as a manual trigger: records become dotted fields, an enum a select, ? makes a
field optional, and a secret is typed into a masked input. The in: values are
the context the form shows — here the ticket being approved.
The resolution becomes the step's outputs, so downstream bindings read them
like any other step's: approve.verdict, approve.note.
Waiting, and the review queue
While a gate is pending the Run is waiting: nothing downstream is enabled and
no other task is claimable. The run page shows the gate with its context and the
form; /api/gates/pending lists every gate waiting on you across your factories,
so a reviewer does not have to hunt for them.
An answer is final: a gate resolves once. A second submission is refused with
409, whichever of two reviewers gets there first.
Timeouts
config.timeout bounds the wait. It is a duration string — 30s, 15m, 2h,
1d, 1w, or segments combined as 1h30m — and it must be positive.
config.default is what the timeout applies: a literal record that must supply
every non-optional out: port (optional ones may be omitted). Without a
default the gate simply stays pending after its deadline — it still waits for a
person, or for the Run to be cancelled — so a timeout alone never invents an
answer.
Cancelling
Stopping a Run cancels the gates it was waiting on; a resolved gate's values are
kept. A secret typed into a gate form is wrapped as a secret, so it is redacted
everywhere it is stored or shown — the gate row keeps the marker, never the
value.
Your factories will appear here. Create one and open it beside this guide.