Review: T3: seed team configs + audit player overrides
Verdict: READY
Re-review of board item #774 after refinement. Previous verdict: NEEDS_REFINEMENT (2 issues). Both resolved.
Template Completeness
- [x] Type — Feature
- [x] Lineage — Sub-ticket of westside-contracts#34, wave 2
- [x] Dispatch Gate — explicit gate: wait for #319 + #321 merged and deployed
- [x] Repo — forgejo_admin/basketball-api
- [x] User Story — clear who/what/why for contract rendering system
- [x] Context — Two-part migration described with player-level detail
- [x] Team Config JSON Schema — full schema inlined in issue body (was cross-repo ref, now fixed)
- [x] Player Override JSON Schema — full schema inlined in issue body
- [x] Players Needing Overrides — 12-row table with IDs, names, fees, override specs
- [x] File Targets — Two alembic migration files (NNN placeholders, expected for new files)
- [x] Acceptance Criteria — 9 items, all testable via SQL
- [x] Test Expectations — alembic upgrade/downgrade + spot checks + pytest
- [x] Constraints — content reproduction, stable tournament IDs, custom_notes cleanup rules
- [x] Checklist — PR, tests, no unrelated changes
- [x] Related — parent project, parent issue, arch note, dependencies listed
Traceability
- [x] story:WS-S23 label — "As an admin, I want to configure custom contract terms per player (different fee, tournaments, practice schedule) so that custom deals render correctly without code changes"
- [x] story note verified — found in project-westside-basketball user-stories section (Admin list)
- [x] arch:contracts label — contracts component
- [x] arch note verified — arch-contracts-westside-basketball note exists in pal-e-docs (active, doc type, created 2026-04-04)
- [x] Forgejo issue — forgejo_admin/basketball-api#322, open
File Targets
- [x]
alembic/versions/NNN_seed_team_contract_configs.py— new file. Parent directoryalembic/versions/verified (30+ existing migrations). - [x]
alembic/versions/NNN_set_player_contract_overrides.py— new file. Parent directory verified. - [x] Dependency columns: T1 (#319, PR #335) and T2 (#321, PR #336) are both CLOSED/MERGED. Columns will exist when agent branches from main.
Repo Placement
OK. Issue filed on basketball-api, file targets are in basketball-api. Single repo scope. Source-of-truth file (
westside-contracts/src/routes/contract/[token]/+page.svelte) referenced as read-only input — no cross-repo writes needed.Dependencies
- [x] T1 (basketball-api #319, board #772) — contract_config JSONB column. MERGED (PR #335 closed).
- [x] T2 (basketball-api #321, board #773) — contract_overrides JSONB column. MERGED (PR #336 closed).
- [x] Dispatch gate documented in issue body — explicit "DO NOT dispatch until #319 and #321 are MERGED and deployed."
- [x] Alembic heads: #337 open issue for multiple heads — agent must check
alembic headsand merge if needed.
Acceptance Criteria
9 acceptance criteria. All verifiable via SQL queries after migration runs. Test commands are realistic (alembic upgrade/downgrade + pytest + SQL spot checks). No ambiguous language — each criterion specifies exact data conditions. Agent can verify each programmatically.
Blast Radius
- No existing code references contract_config or contract_overrides yet — net-new columns from T1/T2. Seeding data will not break existing queries.
- Downstream consumers: T5 (#776, page.server.ts merge logic) and T6 (#777, wire components) depend on this data. Tournament IDs seeded here become the contract between basketball-api and westside-contracts.
- Queens schedule overlap: T9 (#811, in QA) fixes Queens practice schedule at the template level (Fri to Wed). T3 seeds Wednesday Granger in contract_config — consistent with T9. No conflict.
- Rollback: Both migrations required to be reversible per AC. Straightforward.
Decomposition Assessment
2 file targets, 1 repo, 9 acceptance criteria. AC count exceeds the 5-item threshold, but:
- Migrations are tightly coupled — team configs define tournament IDs that player overrides reference.
- Work is data entry (JSONB literals in alembic op.execute), not complex logic.
- Estimated agent time: 3-5 minutes. Within the 5-minute rule.
No decomposition needed.
Previous Issues — Resolved
[BODY]FIXED: Cross-repo spec reference removed. JSON schema for team configs and player overrides now inlined directly in issue body with full examples.[BODY]FIXED: Explicit### Dispatch Gatesection added: "DO NOT dispatch until basketball-api#319 and basketball-api#321 are MERGED and deployed."
Recommendation
No action needed. Ticket is ready for dispatch.