---
title: "Avoid duplicate inbox items for a replayed event"
description: "Verify a prepared duplicate event delivery produces one logical notification when the product contract requires event-id deduplication."
canonical_url: "https://vostride.com/agent-library/notifications/deduplicate-replayed-event.md"
md_url: "https://vostride.com/agent-library/notifications/deduplicate-replayed-event.md"
content_kind: "recipe"
topic: "notifications"
---

# Avoid duplicate inbox items for a replayed event

Verify a prepared duplicate event delivery produces one logical notification when the product contract requires event-id deduplication.

## Risk

Duplicate webhook or queue delivery can create repeated inbox entries. This recipe uses the same event identifier twice, distinguishing replay handling from two legitimate events with similar text.

## Fixtures

- A test event producer can deliver the identical synthetic event identifier twice through an approved fixture interface.
- The application contract deduplicates notification creation by that event identifier for this event type.
- A separate control event uses different identifier but the same display text, and the initial inbox contains neither event.

## Steps

1. Open the fixture inbox and verify no existing entry corresponds to either prepared event identifier.
2. Deliver the first event, verify its inbox item appears, and record the visible notification identity where available.
3. Replay the same event through the fixture producer and wait for both deliveries to complete.
4. Verify the inbox still contains one logical item for that event, corroborated by the prepared event-to-notification inventory.
5. Deliver the same-text control event with its different identifier and verify a second legitimate notification appears.

## Expected results

- Two completed deliveries of the same event yield one stored notification under the specified deduplication rule.
- A different event identifier produces its own notification even when the message text matches.
- The independent inventory links final notification records to the two intended logical events.

## False-pass traps

- Counting by text alone can confuse legitimate same-text events with duplicate delivery.
- Without fixture evidence that the replay reached the consumer, one notification does not establish deduplication.

## Cleanup

- Purge the two synthetic events and their resulting notifications from the isolated test account.

## Use with agent-qa

Adapt this test design to your application's acceptance criteria and configured target using the [recipe execution guide](/agent-library/software-factory/turn-a-recipe-into-an-agent-qa-test.md). External fixture setup and non-UI checks require your own supported hooks or test tooling. Validate the authored test, execute it, and inspect the completed evidence; this recipe is not a recorded test result.

## References

- [agent-qa test](/docs/agent-qa/configuration/test.md)
- [agent-qa first test](/docs/agent-qa/guides/first-test.md)
- [agent-qa web testing](/docs/agent-qa/guides/web-testing.md)

- [Notification QA recipes](/agent-library/notifications.md)
- [Software factory QA library](/agent-library.md)
