Debate System Routes Missing done claude

← Mission Control
REQUEUED — SPEC FILE MISSING: Spec file not found on disk. See original task description for context. Before doing work, verify the spec exists on main or create one.

Completion Notes

Auto-completed by supervisor after successful deploy to main

Git Commits (4)

Squash merge: orchestra/task/cf4c46df-debate-system-routes-missing (1 commits)2026-04-20
Squash merge: orchestra/task/cf4c46df-debate-system-routes-missing (1 commits)2026-04-20
Squash merge: orchestra/task/cf4c46df-debate-system-routes-missing (1 commits)2026-04-20
[Agora] api.py: fix broken /debate/ links → /debates/; nav.py: add Debates to top nav [task:cf4c46df-6fcb-4369-a411-98b64fec3adc]2026-04-17
Spec File

Goal

Fix broken debate links and navigation gaps in the SciDEX debate system. Two API endpoints generate links to /debate/{id} (singular) instead of /debates/{id} (plural), causing 404s for any debate link from the timeline or event feed. Additionally, "Debates" is missing from the top-bar dropdown navigation, making the debates page undiscoverable without opening the hamburger sidebar.

Acceptance Criteria

☑ Fix /debate/{id}/debates/{id} in timeline API (api.py line ~4036)
☑ Fix /debate/{id}/debates/{id} in event feed API (api.py line ~44386)
☑ Add "Debates" to top-bar "Main" dropdown navigation in api_shared/nav.py
☑ Verify /debates route returns 200
☑ Verify /debate/ (singular) is not referenced anywhere in the codebase

Approach

  • Grep for /debate/ (singular) references in api.py
  • Fix each occurrence to use /debates/ (plural) which is the actual registered route
  • Add Debates entry to the Main dropdown group in nav.py
  • Verify no other singular /debate/ references remain
  • Work Log

    2026-04-17 12:00 UTC — Slot 53

    • Investigated debate system: routes at /debates (listing) and /debates/{session_id} (detail) exist and work correctly
    • Found 2 broken link generators in api.py using /debate/{id} (singular) instead of /debates/{id} (plural)
    - Line 4036: timeline API endpoint
    - Line 44386: event feed endpoint
    • Found "Debates" missing from top-bar "Main" dropdown (only in hamburger sidebar)
    • Fixed both link bugs: /debate//debates/
    • Added "Debates" to Main dropdown group in nav.py

    Already Resolved — 2026-04-20 23:05:00Z

    Verified all acceptance criteria are satisfied on main as of commit 1c4234337:

    • No singular /debate/ string references remain in api.py (grep returned no matches for "/debate/")
    • /debates appears in nav.py Main dropdown (line 68): ("/debates", "Debates", "🗣")
    • /debates route returns HTTP 200 via curl check
    • Fix landed in commit 1c4234337 dated 2026-04-17 by SciDEX Agent
    Commit: 1c4234337d3a12363767f8e02d017adb7a985d95[Agora] api.py: fix broken /debate/ links → /debates/; nav.py: add Debates to top nav [task:cf4c46df-6fcb-4369-a411-98b64fec3adc]

    Payload JSON
    {
      "_reset_note": "This task was reset after a database incident on 2026-04-17.\n\n**Context:** SciDEX migrated from SQLite to PostgreSQL after recurring DB\ncorruption. Some work done during Apr 16-17 may have been lost.\n\n**Before starting work:**\n1. Check if the task's goal is ALREADY satisfied (run the relevant checks)\n2. Check `git log --all --grep=task:YOUR_TASK_ID` for prior commits\n3. If complete, verify and mark done. If partial, continue. If not done, proceed.\n\n**DB change:** SciDEX now uses PostgreSQL. `get_db()` auto-detects via\nSCIDEX_DB_BACKEND=postgres env var.",
      "_reset_at": "2026-04-18T06:29:22.046013+00:00",
      "_reset_from_status": "done"
    }