pub async fn dedupe_reaches_identity_without_decoding<F: IngestFixture>(
open: impl AsyncFn() -> F,
) -> Result<RuleOutcome, Violation>Expand description
SY-12: a re-delivery is decided on the event’s identity alone, which the store reaches without decoding a byte of the payload. With SY-11’s store half: a group that was wholly a re-delivery writes no compensation.
Every payload and metadata here is bytes that are not UTF-8 and parse as no codec. One group carries two events from one origin and a third from a second origin whose type, tags, data, metadata and recorded time are byte-identical to the first’s, so only the identity tells them apart, and one compensation event. The first delivery lands all three and the compensation; the same batch again lands nothing, writes no compensation and leaves the log and head as they were; and a batch of one held event and one new one lands exactly the new one.
§Rejects
A store that dedupes on content, which drops the second origin’s
identical fact as though it were the first again; one that decodes a
payload to reach its dedupe key, and skips bytes it cannot parse; and
one that writes a group’s compensation again when the group was a
re-delivery. tests/wrong_ingest_stores.rs carries all three. SY-3’s Rule: line
names this rule since ADR-0108: its redelivery half is SY-3’s assertion.
§Errors
A Violation of SY-12 if the store refuses an ingest, miscounts one,
or holds other than what the three deliveries should leave.