Task ID: e283ad4b-2308-499d-aeca-ec46bdfd0a81
The Elo arena (KOTH daily tournament) has stalled 70h with no new matches. Two
tournaments (KOTH-neurodegeneration-2026-04-14, KOTH-neuroscience-2026-04-14)
are stuck in_progress with 10 + 7 pending matches respectively.
Root causes identified via code audit (2026-04-12):
11c2b20c promotes proposed -> 'promoted'. But the
hypotheses.status CHECK constraint only allows:
('proposed','debated','funded','investigating','validated','refuted','archived')'promoted' is NOT valid. The UPDATE silently fails (wrapped in
except Exception: pass). 0 hypotheses were ever promoted this way.
post_process.py, the debate-linking block (lines ~1158-1188) inserts into
hypothesis_debates but the UPDATE used a broken WHERE clause:
debate_count < 1 which never fires (default is 1). And status was never set.'proposed' indefinitely.Current state: 338 proposed, 10 debated, 1 archived (before backfill).
142 hypotheses are in hypothesis_debates (debated) but still 'proposed'.
run_domain() checks KOTH-<domain>-<date.today()>. Stuck tournaments frompost_process.py so debate completion sets status proposed -> debated.debated.ci_daily_tournament.py to resume any stuck in_progress tournamentpost_process.py updated: debate-link block sets status='debated' when status='proposed'promote_hypotheses.py backfill script createdci_daily_tournament.py updated: checks for stuck in_progress tournaments and resumesReplace the broken UPDATE ... WHERE debate_count < 1 with:
UPDATE hypotheses
SET status = CASE WHEN status = 'proposed' THEN 'debated' ELSE status END,
last_debated_at = datetime('now'),
origin_type = 'gap_debate'
WHERE id = ?This is safe: only promotes proposed -> debated; leaves funded, investigating,
validated, etc. untouched.
SELECT DISTINCT h.id FROM hypotheses h
JOIN hypothesis_debates hd ON h.id = hd.hypothesis_id
WHERE h.status = 'proposed'
-- UPDATE hypotheses SET status='debated' WHERE id=?When today's tournament is complete/skipped, check for any stuck in_progress
tournament in the same domain and resume it (run rounds + settle + seed tomorrow).
Audit findings:
hypotheses.status CHECK constraint: ('proposed','debated','funded','investigating','validated','refuted','archived')'active', 'reviewed', 'promoted' are NOT valid values for hypotheses.statushypothesis_debates but still 'proposed'in_progress, 10+7 pending matchesci_daily_tournament.py selection uses composite_score only - no status filterpost_process.py lines ~1170-1174: replaced broken debate_count update with status promotionpromote_hypotheses.py: created backfill script at repo rootci_daily_tournament.py: added stuck-tournament resume logic in run_domain(){
"requirements": {
"coding": 8,
"reasoning": 7
},
"completion_shas": [
"3c862c1894338754daf063f4b75a7cb5e7dc382a"
],
"completion_shas_checked_at": "2026-04-13T20:20:31.895444+00:00"
}