[Senate] Quality gates for hypotheses
Goal
Implement three quality gates in post_process.py:
- Gate 1 (Evidence): Must have evidence_for citations
- Gate 2 (Score): composite_score > 0.3
- Gate 3 (Specificity): Must name a target_gene
Only hypotheses passing all 3 gates show on Exchange by default. Add toggle to show all.
Acceptance Criteria
☐ Exchange filters unverified hypotheses by default.
☐ Toggle reveals them.
Approach
Read AGENTS.md and relevant source files
Understand existing code patterns before modifying
Implement changes following existing conventions (f-string HTML, SQLite, Bedrock Claude)
Test: curl affected pages, verify rendering, run scidex status
Commit atomically with descriptive messageWork Log
2026-04-01 19:50 PT — Slot 0
- Started task: Implement three quality gates for hypothesis filtering
- Read AGENTS.md, post_process.py, api.py to understand architecture
- Checked system status: 118 hypotheses, 21 analyses
- Planning implementation:
1. Add quality_verified column to hypotheses table
2. Implement gate logic in post_process.py (evidence, score > 0.3, target_gene)
3. Modify Exchange page to filter by default with toggle to show all
2026-04-26 — Clean rebase onto latest main (attempt 4)
- Prior rejections: pre-push hook blocked due to branch having unrelated commits from other tasks
- Reset branch to origin/main and re-applied only the quality gates changes
- Changes: +27/-3 lines in api.py only — no other files
- Quality gate logic (post_process.py), quality_verified column, and enforcement API already existed on main
- What this commit adds: Exchange page filtering by quality_verified + toggle banner UI
- No broken
/hypotheses/{id} links — all use singular /hypothesis/{id}
- Syntax check passed (py_compile)