Anchorage API reference
    Preparing search index...

    Interface ExecutionFenceTransition

    interface ExecutionFenceTransition {
        expected: "open" | "migration-locked" | "draining" | "proof-only";
        next: "open" | "migration-locked" | "draining" | "proof-only";
        proofKey?: unknown;
    }
    Index

    Properties

    expected: "open" | "migration-locked" | "draining" | "proof-only"

    The state the caller believes the fence is in.

    next: "open" | "migration-locked" | "draining" | "proof-only"

    The state to move to.

    proofKey?: unknown

    Required when next is 'proof-only'; rejected otherwise.

    unknown rather than string because every caller is a control-plane route holding a parsed JSON body, and #proofKeyFor already validates it against PATH_SAFE_ID_PATTERN and throws InvalidExecutionFenceRequestError on anything else. Typing it string bought nothing and cost something: it made every route write body.proofKey as string, an assertion that is false exactly when the caller sent the wrong thing, so the one input this field exists to police arrived pre-blessed at the type level.