> ## Continuous-process anchor
>
> This spec describes an instance of one of the retired-script themes
> documented in docs/design/retired_scripts_patterns.md. Before
> implementing, read:
>
> 1. The "Design principles for continuous processes" section of that
> atlas — every principle is load-bearing. In particular:
> - LLMs for semantic judgment; rules for syntactic validation.
> - Gap-predicate driven, not calendar-driven.
> - Idempotent + version-stamped + observable.
> - No hardcoded entity lists, keyword lists, or canonical-name tables.
> - Three surfaces: FastAPI + orchestra + MCP.
> - Progressive improvement via outcome-feedback loop.
> 2. The theme entry in the atlas matching this task's capability:
> EX1 (pick the closest from Atlas A1–A7, Agora AG1–AG5,
> Exchange EX1–EX4, Forge F1–F2, Senate S1–S8, Cross-cutting X1–X2).
> 3. If the theme is not yet rebuilt as a continuous process, follow
> docs/planning/specs/rebuild_theme_template_spec.md to scaffold it
> BEFORE doing the per-instance work.
>
> **Specific scripts named below in this spec are retired and must not
> be rebuilt as one-offs.** Implement (or extend) the corresponding
> continuous process instead.
ID: 607558a9-0f9 Priority: 91 Frequency: daily Status: open
Run a daily King of the Hill tournament: select top 20 hypotheses by Elo rating, create new tournament round, run judge pairings using info_gain pairing algorithm (best for warm-start / existing Glicko-2 history), settle results, update Elo/market prices. Uses: tournaments.py start_tournament(), advance_to_next_round(), arena_cli.py settle. See /arenas page for leaderboard. Log results to spec. Spec: docs/planning/specs/q-evolutionary-arenas_spec.md
Discovery: The Arenas CI task hadn't run today. Two in-progress tournaments from 2026-04-06 (t-09de86b5bd8c, t-ca5430124881) were found. Completed t-09de86b5bd8c (was at round 4/5) by running arena_cli.py tournament run.
Root cause identified: judge_arena.py was using claude -p CLI for LLM judging, but the OAuth token had expired. This caused all tournament matches to fail silently (judge errors were swallowed, tournaments settled with 0 scores).
Fix applied: Modified judge_arena.py to use anthropic.AnthropicBedrock(aws_region="us-west-2") instead of the claude -p subprocess. Added _BEDROCK_MODELS map for model name resolution (haiku/sonnet/opus → Bedrock model IDs). Tested: Bedrock judging works correctly.
Today's tournament (2026-04-07):
t-0d0e0c7e81bc with top 20 hypotheses by Elo ratingrun_debates_coverage.py process holding 64 connections to the SQLite SciDEX DB; WAL checkpoint blocked with 53K pages (pre-PG-migration))in_progress; remaining round 3 matches to be settled by next CI runjudge_arena.py Bedrock fix + tournament completed.Verification: All 46 tests pass (test_arena_phase_c.py, test_ci_daily_tournament.py, test_swiss_pairing_info_gain.py).
Tournament status: All three daily tournaments for 2026-04-07 already complete:
Verification: All 46 tests pass (test_arena_phase_c.py, test_ci_daily_tournament.py, test_swiss_pairing_info_gain.py).
Tournament status: All three daily tournaments for 2026-04-07 already complete (KOTH-alzheimers, KOTH-neurodegeneration, KOTH-neuroscience). Arena leaderboard top: h-var-6612521a02 (Elo=2112, 11-0-0).
API status: 132 analyses, 308 hypotheses, 688K+ edges. System healthy.
Verification: All 46 tests pass (test_arena_phase_c.py, test_ci_daily_tournament.py, test_swiss_pairing_info_gain.py).
Tournament status: All three daily tournaments for 2026-04-07 complete (KOTH-alzheimers-2026-04-07, KOTH-neurodegeneration-2026-04-07, KOTH-neuroscience-2026-04-07). Tomorrow's tournaments (2026-04-08) pre-seeded and ready (3 × open). Arena leaderboard top: h-var-6612521a02 (Elo=2112, 11-0-0).
API status: 132 analyses, 308 hypotheses, 688K+ edges. System healthy.
Verification: All 46 tests pass (test_arena_phase_c.py, test_ci_daily_tournament.py, test_swiss_pairing_info_gain.py).
Tournament status: All three daily tournaments for 2026-04-07 complete (KOTH-alzheimers-2026-04-07, KOTH-neurodegeneration-2026-04-07, KOTH-neuroscience-2026-04-07). Tomorrow's tournaments (2026-04-08) pre-seeded and open (3 × open, ready to run). Arena leaderboard top: h-var-6612521a02 (Elo=2112, 11-0-0).
API status: 132 analyses, 308 hypotheses, 688K+ edges. System healthy.
Verification: All 46 tests pass (test_arena_phase_c.py, test_ci_daily_tournament.py, test_swiss_pairing_info_gain.py).
Tournament status: All three daily tournaments for 2026-04-07 complete (KOTH-alzheimers-2026-04-07, KOTH-neurodegeneration-2026-04-07, KOTH-neuroscience-2026-04-07). Tomorrow's tournaments (2026-04-08) pre-seeded and open (3 × open, ready to run). Arena leaderboard top: h-61196ade (Elo=2120, 8-0-0), h-var-6612521a02 (Elo=2112, 11-0-0).
API status: 132 analyses, 308 hypotheses, 688K+ edges. System healthy.
Verification: All 46 tests pass (test_arena_phase_c.py, test_ci_daily_tournament.py, test_swiss_pairing_info_gain.py).
Tournament status: All three daily tournaments for 2026-04-07 complete (KOTH-alzheimers-2026-04-07, KOTH-neurodegeneration-2026-04-07, KOTH-neuroscience-2026-04-07). Tomorrow's tournaments (2026-04-08) pre-seeded and open (3 × open: t-45bff5607b2b, t-62f10bf7a05f, t-339eadf14777, ready to run). Arena leaderboard top: h-var-6612521a02 (Elo=2112, 11-0-0), h-var-55da4f915d (Elo=1850, 8-2-0).
API status: 133 analyses, 308 hypotheses, 688K+ edges. System healthy.
Verification: All 46 tests pass (test_arena_phase_c.py, test_ci_daily_tournament.py, test_swiss_pairing_info_gain.py).
Tournament status: All three daily tournaments for 2026-04-07 complete (KOTH-alzheimers-2026-04-07, KOTH-neurodegeneration-2026-04-07, KOTH-neuroscience-2026-04-07). Tomorrow's tournaments (2026-04-08) pre-seeded and open (3 × open: t-45bff5607b2b, t-62f10bf7a05f, t-339eadf14777, ready to run).
Arena leaderboard top: h-61196ade (Elo=2121, 8-0-0), h-var-6612521a02 (Elo=2112, 11-0-0).
API status: 134 analyses, 308 hypotheses, 688K+ edges. System healthy.
Verification: All 46 tests pass (test_arena_phase_c.py, test_ci_daily_tournament.py, test_swiss_pairing_info_gain.py).
Tournament status: All three daily tournaments for 2026-04-07 complete (KOTH-alzheimers-2026-04-07, KOTH-neurodegeneration-2026-04-07, KOTH-neuroscience-2026-04-07). Tomorrow's tournaments (2026-04-08) pre-seeded and open (3 × open: t-45bff5607b2b, t-62f10bf7a05f, t-339eadf14777, ready to run).
Arena leaderboard top: h-var-6612521a02 (Elo=2112, 11-0-0), h-var-55da4f915d (Elo=1850, 8-2-0).
API status: 134 analyses, 308 hypotheses, 688K+ edges. System healthy.
Verification: All 46 tests pass (test_arena_phase_c.py, test_ci_daily_tournament.py, test_swiss_pairing_info_gain.py).
Tournament status: All three daily tournaments for 2026-04-07 complete. Tomorrow's tournaments (2026-04-08) pre-seeded and open (t-45bff5607b2b, t-62f10bf7a05f, t-339eadf14777).
Wiki fix: Fixed escape_label in add_mermaid_wiki_entities.py to replace Greek unicode (α→alpha, β→beta, etc.) and strip brackets/parens to prevent unbalanced-paren mermaid errors. Previously-stuck pages (proteins-pgc-1a-protein, clinical-trials-nct07094516, UPenn trials) now generate valid diagrams. Added 17 more pages this run.
Mermaid coverage: 7,930+/17,399 pages (~45%) with diagrams.
API status: 134 analyses, 308 hypotheses, 688K+ edges. System healthy.
Verification: All 46 tests pass (test_arena_phase_c.py, test_ci_daily_tournament.py, test_swiss_pairing_info_gain.py).
Tournament status: All three daily tournaments for 2026-04-07 complete (KOTH-alzheimers-2026-04-07, KOTH-neurodegeneration-2026-04-07, KOTH-neuroscience-2026-04-07). Tomorrow's tournaments (2026-04-08) pre-seeded and open (t-45bff5607b2b, t-62f10bf7a05f, t-339eadf14777).
Arena leaderboard top: h-61196ade (Elo=2121, 8-0-0), h-var-6612521a02 (Elo=2112, 11-0-0).
Wiki enrichment: Added 120 mermaid diagrams to wiki pages (8,103 → 8,223 pages with diagrams, 47.3% coverage). Covered: clinical trials (CBD/AD, FTLD, psilocybin, tocotrienols, xenon gas), diagnostics, entities, genes (CACNA2D4, CDR1/2, CHCHD3, COX6B1, CTNS, DYNLRB1, ERLIN2, GNE, GPHN, LIG4, MAFB, MAN2B1, NETO2, NOVA2, PKN1, RAD23B, RBM45, SNAP91, TAOK1, TRIM20, XRCC5, YWHAE), mechanisms, proteins, therapeutics, cell-types (abducens nucleus, amacrine cells, amygdala interneurons, basal forebrain cholinergic, and many more).
API status: 134 analyses, 308 hypotheses, 688,411 edges. System healthy.
Verification: All 46 tests pass (test_arena_phase_c.py, test_ci_daily_tournament.py, test_swiss_pairing_info_gain.py).
Tournament status: All three daily tournaments for 2026-04-07 complete (KOTH-alzheimers-2026-04-07, KOTH-neurodegeneration-2026-04-07, KOTH-neuroscience-2026-04-07). Tomorrow's tournaments (2026-04-08) pre-seeded and open (t-45bff5607b2b, t-62f10bf7a05f, t-339eadf14777).
Arena leaderboard top: h-var-6612521a02 (Elo=2112, 11-0-0), h-var-55da4f915d (Elo=1850, 10 matches).
Wiki enrichment: Added 490 mermaid diagrams to wiki pages (8,223 → 8,713 pages with diagrams, 50.1% coverage). Covered primarily cell-types pages (median eminence, median raphe, mesencephalic, mesocortical, mesolimbic, mesopontine, microglia, midbrain, midget bipolar, midline thalamic, mitral cells, MOPP cells, mossy cells/fibers, motoneurons) plus assorted entities.
API status: 134 analyses, 308 hypotheses, 688,411 edges. System healthy.
Verification: All 46 tests pass (test_arena_phase_c.py, test_ci_daily_tournament.py, test_swiss_pairing_info_gain.py).
Tournament status: All three daily tournaments for 2026-04-07 complete (KOTH-alzheimers-2026-04-07, KOTH-neurodegeneration-2026-04-07, KOTH-neuroscience-2026-04-07). 2026-04-08 tournaments pre-seeded and open (t-45bff5607b2b, t-62f10bf7a05f, t-339eadf14777), ready to run.
Wiki MILESTONE: 100% mermaid coverage reached — all 17399/17399 wiki pages now have mermaid diagrams embedded in content_md. Coverage confirmed via DB query.
API status: 136 analyses, 308 hypotheses, 688,411 edges. System healthy.
Verification: All 46 tests pass (test_arena_phase_c.py, test_ci_daily_tournament.py, test_swiss_pairing_info_gain.py).
Tournament status: All three daily tournaments for 2026-04-07 complete (KOTH-alzheimers-2026-04-07, KOTH-neurodegeneration-2026-04-07, KOTH-neuroscience-2026-04-07). 2026-04-08 tournaments pre-seeded and open (t-45bff5607b2b, t-62f10bf7a05f, t-339eadf14777), ready to run.
Arena leaderboard top: h-var-6612521a02 (Elo=2112, 11-0-0), h-var-55da4f915d (Elo=1850, 8-2-0), h-var-4eca108177 (Elo=1770, 8-2-0).
API status: 136 analyses, 308 hypotheses, 688,411 edges. System healthy.
Verification: All 46 tests pass (test_arena_phase_c.py, test_ci_daily_tournament.py, test_swiss_pairing_info_gain.py).
Tournament status:
Arena leaderboard top: h-var-6612521a02 (Elo=2112, 15-1-0), h-var-95b0f9a6bc (Elo=2102, 4-0-0), h-61196ade (Elo=2048, 14-2-0).
API status: 136 analyses, 321 hypotheses, 688,411 edges. System healthy.
Verification: All 46 tests pass (test_arena_phase_c.py, test_ci_daily_tournament.py, test_swiss_pairing_info_gain.py).
Tournament status:
run_debate_ci.py (PID 3830503); waited for it to finish (~2 min), then completed successfully.Arena leaderboard top: h-var-6612521a02 (Elo=2112, 11-0-0), h-var-55da4f915d (Elo=1850, 8-2-0), h-var-4eca108177 (Elo=1770, 8-2-0).
API status: 137 analyses, 321 hypotheses, 688K+ edges. System healthy.
Verification: All 46 tests pass (test_arena_phase_c.py, test_ci_daily_tournament.py, test_swiss_pairing_info_gain.py).
Tournament status:
API status: 136 analyses, 321 hypotheses, 688,411 edges. System healthy.
Context: Previous CI run left neurodegeneration-2026-04-11 in_progress (2/4 rounds) and neuroscience-2026-04-11 open. This run completed both and pre-seeded all three 2026-04-12 domains.
Tournament status:
New variants spawned: neurodegeneration — h-var-e81fbd3868, h-var-76afa28dfc, h-var-ac50d1e3d1; neuroscience — h-var-ce41f0efd7, h-var-6a0893ffb6, h-var-1906e102cf.
API status: 137 analyses, 324 hypotheses, 688K+ edges. System healthy.
Verification: All 46 tests pass (test_arena_phase_c.py, test_ci_daily_tournament.py, test_swiss_pairing_info_gain.py).
Tournament status:
API status: 184 analyses, 333 hypotheses, 688,411 edges. System healthy.
Verification: All 16 tests pass (test_ci_daily_tournament.py).
Tournament status:
API status: 190 analyses, 333 hypotheses, 688,359 edges, 15,929 papers. System healthy.
Verification: All 46 tests pass (test_arena_phase_c.py, test_ci_daily_tournament.py, test_swiss_pairing_info_gain.py).
Tournament status:
Arena leaderboard top-3 (by Elo):
Results by domain:
Discovery: Two pre-seeded April 13 tournaments (neurodegeneration + neuroscience) were open/unstarted despite April 12 and April 14 tournaments being complete. April 13 alzheimers was already complete.
Action taken:
t-545c3ce82d35) from 13 → 23 entrantsTournament results (April 13):
2026-04-20 Daily KOTH Tournament — All 6 domains completed successfully
Bug fixes applied:
scidex/core/database.py: _qmark_to_format was double-escaping %s → %%s, breaking all already-migrated PG code (tournaments.py, elo_ratings.py). Fixed to preserve %s placeholders while still converting ?.scidex/exchange/tournaments.py: _fetch_elo_rd_map had buggy IN-placeholders construction: ",".join("%s" n) iterated characters instead of creating %s, %s, .... Fixed to ", ".join(["%s"] n).scidex/senate/judge_arena.py: Removed SQLite-specific c.row_factory = sqlite3.Row (rows are already dict via PGShimConnection dict_row factory).scidex/senate/evolution.py: Removed SQLite-specific PRAGMA and row_factory; fixed ? → %s in all SQL; added JSONB serialization for list/dict values when re-inserting hypotheses (psycopg can't auto-adapt Python list/dict to JSONB).scripts/ci_daily_tournament.py: Replaced all ? placeholders with %s; fixed COUNT(*) result dict access (was fetchone()[0], now fetchone()["count"]); added pairing_algorithm="info_gain" to start_tournament and advance_to_next_round calls.Tournament results (2026-04-20):
Variants created today: 18 total (3 per domain × 6 domains).
Arena leaderboard top (by Elo, from today's winners):
Committed: sqlite→postgres migration fixes in ci_daily_tournament.py, judge_arena.py, evolution.py, tournaments.py, database.py. All 6 KOTH tournaments for 2026-04-20 completed.