Skip to main content

reissued_batch_conditioned_on_other_events_lands_twice

Function reissued_batch_conditioned_on_other_events_lands_twice 

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

A conditional append whose condition does not match its own events has no at-most-once property either.

ES-24’s second stated limit — the one the clause states in prose and gives no rule. It is the common shape rather than an exotic corner: a decision that reads one thing and writes another, conditioning on CourseCapacityChanged while appending StudentSubscribed, leaves the retry indistinguishable from a first attempt, because nothing the retry wrote is in the set its own condition looks at.

This is the rule that stops a caller reading reissued_conditional_batch_lands_once as “conditional appends are idempotent”. They are not; conditions that match their own events are, and the difference is one line in the caller’s decision model. Callers needing at-most-once here must supply their own dedup in the domain — a natural key in the tags, which is queryable, and not in metadata, which is structurally not.

PayloadDedupStore is the compiled version, and it passes reissued_conditional_batch_lands_once while failing this rule and its sibling — which is exactly the shape of the mistake: an adapter that gets the documented guarantee right and silently extends it.

The condition’s boundary sits above the matching event on purpose. With after at the match this rule would also reject a probe reading after as inclusive, which condition_after_ignores_events_at_the_boundary owns.