---
title: "Verify duplicate invitations follow the documented consolidation rule"
description: "Invite the same controlled address twice and inspect role, email delivery, and membership counts to verify the application defined duplicate-invitation behavior."
canonical_url: "https://vostride.com/agent-library/organization-membership/duplicate-invitation-policy.md"
md_url: "https://vostride.com/agent-library/organization-membership/duplicate-invitation-policy.md"
content_kind: "recipe"
topic: "organization-membership"
---

# Verify duplicate invitations follow the documented consolidation rule

Invite the same controlled address twice and inspect role, email delivery, and membership counts to verify the application defined duplicate-invitation behavior.

## Risk

Duplicate invitations can reserve seats twice or introduce conflicting roles. Products may reject the second request or replace the pending invitation; the scenario must assert the configured rule rather than assume a universal merge behavior.

## Fixtures

- A disposable organization and a controlled address with no existing membership or pending invite.
- Two distinct assignable roles and a documented duplicate-invitation policy.
- Hooks that count pending invites, reserved seats, and run-specific invitation deliveries.

## Steps

1. Invite the fixture address with the first role and verify the pending invitation row and one accepted delivery.
2. Submit a second invitation for the same address with the second role and verify the documented rejection or replacement message.
3. Reload the invitation list and inspect the hooks; verify pending-invitation and reserved-seat counts match the consolidation rule.
4. Identify the currently valid invitation from the test inbox and accept it as the controlled recipient.
5. Verify exactly one membership exists and its final role matches the duplicate-invitation policy, with no leftover reservation or second membership.

## Expected results

- Duplicate submission produces the documented reject-or-replace outcome.
- Only one recipient membership is created after acceptance.
- Role assignment and seat reservation agree with the surviving invitation.

## False-pass traps

- Two email messages do not necessarily mean two valid invitations, so inspect invitation state.
- Case or whitespace variations should be tested only if the product explicitly normalizes those address forms.

## Cleanup

- Remove the recipient membership and cancel remaining run-owned invitations or reservations.

## 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 hooks](/docs/agent-qa/guides/hooks.md)
- [agent-qa auth state](/docs/agent-qa/guides/auth-state.md)

- [Organization membership QA recipes](/agent-library/organization-membership.md)
- [Software factory QA library](/agent-library.md)
