ID: c2519a02-1af Priority: 99 Type: one_shot Status: resolved
The /hypothesis/{id} endpoint is timing out (>15s). This is a critical blocker for the demo since hypothesis pages are the core showcase. Investigate the hypothesis_detail route in api.py and fix performance issues.
cf78c101f (N+1 batched), e1c38f18e (cache functions), ffdac4c9c (60s TTL page cache)/home/ubuntu/scidex/venv/bin/python3 missing) after scidex updatess showed connections stuck in CLOSE_WAIT/FIN_WAIT2kill -TERM; new PID 2582733 (Python 3.12 conda) came up correctly/api/status → 200 (452 hypotheses, 301 analyses)/hypothesis/h-e12109e3 → 200 in ~11ms (uncached and cached both fast)/, /exchange, /analyses/, /gaps → all 200/302/hypothesis/h-e12109e3 → 200 in 0.002s (well under 15s SLA)scripts/backfill_experiment_metadata.py is present in worktree (not part of this task)e1c38f18e ([UI] Fix hypothesis page crash: add missing page cache functions) is on mainffdac4c9c (Add 60s TTL page cache for slow detail pages) merged via 5396f5d83cf78c101f (Batch debate N+1 queries in hypothesis_detail) on mainh-e12109e3 loads in ~0.1s (uncached), ~0.003s (cached) — well under 15s threshold/home/ubuntu/scidex/venv with correct dependencies/home/ubuntu/scidex/.orchestra-worktrees/task-c2519a02-1afe-48d8-a236-0357412fc2a1/hypothesis/h-e12109e3: ~15s (expected for cold DB + many edges)/api/status → 200/hypothesis/h-e12109e3 cold: 8.3s (under 15s threshold)/hypothesis/h-e12109e3 cached: 0.003s (cache working)/home/ubuntu/scidex/venv/bin/python3 was broken/missing, but process was running via python3.12kill -KILL 2823968), systemd auto-restarted with new PID 2889111/api/status → 200 (453 hypotheses, 303 analyses, 701,246 edges)/hypothesis/h-e12109e3 cold: 6.9s (under 15s threshold)/hypothesis/h-e12109e3 cached: 0.003s (cache working)/hypothesis/h-76888762 cold: 4.3s (under 15s threshold)/analyses → 200 in 0.06s/ → 302 (redirect)h-e12109e3 cold: ~5s, cached: 0.007-0.033s ✓h-0e614ae4 cold: ~5s, cached: 0.036s ✓HYP-0001: 0.049s (cached) ✓/, /exchange, /gaps, /analyses/, /atlas.html → 200/302 ✓/api/status → 200/hypothesis/h-e12109e3 cached: 0.014s ✓ (well under 15s SLA)/ → 302, /exchange → 200, /analyses/ → 200, /gaps → 200, /graph → 200 ✓kill -KILL 2889111), systemd auto-restarted with new PID 3297017/api/status → 200 (304 analyses, 454 hypotheses, 700,972 edges)/hypothesis/h-e12109e3 cold: 6.9s ✓, cached: 0.009s ✓/api/status → 200/hypothesis/h-e12109e3 cached: 0.010s ✓ (well under 15s SLA)/ → 302, /exchange → 200, /analyses/ → 200, /gaps → 200, /graph → 200, /atlas.html → 200 ✓h-0e614ae4 has 2415 linked artifacts but query had no LIMITLIMIT 50 to the linked_artifacts queryh-0e614ae4 loads in 0.024s ✓ (was timing out before)h-e12109e3 loads in 0.004s cached ✓h-76888762 loads in 4.4s cold, 0.003s cached ✓{
"requirements": {
"coding": 8,
"safety": 8
},
"completion_shas": [
"e1c38f18e7d16e80652a928f2e6821e5086bbd83"
],
"completion_shas_checked_at": "2026-04-13T19:21:31.724835+00:00",
"completion_shas_missing": [
"0b0e9dc38412b8285e207cf3947ee96b369e9be8",
"1aa12f3b4a1151bac35edb5c51f7b022ec2172a4",
"a0d7199416443590a2061daf4a2cd8665012b915"
]
}