Failure arm of SimulateResult: the simulated transaction would have escaped commit with a typed engine error.

The error is one of the structured CauslError subclasses — CycleError, NotAnInputNodeError, UnknownNodeError, NodeDisposedError, StaleTxError, or any other engine-emitted typed error. Caller branches on instanceof rather than try/catch. A throw out of the user-supplied callback that is not a CauslError is also surfaced through this arm — simulate does not pretend to own the user's exception hierarchy.

interface SimulateResultFailed {
    error: unknown;
    stagedDiff: readonly string[];
    status: "failed";
}

Properties

error: unknown

The error that would have escaped commit. Typed CauslError subclasses are surfaced as-is so callers can instanceof against the canonical taxonomy; non-engine throws from inside the user callback flow through unchanged.

stagedDiff: readonly string[]

Input node ids whose value the staged writes had changed before the throw — useful as a debugging breadcrumb naming the partial write set that closed (for example) a derivation cycle.

status: "failed"

Discriminator tag.