Skip to main content

rollback_leaves_both_unchanged

Function rollback_leaves_both_unchanged 

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

An explicit rollback leaves the read model and the checkpoint exactly as the last successful commit left them.

PS-8, and the reason rollback stays on the port at all: Rust has no async Drop, so an adapter holding a real transaction has no way to issue ROLLBACK and await its completion from a destructor.

Rejects: UnrolledBackStore — a rollback that releases its connection without issuing ROLLBACK, so the rows the batch carried stay durable while the call reports success. An adapter author who tests only that rollback returned Ok cannot see it.

What it deliberately does not assert. Progress. The checkpoint is compared against what a fresh handle saw before the rollback, not against Live { through: P } — so a store that committed nothing has an unchanged checkpoint here and is rejected by commit_advances_the_checkpoint instead, which is the rule that owns that defect.

The anchoring commit exists so the state being preserved is a recorded state: a rollback that preserves NeverRun preserves nothing anybody could have broken.