Production engineering
Reveal answer and reasoning
An inbox coordinates one local consumer effect with message identity under the same storage owner. It must bind every value that changes the intended operation, not merely a convenient payload label. This fixture includes both payload and amount in its stored request representation, then updates the SQL effect in that transaction. A compatible replay skips the effect, while incompatible identity reuse is a conflict.
The portable dictionary demonstrates equivalence under one memory owner. Actual SQLite rollback and persisted counts provide stronger local evidence, but neither form of evidence covers an unrelated payment, email or broker transaction.
A recorded message key cannot automatically make an external side effect exactly once. If a handler sends an email outside the database transaction, a crash can leave uncertainty regardless of whether the key was stored before or afterward. Likewise, dropping amount from the equivalence check can convert a changed operation into a false replay. This fixture's canonical representation is a deterministic serialization of its chosen fields, not a universal semantic normalization of arbitrary JSON text.
Whitespace inside the opaque payload can remain meaningful. Identity namespace, retention and key authorization also require explicit contracts beyond the fixed classroom id. Canonical field serialization preserves this chosen request meaning; it does not assert that two arbitrary JSON payload strings with different spacing should be semantically interchangeable.
What a strong answer covers
- The known tuple includes payload and amount; changed amount is not a compatible replay.
- The console effect remains3 after exact replay and conflict.
- The actual inbox and local SQL effect commit or roll back together; remote effects remain separate.
Common pitfall
Deduplicating only a label or claiming that an inbox transaction also covers an unrelated remote side effect.
Follow-up questions
- How should identity be namespaced across producers or tenants?
- What evidence distinguishes rollback before commit from replay after commit?
Self-review
Choose what to revisit. These marks are your own assessment and are separate from lesson completion.