Type: bug · Parent: Epic 6 (MOTIR-326, in_progress) · Discovered in: 6.17.7 (MOTIR-971 / PR #1227) CI
Symptom. The Playwright E2E (reporting-at-scale) CI shard intermittently fails on tests/e2e/epic6-at-scale.spec.ts:133 — "reporting widgets aggregate IN SQL and page their reads — the census carries no row set" — at expect(payloads.length, 'the dashboard issued widget reads').toBeGreaterThan(0) (line 140): the dashboard issued zero widget reads, so the intercepted payload set is empty. Fails on the first run AND the in-spec retry.
Root cause (from the CI Postgres log, timed to the failing test + its retry).
14:15:13 UTC ERROR: duplicate key value violates unique constraint "organization_slug_key"
14:16:07 UTC ERROR: duplicate key value violates unique constraint "organization_slug_key"
The at-scale corpus seed collides on organization_slug_key → the org/project corpus fails to seed → the dashboard has no data → it issues no widget reads → payloads.length === 0. A non-deterministic org-slug collision (or a cross-shard truncation leak) in the at-scale seed, NOT a reporting-widget regression.
Pre-existing + intermittent (not caused by the discovering PR). The same shard failed on main itself at the PR #1218 merge run (27617712678, ~6h before discovery) and PASSED on the two adjacent main runs — an inherited, intermittent main flake. PR #1227's diff (header build-in-public slot + a layout boolean + an i18n key + a component test) touches no reporting / org / seed code. Because PR CI checks out branch-merged-with-main, this flake red-lights EVERY open PR intermittently (the merge-with-main tax in motir-core/CLAUDE.md § E2E).
Fix direction (for the closing subtask). Make the at-scale corpus seed's organization slug collision-proof + shard-isolated — a deterministic unique slug per seed run, and/or add the org root to the truncate helper so a parallel/shared-DB shard can't leak a prior run's org (cf. the new-tenant-root-truncate-helper class). The reporting assertion at :140 is correct — the empty seed is the bug.
Resolution: (open — filled by the fix subtask)