Created
Jun 24, 05:40
Started
Jun 24, 05:47
Completed
Jun 24, 06:40
DevOps handoff
Type
Bug
Shape
backend
Worktree Slug
geo-blocklist-fail-closed
Repositories
turf-monster
Release Train
—
Branch
feat/geo-blocklist-fail-closed
Pull Request
https://github.com/amcritchie/turf-monster/pull/163Acceptance Criteria
Expected Test Plan
Checks Run
Agent Context
Surfaced by jasper during PR #162 review. The two geo gates fail in OPPOSITE directions when state is undetectable: payments path (Cdp::Catalog#available?) correctly fails CLOSED (country=='US' && subdivision.nil? => false), but the LEGAL blocklist fails OPEN — GeoSetting.blocked?(nil) returns false (app/models/geo_setting.rb:28) and detect_geo_state's rescue (application_controller.rb:354) leaves geo_state nil. So a banned-state user (WA/ID/MT/LA/AZ/HI/NV/CA) can evade the block by forcing detection to fail (VPN to unknown IP, ipinfo outage, 3s timeout). Not introduced by the use_https fix (status quo was always-open) — that's why it's a separate task. FIX direction: make require_geo_allowed (and/or GeoSetting.blocked?) fail CLOSED when geo_country=='US' and geo_state is blank. Author already pins the current open behavior in test/integration/geo_detection_test.rb so it's visible.
Stage Timeline
Who handled each stage, the time it took (measured), and the model / tokens / cost reported (best-effort) — plus who's on it right now. — means the agent didn't report that metric.
Conversation
QA review feedback, agent handoffs, and follow-up notes for this task.
Review cascade: carl[heavy] APPROVE — no residual fail-open (full gate set verified: contests/entries/wallets/cdp all route through geo_blocked?), blank-US branch reachable, no over-blocking (CO + non-US pass), kill-switch intact, current is find_or_initialize_by so no stale-read. shannon[light] APPROVE — kill-switch holds, CO positive control real, scope tight. Non-blocking nits (deferred): reorder geo_blocked? cheap-checks before enforcing? DB hit; add non-US+blank test.
QA-deployed on rel-20260624-a59e5f @ qa.turfmonster.media (turf v24 @ 8ba6370, /up 200, geo/check resolves CO). Fail-closed governed by GeoSetting.enforcing? (row enabled). PROD-SHIP DECISION: confirm the prod geo_settings row state deliberately — if enabled, undetectable-US visitors now fail CLOSED (intended); if disabled, neither blocklist nor fail-closed enforces. Pairs with the fix-ipinfo prod GeoSetting verification note. Deferred non-blocking nits in review comment.
SHIPPED to prod (turf-monster-mainnet v108, rel-20260624-a59e5f). Per operator decision, ENABLED the prod geo_settings row post-ship: enabled=true, enforcing=true, banned=[AZ,CO,HI,ID,IA,LA,MO,NE,NV,WA]. Legal blocklist + fail-closed now LIVE on mainnet for money/entry actions.
Sealed-bid sizing
Edit →Alex (PM)
—
Avi (PO)
—
Dev
—
Actual
—
We emailed a one-tap sign-in link to . It expires shortly and can only be used once.
No email? Check spam, or close this and try again.