Expand description
Exactly-once / idempotent delivery primitives.
The pipeline issues a monotonic commit token for every page that carries
a bookmark. The token is persisted in the StateStore
value next to the bookmark and committed inside the sink’s own transaction,
so a crash between “sink durably wrote” and “state persisted” is resolved on
resume by skipping pages the sink already committed. See
docs/superpowers/specs/2026-06-09-exactly-once-delivery-design.md.
Structs§
- Guarantee
Inputs - Inputs to
derive_delivery_guarantee— the facts about a concrete source × sink × config combination the derivation keys off.
Enums§
- Delivery
Guarantee - The end-to-end guarantee a pipeline provides for a given source × sink × config combination.
- Delivery
Mode - Delivery guarantee for a pipeline run.
- Effectively
Once Mechanism - The mechanism through which a pipeline achieves effectively-once delivery.
- Replay
Guarantee - How faithfully a
Sourcereplays its record stream when resumed from a bookmark. - Sink
Guarantee - The strongest delivery guarantee a
Sinkcan uphold.
Constants§
- COMMIT_
TOKEN_ SCOPE_ COL - Watermark column holding the pipeline state-key (
{name}::{row_id}). - COMMIT_
TOKEN_ TABLE - Canonical watermark table the SQL sinks UPSERT the commit token into.
- COMMIT_
TOKEN_ TOKEN_ COL - Watermark column holding the latest committed token.
- ICEBERG_
SCOPE_ PROP - Iceberg snapshot summary property names.
- ICEBERG_
TOKEN_ PROP
Functions§
- derive_
delivery_ guarantee - Derive the end-to-end
DeliveryGuaranteea pipeline actually provides. - format_
token - Render a page sequence as a fixed-width, lexicographically-ordered token.
- format_
token_ with_ bookmark - Render a commit token that carries the page’s resume bookmark alongside
the sequence:
"{seq:020}#{bookmark-json}". - parse_
token - Parse the numeric sequence from a token produced by
format_tokenorformat_token_with_bookmark. ReturnsNoneon garbage. - parse_
token_ parts - Parse a stored commit token into
(seq, embedded_bookmark). - unwrap_
state - Unwrap a stored state value into
(bookmark, seq). - wrap_
state - Wrap a bookmark + sequence into the exactly-once state value.