Optional ReadonlyidempotencyThe key rule — a function, so the key belongs to the execution (a constant would make every run one operation).
Its answer must be 1–255 printable ASCII characters with no space (it travels in a request header); anything
else fails the stage with a TypeError that never echoes it.
ReadonlysystemThe outside system — a name, 1–128 characters, no control, format or line-separator character.
A stage that changes something outside the run — a charge, an email, a write to another service (design §3.3, P3). Declared with
.touches(system, { idempotencyKey })or atouchesoption; a POLICY-like field on the node, likeretryandtags. The built spec carriessystemonly.systemis a NAME from code ('stripe') — never a value.idempotencyKeyis the RULE that makes the key, run ONCE per execution (not per attempt) and handed to every attempt asscope.$attempt().idempotencyKey. It must name the OPERATION, so that every retry — and a resume's re-run, and a caller's whole-run retry — sends the same key: derive it from the input (order-${args.orderId}) or from state (getState('orderId')), never fromrunIdalone (it changes on a resume) and never from what a model wrote. The builder refuses a touching stage that may retry with no rule, and the engine refuses aninterrupt()in a keyless touching stage (a resume re-runs it). Under a redaction rule, a key derived from an input that holds a selected value is served as the placeholder (records, hook,UnknownEffectError) — the caller recomputes it from the input it gave to reconcile.