footprintjs - v11.2.0
    Preparing search index...

    Interface StageTouches

    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 a touches option; a POLICY-like field on the node, like retry and tags. The built spec carries system only.

    system is a NAME from code ('stripe') — never a value. idempotencyKey is the RULE that makes the key, run ONCE per execution (not per attempt) and handed to every attempt as scope.$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 from runId alone (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 an interrupt() 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.

    interface StageTouches {
        idempotencyKey?: (context: IdempotencyKeyContext) => string;
        system: string;
    }
    Index
    idempotencyKey?: (context: IdempotencyKeyContext) => string

    The 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.

    system: string

    The outside system — a name, 1–128 characters, no control, format or line-separator character.