Review: Seed events table with tournament schedule

review-790-2026-04-03 Doc

review ready

Verdict: READY

Template Completeness

  • [x] Type — Feature
  • [x] Lineage — Standalone, retroactive scoping noted
  • [x] Repo — forgejo_admin/basketball-api
  • [x] User Story — present (As a parent visiting the schedule page...)
  • [x] Context — thorough: explains empty events table, hardcoded contract data, retroactive insertion
  • [x] File Targets — explicitly states "No code changes. Data-only operation." with source of truth referenced
  • [x] Acceptance Criteria — 5 criteria, all verifiable
  • [x] Test Expectations — SQL query and visual verification specified
  • [x] Constraints — data must match contracts
  • [x] Checklist — present
  • [x] Related — references westside-basketball project and basketball-api#279 (practice schedule pattern)

Traceability

  • [x] story:WS-S13 label — "As an admin, I want to view and manage the program schedule (practices, tournaments, games) so that I have a single source of truth for all planned activities" — verified in project-westside-basketball user-stories section under Admin (Marcus)
  • [x] story note verified — WS-S13 found in project-westside-basketball user-stories section under both Admin and Coach headings
  • [x] arch:basketball-api label — references basketball-api architecture component
  • [ ] arch note MISSING — no arch-basketball-api note found in pal-e-docs. [SCOPE] Create architecture note arch-basketball-api for the basketball-api component. (Systemic gap across many westside board items — not a blocker for this ticket.)
  • [x] Forgejo issue — forgejo_admin/basketball-api#331, state: open

File Targets

No code changes — data-only operation. Source of truth verified:
  • [x] westside-contracts/src/routes/contract/[token]/+page.svelte — verified: contains all tournament details for both Boys Travel (Kings) and Girls Travel (Queens) contracts
  • [x] Event model exists at basketball-api/src/basketball_api/models.py line 529 — fields: title, event_type, division, start_date, end_date, location, team_id, parent_event_id, opponent, notes
  • [x] Migration 029 creates the events table — verified at alembic/versions/029_add_schedule_tables.py
  • [x] /public/schedule endpoint exists at routes/public.py:191 — returns CombinedScheduleResponse including events

Data Verification Against Contracts

Contract source contains exactly 8 tournament events (3 Kings/boys, 5 Queens/girls):
# Division Tournament Dates Location
1 boys Utah State Invitational April 17-18, 2026 Utah (local)
2 boys Seal Beach (Power 32 Trip 1) May 15-17, 2026 Seal Beach, CA
3 boys Vegas + Championship (Power 32 Trip 2) July 9-19, 2026 Las Vegas / CA
4 girls Utah Girls Invitational April 10-11, 2026 Utah (local)
5 girls Denver (Prep Hoops Trip 1) May 7-10, 2026 Denver, CO
6 girls Mesa (Prep Hoops Trip 2) May 28-31, 2026 Mesa, AZ
7 girls Mighty Five Meltdown June 27-28, 2026 Utah (local)
8 girls Nike EYBL Tournament July 9-13, 2026 Las Vegas, NV
Division enum uses boys/girls (not Kings/Queens) — correct mapping. All event_type values should be tournament.

Repo Placement

OK. Issue filed on basketball-api, data lives in basketball-api's events table. Source of truth (contract text) is in westside-contracts, correctly referenced as read-only context.

Dependencies

  • [x] Board item #629 (Schedule data model + migration + seed) — DONE
  • [x] Board item #630 (Schedule API endpoints CRUD) — DONE
  • [x] Board item #653 (Public schedule endpoint) — DONE
  • [x] Board item #739 (Seed practice_schedules table) — DONE, same pattern predecessor
  • No blocking dependencies remain. All prerequisite work is completed.

Acceptance Criteria

All 5 criteria are verifiable:
  • [x] "8 rows in events table" — verifiable via SQL count
  • [x] "Data matches contract text exactly" — verifiable by comparing contract HTML to inserted rows (this review extracted the 8 events above)
  • [x] "/public/schedule API returns all 8 events" — verifiable via curl
  • [x] "Schedule page displays events under correct division" — verifiable via Playwright screenshot
  • [x] "Verified visually via Playwright screenshot" — standard visual validation
Criteria are clear and testable. Since this is retroactive (data already inserted), validation is the primary remaining work.

Blast Radius

Low. Data-only insertion into an existing table. No schema changes, no code changes. The /public/schedule endpoint and admin schedule views already handle event rendering. The only risk is incorrect data (wrong dates, missing events) which the acceptance criteria address. Rollback is trivial: DELETE FROM events WHERE id IN (...).

Decomposition Assessment

No decomposition needed.
  • Discrete changes: 1 (data insertion, already applied)
  • Repos touched: 1 (basketball-api, data only)
  • Acceptance criteria: 5 (under threshold)
  • Estimated agent time: under 5 minutes (validation only — data already in prod)
  • No independent subtasks to parallelize

Recommendation

  • [SCOPE] Create architecture note arch-basketball-api for the basketball-api component. (Systemic gap — not a blocker for this ticket, but needed for traceability across many board items.)
No other actions needed. Scope is solid. Ready for validation.