IR projection of a single committed event in the graph's history.

Used by causl-check to drive replay-determinism checks: replaying a captured commit sequence from a captured snapshot must produce a byte-identical model state. If two replays diverge, one of them is wrong — the checker reports the discrepancy with a shrunk minimal counter-example.

interface IRCommit {
    callGraph?: IRCallGraph;
    changedNodes: readonly string[];
    graphId: string;
    intent: string;
    originatedAt?: number;
    originEvent?: string;
    time: number;
}

Properties

callGraph?: IRCallGraph

Bounded call-graph annotation captured at commit-issue time. Optional — exporter omits the field when stack-trace capture is disabled (captureCallGraph: false on the export options). Schema 3 introduces this field; schema-2 IRs that never set it should either omit it or set undefined.

changedNodes: readonly string[]

Node identifiers whose value changed as part of the commit.

graphId: string

Identifier of the graph instance this commit landed on. Required as of schema 3.

intent: string

Human-readable label supplied to graph.commit(intent, …).

originatedAt?: number

For commits issued by graph.hydrate(...), the GraphTime carried by the originating snapshot envelope. undefined (or omitted) on graph.commit(...)-issued records. The engine clock advances by exactly one tick per hydrate (the §3 monotonicity invariant); this field preserves the on-the-wire snapshot label so replay tooling can distinguish hydration events from regular commits without parsing intent.

The optional-or-explicit-undefined typing mirrors the published import('./types.js').Commit.originatedAt surface (#760): the engine's in-memory IRCommit row always-sets the slot to keep the V8 hidden class stable, while serialized exports may still omit the key on regular commits.

originEvent?: string

Lineage to the IRSubscribeCallback or other event that initiated this commit. Optional and presence-discriminating: a commit with originEvent set was emitted from a callback frame (an EPIC-2 CommitFromSubscribe candidate); a commit without was user-initiated. The string value is the id of the originating event in CauslModel.events. PR-B1 reserves the field on the wire and exports it as undefined until the engine gains in-callback commit instrumentation.

time: number

GraphTime at which the commit landed.