Review: Bug: CI test failures blocking 6 API contract deployments
Verdict: NEEDS_REFINEMENT
Template Completeness
- [x] Type — Bug
- [x] Lineage — references PR #265, blocked issues
- [x] Repo — forgejo_admin/basketball-api
- [x] What Broke — detailed with error output
- [x] Repro Steps — clear
- [x] Expected Behavior — clear
- [x] Environment — Woodpecker CI
- [x] File Targets — present (with caveats, see below)
- [x] Acceptance Criteria — present and testable
- [x] Constraints — clear, appropriate
- [x] Related — present
Traceability
- [x] story:WS-S12 label — "As an admin, I want to manage user accounts (reset passwords, view profiles) so that I can support parents directly" — verified in project-westside-basketball user-stories section
- [ ] story:WS-S12 MISMATCH — [LABEL] WS-S12 is about admin user account management. This bug is about CI test failures in jersey/checkout tests. A better story would be WS-S11 (Stripe checkout sessions) or WS-S18 (jersey ordering email link). Consider changing to story:WS-S11
- [x] arch:basketball-api label — present
- [ ] arch note MISSING — [SCOPE] No arch-basketball-api note found in pal-e-docs. Create architecture note arch-basketball-api for this component.
- [x] Forgejo issue — forgejo_admin/basketball-api#310, open
File Targets
- [x] tests/test_checkout.py — verified on origin/main. Contains TestPlayerIdCheckoutCreateSession with 3 tests using opt_out product. Tests pass opt_out which now returns 422.
- [x] tests/test_dual_auth.py — verified on origin/main. Contains TestJerseyCheckoutDualAuth and TestCheckoutCreateSessionDualAuth with 3 opt_out tests. NOTE: does NOT exist on local main (local checkout is stale on branch 111-player-visibility-api, behind remote by ~20 commits).
- [x] tests/test_jersey.py — verified on origin/main. Contains TestPlayerIdJerseyCheckout with 3 tests passing "option": "opt_out" which now returns 422.
All 9 test names from the issue body match what exists on origin/main. The fix description (change "opt_out" to a valid option like "reversible") is accurate — these tests exercise authorization/player_id logic that does not depend on the jersey option value.
Repo Placement
OK — issue filed on forgejo_admin/basketball-api, fix is in basketball-api test files only. Single repo.
Dependencies
- DUPLICATE BOARD ITEMS: Three other board items describe the same bug:
- The 6 "blocked" issues (#280-#284, #286) are all CLOSED. Their corresponding PRs (#287-#292) are merged to origin/main. The "blocking 6 API contract deployments" claim in the title may be stale.
- #718 "Remove opt-out from jersey ordering options" is in QA column — this is the PR that caused the regression.
Acceptance Criteria
AC is testable and appropriate:
- "All 9 previously failing tests pass" — verifiable with pytest
- "Total test suite: 779 passed, 0 failed" — verifiable but exact count may drift as new tests are added
- "Woodpecker pipeline on main goes green" — verifiable via Woodpecker API
- "ArgoCD deploys the new image" — verifiable via kubectl
Math check: issue says "770 pass, 9 fail" = 779 total, consistent with AC target of 779.
Blast Radius
- westside-app frontend (jersey/+page.svelte: 15 refs, checkout/+page.svelte: 2 refs) still references opt_out. When the opt_out removal reaches production, the frontend will need updating. Out of scope for this ticket but should be tracked.
- tests/test_fix_contradictory_jersey_state.py also references JerseyOption.opt_out — may need updating depending on whether the enum value was removed or just the route was blocked. On current origin/main, the route rejects opt_out but the enum still exists in models.py.
- Rollback is trivial — test-only changes, no production code touched.
Decomposition Assessment
3 file targets, 1 repo, 4 AC, simple find-and-replace pattern (change "opt_out" to "reversible" in 9 test data payloads). Estimated agent time: under 3 minutes. No independent subtasks worth parallelizing. No decomposition needed.
Recommendation
- [SCOPE] DUPLICATE — close this ticket. Board item #733 ("Fix 9 failing jersey/checkout tests") is already in_progress and covers identical scope. Items #731 and #754 are also duplicates in backlog. Recommend: close #760 and #754 as duplicates, remove #731 from board, let #733 be the single tracking item.
- [LABEL] If this ticket is kept despite duplication: change story:WS-S12 to story:WS-S11 — this bug is about jersey checkout test failures, not admin user management.
- [SCOPE] Create architecture note arch-basketball-api for the basketball-api component.
- [BODY] Verify that the 6 "blocked" deployments (#280-#284, #286) are actually still blocked — all 6 issues are closed and their PRs (#287-#292) are merged to origin/main. Update the issue body or title if blockage is resolved.
- [BODY] Add tests/test_fix_contradictory_jersey_state.py to blast radius consideration — it references JerseyOption.opt_out.