[Demo] CI: Validate core demo routes and fix first failing endpoint

← All Specs

[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 changes
  • Work 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

    TargetCommandExpectedActualPass?
    /curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/200/302302
    /analysescurl -s -o /dev/null -w '%{http_code}' http://localhost:8000/analyses200200
    /agoracurl -s -o /dev/null -w '%{http_code}' http://localhost:8000/agora200500
    /exchangecurl -s -o /dev/null -w '%{http_code}' http://localhost:8000/exchange200500
    /forgecurl -s -o /dev/null -w '%{http_code}' http://localhost:8000/forge200200
    /atlascurl -s -o /dev/null -w '%{http_code}' http://localhost:8000/atlas200200
    /graphcurl -s -o /dev/null -w '%{http_code}' http://localhost:8000/graph200200
    /wikicurl -s -o /dev/null -w '%{http_code}' http://localhost:8000/wiki200200
    /senatecurl -s -o /dev/null -w '%{http_code}' http://localhost:8000/senate200200 (2nd run)✓*
    /api/healthcurl -s -o /dev/null -w '%{http_code}' http://localhost:8000/api/health200200
    /api/statuscurl -s -o /dev/null -w '%{http_code}' http://localhost:8000/api/status200200

    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 isolation
  • The 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)

    Tasks using this spec (1)
    [Demo] CI: Validate core demo routes and fix first failing e
    Demo done P90
    File: f2165a12_fb1_spec.md
    Modified: 2026-05-01 20:13
    Size: 4.8 KB