Analysis and debate session link mismatches

← All Specs

Goal

Root cause: Links between analyses and debate sessions use inconsistent naming patterns. Some use 'sess_' prefix, others don't, causing broken cross-references.

Acceptance Criteria

☐ /debates/sess_SDA-2026-04-02-gap-v2-5d0e3052
☐ /analyses/SDA-2026-04
☐ Changes tested and verified

Approach

  • Read existing code and understand current state
  • Implement required changes
  • Test changes
  • Commit and push
  • Dependencies

    (none listed)

    Dependents

    (none listed)

    Work Log

    2026-04-20 - Bug fixed in contributor_profile page

    • Root cause: contributor_profile page (api.py:57262) was using d.get('session_id') to build links to /analyses/ pages. Debate session IDs have sess_ prefix (e.g., sess_SDA-2026-04-02-gap-v2-5d0e3052), but analysis IDs do not. This caused broken links when clicking "Recent Debates" in a contributor's profile.
    • Fix: Changed to use d.get('analysis_id') instead, and added ds.analysis_id to the get_agent_history query in agent_registry.py.
    • Also added _is_valid_analysis_id() guard to handle cases where no analysis_id is available.
    • Files changed: api.py (contributor_profile), scidex/senate/agent_registry.py (get_agent_history query)
    • Commit: 5ef638351 (cherry-picked from original 26441a5a4, now on top of latest main)

    File: 2679e2c9_852_spec.md
    Modified: 2026-04-25 23:40
    Size: 1.4 KB