Review: Email: Local teams — no Monday, first practice Tuesday (re-review)
Verdict: APPROVED
Re-review of board item #764 after refinement. All three issues from review-764-2026-04-03 addressed.
Previous Review Issues — Resolution
- [x] Wrong issue reference #281 — FIXED: body now references #312 throughout (Constraints, Related)
- [x] Hardcoded team IDs 6/7 — FIXED: AC #3 now reads "teams where name contains 'Local' (query DB, do not hardcode team IDs)". Constraints section explicitly states "Query teams by name pattern (LIKE '%Local%'), NOT hardcoded team IDs"
- [ ] Missing arch note arch-basketball-api — acknowledged non-blocking backlog item. Still missing. [SCOPE] retained below.
Template Completeness
- [x] Type — Feature
- [x] Lineage — Standalone
- [x] Repo — forgejo_admin/basketball-api
- [x] User Story — clear who/want/why
- [x] Context — sufficient background (which teams, which venue, which dates, why the exception)
- [x] Environment — present (prod namespace, gmail-sdk)
- [x] File Targets — specific files with modify/not-touch guidance, conditional dependency on #312 noted
- [x] Acceptance Criteria — 5 testable criteria
- [x] Test Expectations — present with run command
- [x] Constraints — dependencies, patterns, test_email gate, LIKE query pattern
- [x] Checklist — present
- [x] Related — present, correct #312 reference
Traceability
- [x] story:WS-S7 — "As an admin, I want to send branded email announcements so that parent comms are professional and consistent" — verified on project-westside-basketball user-stories section (stories-admin-list block)
- [ ] arch:basketball-api — arch note MISSING — [SCOPE] Create architecture note arch-basketball-api (non-blocking, backlog item across all basketball-api tickets)
- [x] Forgejo issue — forgejo_admin/basketball-api#313, open
File Targets
- [x]
src/basketball_api/services/email.py— verified: exists, 9 send_* functions, EmailLog pattern. No welcome/local-team functions yet. EmailType enum hasannouncementwhich can be reused. - [x]
src/basketball_api/routes/admin.py— verified: exists, 4 email endpoints (profile-reminder, roster-export, tryout-announcement, jersey-reminder). No welcome-practice endpoint yet. - [x]
src/basketball_api/models.py— correctly listed as NOT to touch. Team model hasnamefield (String(200)) — LIKE '%Local%' query is viable.
Repo Placement
OK — issue filed on basketball-api, all file targets in basketball-api. Single repo. No cross-repo concerns.
Dependencies
- [x] basketball-api#312 (board item #763, backlog) — conditional dependency correctly documented. Issue body says "If #312 is done first, this may just be a targeted send" otherwise "create a standalone function." Both paths are viable.
- [x] gmail-sdk — satisfied, already in use across 9 email functions
- [x] EmailLog table — satisfied, existing pattern
- [x] Team name query — Team.name is String(200), LIKE '%Local%' pattern is viable against the name column
Acceptance Criteria
5 criteria, all verifiable by an agent. Key improvements from v1: AC #3 now uses name-based query instead of hardcoded IDs. test_email param for approval gate is documented in Constraints. EmailType can reuse
announcement or add a new value — agent has discretion.Blast Radius
Low. New endpoint + new email function following existing patterns. 9 existing send_* functions untouched. No downstream consumers affected. Rollback is trivial.
Decomposition Assessment
2 file targets, 1 repo, 5 AC. Estimated agent work: 3-5 minutes. No decomposition needed.
Recommendation
[SCOPE]Create architecture note arch-basketball-api (non-blocking, applies to all basketball-api tickets — backlog item, not a gate for this ticket).
No blocking issues. Ticket is ready for dispatch.