Skip to content

Graphorin API reference v0.7.0


Graphorin API reference / @graphorin/core / / CheckpointPutOptions

Interface: CheckpointPutOptions

Defined in: packages/core/src/contracts/checkpoint-store.ts:119

Optional atomicity contract for CheckpointStore.put (D1 / workflow-01). When expectedLatestId is supplied, the store MUST perform the latest-checkpoint comparison and the insert atomically (single transaction / synchronous critical section) and throw CheckpointConflictError on mismatch - closing the TOCTOU window an engine-level read-then-write cannot. null means "expect no checkpoint for this thread yet"; undefined (or a store that ignores the argument) preserves the unguarded legacy behaviour, which the engine backstops with its own pre-check.

Stable

Properties

PropertyModifierTypeDefined in
expectedLatestId?readonlystring | nullpackages/core/src/contracts/checkpoint-store.ts:120