Review: Contract shows hardcoded schedule instead of querying practice_schedules
Verdict: READY
Template Completeness
- [x] Type — Bug
- [x] Lineage — Standalone, discovered during contract review
- [x] Repo — forgejo_admin/westside-contracts
- [x] What Broke — detailed description with line numbers
- [x] Repro Steps — clear 3-step repro
- [x] Expected Behavior — query practice_schedules instead of hardcoded values
- [x] Environment — cluster/namespace/service/database specified
- [x] Acceptance Criteria — 6 criteria, all verifiable
- [x] Related — project and file targets listed
Traceability
- [x] story:WS-S28 label — "As a parent, I want to see my child's team practice schedule so I know when and where to take them"
- [x] story note verified — found in project-westside-basketball user-stories section (Parent stories list)
- [x] arch:contracts label — references contract subsystem
- [ ] arch note MISSING — [SCOPE] No
arch-contractsnote found in pal-e-docs. However, contracts is a well-understood component with extensive board history (20+ done items). Acceptable for a bug fix — arch note creation is a separate scope item, not a blocker. - [x] Forgejo issue — forgejo_admin/westside-contracts#49, state: open
File Targets
- [x]
src/routes/contract/[token]/+page.server.ts— verified: exists (46 lines). Currently queries players/teams/parents but does NOT join practice_schedules. Fix location confirmed. - [x]
src/routes/contract/[token]/+page.svelte— verified: exists (725 lines). Hardcoded schedule blocks confirmed at: - [x]
src/lib/types.ts— verified: exists (27 lines). Will need aPracticeScheduleinterface added for the query result type.
Repo Placement
Correct. Issue filed on
forgejo_admin/westside-contracts, fix lives in westside-contracts. The practice_schedules table is owned by basketball-api but westside-contracts connects to the same basketball database (confirmed in src/lib/db.ts). No cross-repo changes needed — this is a read-only query addition.Dependencies
- #739 (done) — "Seed practice_schedules table with Spring/Summer 2026 schedule" — prerequisite data is already seeded.
- #629 (done) — "Schedule data model + migration + seed" — table schema is stable.
- #811 (done) — "T9: fix Queens practice schedule (Fri→Wed)" — previous hardcode fix for the same symptom. This ticket is the proper fix.
- #930 (in_progress) — "Marcus 2026-04-10 batch: 6 contracts + 9 jersey emails" — active contract sends. No conflict: this fix changes rendering, not contract sending.
- No blocking dependencies. All prerequisite work is done.
Acceptance Criteria
6 criteria, all verifiable by an agent:
- AC1: Query in +page.server.ts — grep for
practice_schedulesin the file - AC2: Dynamic {#each} loop — grep for removal of hardcoded schedule-row divs
- AC3: Fallback message — grep for fallback text when no practices found
- AC4-6: Team-specific correctness — requires DB query or runtime check. Agent can verify the SQL joins the correct tables. Runtime validation would need a live environment.
Criteria are testable. AC4-6 are best validated post-merge via the validation pipeline.
Blast Radius
- westside-app also renders schedule data but already queries the API (
/public/scheduleendpoint). No parallel hardcode bug there — westside-app was already fixed in #649 and #757. - The
.schedule-rowand.schedule-dayCSS classes insrc/app.cssare reused by the dynamic rendering. No CSS changes needed. - The
isLocalandisGirlsflags in+page.server.tsare used for other contract sections (fees, tournaments, etc.), not just schedules. The fix should only replace the Practice Schedule sections, leaving other branching logic intact. - No other services hardcode practice schedules.
Decomposition Assessment
3 file targets in 1 repo, 6 acceptance criteria. Estimated agent time: ~3-4 minutes. The work is a single cohesive change (add SQL query + replace 3 template blocks with 1 loop). No decomposition needed.
Recommendation
No action needed. Scope is solid, file targets verified, traceability complete (arch note gap is acceptable for a bug fix). Ready for dispatch.