Skip to main content

query_items_share_one_snapshot

Function query_items_share_one_snapshot 

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

Every item of one Query is evaluated against the same sample.

ES-12, and it is strictly harder than ES-11: an adapter issuing one statement per QueryItem satisfies ES-11 per item and still fails this.

The shape is read_result_is_stable_under_concurrent_append’s with two changes, and both of them are the rule: the query has two items, and the event appended after the leading poll matches the later one. A store evaluating item 1’s statement at the first poll and item 2’s at some later poll picks the new event up in the second statement.

§Why the failure is quieter than a tear looks

The missed event’s position sits below the maximum the read observed. read_decision_model hands that maximum to after_every_guard_opt, and the condition then says “reject if anything matched after P” — which is precisely the instruction to ignore the event that was missed. A torn read does not become a rejected append; it becomes an accepted one.

§The two items carry distinct type lists on purpose

ItemDedupByTypeStore collapses items sharing a type list, so two tag-only items would make it fail this rule at its anchor for a reason query_union_is_item_concatenation already owns. “Alpha” before “Omega” for the matching reason: item order and position order agree, so no ordering mutant is caught here either.

It rejects RefetchingPagedStore, the same store ES-11’s rule rejects — re-sampling per page is re-sampling per item at a different granularity, which is ADR-0011’s finding that ES-12 is discharged by ES-11’s ceiling rather than by a second mechanism. BorrowHoldingStore fails it too, for its own reason.