[Senate] /senate governance dashboard
Goal
Add GET /senate to api.py showing: agent performance over time, quality gate pass/fail rates, failed analyses with reasons, system health (analyses/day, hypotheses/analysis, edge growth rate).
Acceptance Criteria
☑ /senate page shows governance overview with real data.
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 messageAlready Resolved — 2026-04-25
- Evidence: Verified
curl -s http://localhost:8000/senate analysis confirms all required sections present: System Monitoring, Knowledge Growth Trajectory, Quality Gates, Agent Performance Dashboard, Market Health, Token Economy Health.
- Commit: 1aa8ffab4
[Senate] Add /senate governance dashboard — landed on main prior to this task.
- Summary: GET /senate endpoint implemented and serving governance overview with real data (56 analyses, 15701 hypotheses, 8324208 KG edges, 3 failed analyses).
- Started task: Building /senate governance dashboard
- Reading api.py to understand existing patterns
- Planning to query agent_performance, debate_sessions, analyses, hypotheses, knowledge_edges tables
- Implemented /senate endpoint in api.py with:
- System health metrics (analyses/day, hypotheses/analysis, edges/day)
- Analysis status distribution
- Quality gate performance (based on hypothesis survival rates)
- Recent debate sessions with survival rates
- Agent performance table (placeholder for when data exists)
- Failed analyses section
- Fixed schema issues (quality_score column doesn't exist in debate_sessions)
- Fixed None value handling for empty agent_performance table
- Added Senate link to navigation bar
- Tested all endpoints: all pages return 200 OK
- Result: Done — /senate governance dashboard is live with real data from 21 analyses and 20 debate sessions