Skip to main content

reissued_unconditional_batch_lands_twice

Function reissued_unconditional_batch_lands_twice 

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

An unconditional append has no at-most-once property: a reissue appends a second copy.

ES-24’s first stated limit, and this rule pins a non-guarantee. That is unusual enough to say why: a guarantee whose limits are unstated is read as universal, and callers write retry loops against the adapter they happened to test on. If one adapter deduplicates and another does not, the same retry loop double-charges on one and not on the other, and nothing in either adapter’s CI says so. So duplicate-landing is a MUST here, and a store with natural payload dedup is non-conformant. That is deliberate: a contract whose idempotency varies silently by adapter is worse than one with none.

What it rejects is PayloadDedupStore — a store that hashes (event_type, tags, data) and refuses a duplicate. Not a strawman: a content-addressed store, or one built to be safe under at-least-once ingest, gets that behaviour for free and would ship it as a feature.

The two events are asserted equal as well as counted, which is the non-vacuity anchor: without it a store could satisfy the count by mangling one of them, and the rule would have proved that two rows exist rather than that the same event landed twice.