gatelineAPI reference
interface EngineHealth {
    at: string;
    codeCause?: CodeTreeCause;
    codeHead?: string;
    codeReason?: string;
    codeState?: "paused" | "fresh" | "superseded-pending";
    codeUpgradeBlocked?: boolean;
    commit?: string;
    deferrals?: EngineDeferral[];
    heartbeatMs: number;
    inFlight: number;
    pid: number;
    pushRejections: Record<string, number>;
}

Properties

at: string

ISO timestamp of the last completed reconcile pass.

codeCause?: CodeTreeCause

The monitor's CodeTreeStatus.cause, present only while paused (#222) — what a viewer keys tone on.

codeHead?: string
codeReason?: string
codeState?: "paused" | "fresh" | "superseded-pending"
codeUpgradeBlocked?: boolean

True while a dirty tree is also holding back a clean fast-forward the engine would otherwise restart onto (#222).

commit?: string

Self-supersede (#141): the code tree's oid at process start, the same tree's on-disk HEAD as of the last boundary check, and the drift state between them. All three are optional so old heartbeat files (written before #141) still parse — a viewer reading a stale file from an unupgraded engine just sees no drift signal, not a parse failure. codeState only ever carries these three values: a monitor's internal supersede-confirmed maps to superseded-pending here, since by the time a confirmed heartbeat is written the process is already draining to exit — there is no steady state to report beyond "pending restart". codeReason is set only when codeState === 'paused' and carries the monitor's CodeTreeStatus.reason verbatim, so a viewer can show why the engine paused rather than a generic message.

deferrals?: EngineDeferral[]

What the engine held back on its last pass without writing anything (#97): a self-clearing ceiling — the resource cap, the host spend window — defers a run rather than pausing it, so the run's own record says nothing about why it is not moving. Reported here, at the level the condition lives, so Gatehouse can show a host-level cause as a host-level chip instead of a per-run escalation pointing at a file that contains no such number. Optional so pre-#97 heartbeats parse.

heartbeatMs: number

Configured tick cadence — staleness is measured against it.

inFlight: number

Dispatch jobs in flight when the pass completed.

pid: number
pushRejections: Record<string, number>

Branch → consecutive rejected pushes (Engine.pushHealth, #103).