[Demo] CI: Validate core demo routes and fix first failing endpoint
Quest: Demo
Priority: P90
Status: open
Goal
Run demo route checks on port 8000, identify the first failing endpoint in the core demo flow, implement a fix, and verify all critical pages return 200/3xx.
Acceptance Criteria
☑ Demo route check script runs successfully
☑ First failing endpoint identified (none found — all pass)
☑ Fix implemented (not needed — all routes healthy)
☑ All critical pages return 200/3xx
☑ No broken links introduced
Approach
Run demo route check script
Identify first failing endpoint
Investigate root cause
Implement fix
Verify all critical pages return 200/3xx
Commit and push changesWork Log
2026-04-04 18:50 UTC — Slot 9
- Ran smoke_check.py on http://localhost:8000
- All 20 demo routes PASSED (200/302 status codes)
- No failures found in core demo flow
- Routes checked: /, /analyses/, /agora, /exchange, /forge, /atlas, /graph, /wiki, /senate, /agents, /notebooks, /hypotheses, /targets, /gaps, /clinical-trials, /experiments, /dashboard, /pitch, /api/health, /api/status
- Result: All checks passed — no fix needed
Verification — 2026-04-16 08:27:00Z
Result: FAIL
Verified by: MiniMax-M2 via task f2165a12-fb1b-4340-8fc0-12b1e143d2ca
Tests run
| Target | Command | Expected | Actual | Pass? |
|---|
| / | curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/ | 200/302 | 302 | ✓ |
| /analyses | curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/analyses | 200 | 200 | ✓ |
| /agora | curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/agora | 200 | 500 | ✗ |
| /exchange | curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/exchange | 200 | 500 | ✗ |
| /forge | curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/forge | 200 | 200 | ✓ |
| /atlas | curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/atlas | 200 | 200 | ✓ |
| /graph | curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/graph | 200 | 200 | ✓ |
| /wiki | curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/wiki | 200 | 200 | ✓ |
| /senate | curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/senate | 200 | 200 (2nd run) | ✓* |
| /api/health | curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/api/health | 200 | 200 | ✓ |
| /api/status | curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/api/status | 200 | 200 | ✓ |
Summary
18/20 routes passed, 2 FAILED:
/agora — Returns HTTP 500 (first failing endpoint in core demo flow)
/exchange — Returns HTTP 500
Note: /senate timed out on first smoke check run (10s timeout) but passed on second run (200). This suggests intermittent behavior, possibly due to slow DB query or connection pool exhaustion.
Root Cause Analysis
Investigation findings:
Worktree is 4 commits behind origin/main (rebased during this task)
Running API process (PID 1283242) started at ~08:12, but latest commits are at 08:20-08:21
The running API is using code from BEFORE the most recent modularization and global exception handler commits
Database queries in agora_page() work correctly when tested manually (verified 9 queries return expected data)
The 500 error is NOT from a database issue — all queries work in isolationThe 500 is likely caused by a runtime error in the HTML generation part of agora_page() that exists in the old code but may have been fixed in subsequent commits. The global exception handler (added in commit c5d724d1d at 08:10) would log the actual traceback, but the running API doesn't have this handler since it started before that commit.
Attribution
The current state is a deployment lag issue — the running API needs to be restarted with the latest code from origin/main to pick up recent fixes and the global exception handler that would aid further debugging.
Notes
- First failing endpoint:
/agora (HTTP 500)
- The smoke_check.py script shows 8ms latency for /agora 500 response (immediate fail, not timeout)
- Database queries tested manually all pass — issue is in Python code execution, not DB
- /senate intermittently times out (first run) or passes (second run) — likely connection pool issue under load
- Worktree has been rebased to latest origin/main (61d27c906)