Re-Review: /play guest checkout route + landing updates
Verdict: READY
Re-review of board item #812 after body fixes addressing two NEEDS_REFINEMENT findings from
review-812-2026-04-03.Previous Findings — Resolved
- [x] [BODY] Undocumented dependency on #39 — FIXED. Lineage section now states "Must merge WITH or AFTER #39 (guest checkout API)." Dedicated Dependency paragraph in Context explains the payload mismatch (
gamertag+emailvstwitch_id+twitch_username). Related section lists#39 — must merge first (guest checkout API). Three separate callouts — dependency is thoroughly documented. - [x] [BODY] Missing migration note for $1 tier CHECK constraint — FIXED. Migration note paragraph documents the exact ALTER TABLE commands needed:
DROP CONSTRAINT ... ADD CONSTRAINT ... CHECK (buy_in_amount IN (100, 1500, 3000, 4500)).
Template Completeness
- [x] Type — Feature
- [x] Lineage — "New primary flow — direct challenge link. Must merge WITH or AFTER #39."
- [x] Repo — forgejo_admin/twitch-2k-wager
- [x] User Story — clear challenger wants frictionless guest checkout
- [x] Context — explains /play route, landing CTA change, dependency on #39, migration strategy
- [x] File Targets — 6 files, all specific with change descriptions
- [x] Acceptance Criteria — 6 testable conditions
- [x] Test Expectations — 3 items including CI pipeline
- [x] Constraints — code exists locally, depends on #39, DB migration needed, no new deps
- [x] Checklist — standard PR/tests/no-unrelated
- [x] Related — project page, story notes, arch note, #39 with ordering note
Traceability
- [x] story:challenger-pay label — Secure Buy-In Payment
- [x] story note verified — challenger-pay listed in project-twitch-2k-wager user-stories table (key: challenger-pay, note: story-twitch-2k-wager-challenger-pay, id 1158)
- [x] arch:dataflow-twitch-2k-wager label — Data Flow: Twitch 2K Wager
- [x] arch note verified — arch-dataflow-twitch-2k-wager (id 1155) exists in pal-e-docs, active
- [x] Forgejo issue — forgejo_admin/twitch-2k-wager#38, open
File Targets
- [x]
src/routes/play/+page.svelte— verified: NEW, 237 lines, tier pills, gamertag + email form, handleCheckout calling /api/checkout with { tier, gamertag, email } - [x]
src/routes/+page.svelte— verified: MODIFIED, clickable tier cards, $1 test tier (dashed red border), gamertag input, checkout form replacing Twitch-login-first CTA - [x]
src/app.css— verified: MODIFIED, .tier-card, .tier-card.selected, tier color vars present - [x]
src/lib/stripe.ts— verified: MODIFIED, $1 test tier (amount: 100, label: "Test Challenge") in TIERS map - [x]
src/lib/types.ts— verified: MODIFIED, BuyInAmount = 100 | 1500 | 3000 | 4500 - [x]
src/lib/schema.sql— verified: MODIFIED, CHECK (buy_in_amount IN (100, 1500, 3000, 4500))
Repo Placement
Correct. Issue filed on forgejo_admin/twitch-2k-wager, all 6 file targets in the same repo. No cross-repo scope.
Dependencies
- [x] Board item #813 / Forgejo issue #39 ("Checkout API: guest flow — gamertag + email") — DOCUMENTED. Issue body states merge order: #39 first or simultaneously. Both items currently in backlog on board-twitch-2k-wager. Dependency is now explicit in Lineage, Context, Constraints, and Related sections.
Acceptance Criteria
6 AC, all individually testable. AC #3 ("Pay $X & Play button calls /api/checkout") depends on #39 being merged for full end-to-end validation, which is now documented. An implementing agent can verify frontend behavior and mock/stub the endpoint for AC #3 if #39 is not yet merged. Testable and complete.
Blast Radius
- $1 test tier is consistent across all three type-system files (stripe.ts, types.ts, schema.sql). No mismatch.
- Schema migration strategy now documented with exact ALTER TABLE commands.
- Landing page CTA change (login-first to gamertag-first) does not break existing authenticated flow — Twitch login preserved as optional.
- Rollback is straightforward — revert branch. No DB schema applied yet.
Decomposition Assessment
6 file targets in 1 repo, 6 AC. Code already written locally — agent work is commit + push + CI. Well under 5 minutes. No decomposition needed.
Recommendation
No action needed. Both previous findings resolved. Ticket is ready for execution.