Skip to main content

commit_advances_the_checkpoint

Function commit_advances_the_checkpoint 

pub async fn commit_advances_the_checkpoint<F: ProjectionFixture>(
    open: impl AsyncFn() -> F,
) -> RuleOutcome
Expand description

A commit moves the projection’s checkpoint to the position it was given.

The baseline the rest of this family is differential against, and the one rule in it that is not about coupling: it asserts that a commit reported as successful actually advanced something.

Rejects: UncommittedTransactionStore — a commit that returns Ok and makes neither the read-model row nor the checkpoint durable, which is what an adapter does when it executes the batch inside a transaction it never commits. That implementation is not a straw man — PS-1’s MUST is a coupling rather than a progress obligation, so “neither” satisfies the clause through its “or not at all” arm and passes commit_is_atomic_with_the_read_model as one of the two states that rule permits. This is the rule that fails it, and it is the only rule §4.11’s table leaves an em-dash against. Whether the progress obligation joins PS-1 or earns a clause of its own is open and owned elsewhere (.kb/open-questions/ps-1-states-no-progress-obligation.md); the rule is written as §4.11’s table specifies and settles nothing.

The checkpoint is read back through a fresh handle, so a store whose commit is only visible to the connection that made it fails here rather than in the field.

No literal position appears anywhere in the body: the checkpoint is compared against the position the commit was actually given, held in a binding. The specification permits gaps, and a rule that assumes density passes against the reference store and fails a conformant adapter.