Story: Fix flaky IAM repository tests
Table of Contents
This page documents a story in Sprint 20. It captures the goal, current status, acceptance criteria, and the tasks that compose it.
Goal
IAM repository tests pass consistently on every parallel CI run with no spurious duplicate-key failures. The fix addresses the root cause — not a retry loop or test ordering workaround.
Status
| Field | Value |
|---|---|
| State | DONE |
| Parent sprint | Sprint 20 |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-06-10 |
Acceptance
- CI canary runs 10 consecutive times with no
accounts_email_uniq_idxfailure (manual spot-check after merge). - The fix is in the generation layer — tests themselves need no changes.
Tasks
| Task | State | Start | End | Description |
|---|---|---|---|---|
| Fix email-suffix collision | DONE | 2026-06-10 | 2026-06-10 | Use full-UUID random tail as email suffix; one-line change to account_generator.cpp. |
Decisions
- Fix in generation layer, not in the test fixture. Tests should remain unaware of uniqueness mechanics; the generator must produce unique output unconditionally.
Out of scope
- Broader UUID v7 monotonicity improvements (separate concern).
- Parallelism-related isolation for other entity generators (capture if found).