Skip to main content

fresh_projection_has_no_checkpoint

Function fresh_projection_has_no_checkpoint 

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

A projection the store has never seen reads back as Checkpoint::NeverRun.

PS-38’s second sentence, which is the clause this rule is written against: “a ProjectionId no successful commit has named MUST read as Checkpoint::NeverRun” (spec/SPECIFICATION.md:5831-5847). §4.11 lists the rule against PS-19 as well, because it is the same distinction that clause is about — never run told apart from committed at the first position — asked before any reset has happened; but PS-19’s own MUST stays scoped after a successful reset and does not reach an unseen id, and it says so about itself (:5300-5316). Cite PS-38 here. Between 2026-08-14 and ADR-0030 this rule was held out of the suite for exactly that reason: no clause’s MUST obliged the read, so asserting it would have widened a [FROZEN] clause by test (ADR-0030 is what minted the obligation instead of editing PS-19).

Rejects: PresumedLiveCheckpointStore — a store that resolves a missing checkpoint row with .unwrap_or(Checkpoint::Live { through: FIRST }). The specification names that shape by name, because it is the natural one rather than a contrivance: an adapter whose reset writes an explicit NeverRun row satisfies PS-19’s MUST verbatim and still answers Live for an id nobody has ever committed (spec/SPECIFICATION.md:5666-5682). PS-38 is what makes that store non-conformant rather than merely surprising, and its Rejects field names the wider version of the same defect — a store whose backing state lives per handle rather than per store (:5462-5470).

§The assertion is on the variant

Comparing a checkpoint against any SequencePosition is simultaneously a CF-6 violation and the exact value the defective store writes, so a rule written that way cannot tell the two mutants of this family apart and both walk free. Checkpoint is a three-variant enum precisely so this assertion can be made without naming a position (spec/SPECIFICATION.md:5008-5024).

§Why it spells no capability gate at all

It reads one checkpoint through one handle and writes nothing, so it needs neither a second handle nor a protected projection. A fixture declining every capability still runs it and still passes it, which is correct: the capabilities it declined are not the ones this rule spends.