Validation #925 — basketball-api#420 — Dedupe Alice Uwamahoro

validation-925 Doc

validation sop-compliance

Validation: Board Item #925 — basketball-api#420

Summary

  • Board item: #925 on board-westside-basketball
  • Ticket: basketball-api#420 — Deduplicate Alice Uwamahoro player+parent rows
  • PR: forgejo_admin/basketball-api#428
  • Merged: 2026-04-10
  • Repo type: API (basketball-api)
  • Environment: prod
  • Verdict: PASS with known debt

What Shipped

Alembic migration 042 deletes player 201 and parent 175 — the stale Alice Uwamahoro submission caused by Gmail dot-normalization bug #418. Migration has dependency guards that refuse to delete if player_teams, orders, or registrations reference the player.

Checks Performed

  • Initial migration run: BLOCKED. Registration row id 185 referenced player 201 — dependency guard correctly refused and the new pod crashlooped. This is the guard working as designed.
  • Manual cleanup by Ava (single transaction):
    DELETE FROM email_log WHERE player_id = 201 OR parent_id = 175;
    DELETE FROM registrations WHERE player_id = 201;
    DELETE FROM players WHERE id = 201;
    DELETE FROM parents WHERE id = 175;
  • Pod restart: Clean after cleanup. PASS.
  • Migration re-run: Migration 042 succeeded on second try (idempotent no-op — rows already gone). PASS.
  • Final state: SELECT COUNT(*) FROM players WHERE name = 'Alice Uwamahoro' = 1. PASS.

Evidence

  • Initial pod crashloop log (guard refusal on registration FK)
  • Manual DELETE transaction executed in prod
  • Post-cleanup pod healthy
  • alembic_version at 042
  • COUNT(*) = 1 for Alice Uwamahoro

Known Debt

The ticket's migration scoped player_teams + orders as dependency guards but missed registrations. The guard correctly caught it (safety design worked) but the scope should have anticipated it. Core goal (one Alice row in prod) is achieved.

Follow-up Required

  • Either (a) file a retroactive scope-lesson ticket against #420 documenting the missing registrations dependency, or (b) enhance migration 042 to include registrations in its dependency guard set for completeness. Low priority since the prod cleanup is done.

Verdict Rationale

PASS with known debt — the deliverable (one Alice Uwamahoro row on prod) is achieved and verified. The migration's dependency guards worked as designed (safely refusing incomplete cleanup), and manual SQL completed the scope. Debt is scoped and tracked as a follow-up.