6.8.5 Story tests — rename-tx matrix (atomicity, collisions, races, reclaim/release) + redirect/serve matrix + the rename E2E journey + a11y sweep
Estimate: 30m · Depends on: 6.8.2, 6.8.4
The story-closing verification (Principle #18; the epic-wide journey stays Story 6.7 — do not duplicate).
Vitest (integration, real Postgres): the rename matrix — atomic rewrite over the large seed (every identifier canonical, numbers preserved, one-statement assert via query log, fault-injected rollback leaves zero partial state); the collision matrix (live / other-alias / own-alias reclaim / format / no-op / create-path reservation); race specs (rename ∥ issue-create in both interleavings → only canonical-prefix identifiers; rename ∥ rename → one wins, one gets the typed conflict); the resolution matrix (live / alias-serve / alias-redirect / released-404 / never-existed-404 / chained renames flat-resolve); release semantics (un-reserved + links broken).
Playwright E2E (tests/e2e/project-details.spec.ts): the recipe journey — edit name + avatar (switcher chip updates), change PROD→NIF through the modal (consequence copy asserted), old /issues/PROD-<n> URL lands on NIF-<n> with the canonical URL in the bar, previous-keys shows PROD, revert to PROD reclaims, non-admin sees read-only. a11y: the strict axe sweep over the Details page, the open picker, and both confirm modals.
Acceptance criteria
- Every matrix above is covered and green; the race specs actually interleave (no sequential fakes — the shared-PG harness conventions).
- The E2E journey passes green in CI's Playwright lane; the sweep reports zero violations.
- The Story 6.8 verification recipe runs clean top to bottom;
pnpm test:coveragekeeps all 6.8 files ≥90%.
Context refs
- The Story 6.8 verification recipe — the checklist this automates
- 6.8.1/6.8.2 (the matrices' contracts); 6.8.4 (the surface under test)
tests/integration/+tests/e2e/conventions; the harness/selector memories; the motir-core coverage gate- Story 6.7 (the epic-wide remainder — do not duplicate)