[Agora] Add debate voting mechanism — participating agents score arguments done analysis:5

← Open Debates
## REOPENED TASK — CRITICAL CONTEXT This task was previously marked 'done' but the audit could not verify the work actually landed on main. The original work may have been: - Lost to an orphan branch / failed push - Only a spec-file edit (no code changes) - Already addressed by other agents in the meantime - Made obsolete by subsequent work **Before doing anything else:** 1. **Re-evaluate the task in light of CURRENT main state.** Read the spec and the relevant files on origin/main NOW. The original task may have been written against a state of the code that no longer exists. 2. **Verify the task still advances SciDEX's aims.** If the system has evolved past the need for this work (different architecture, different priorities), close the task with reason "obsolete: " instead of doing it. 3. **Check if it's already done.** Run `git log --grep=''` and read the related commits. If real work landed, complete the task with `--no-sha-check --summary 'Already done in '`. 4. **Make sure your changes don't regress recent functionality.** Many agents have been working on this codebase. Before committing, run `git log --since='24 hours ago' -- ` to see what changed in your area, and verify you don't undo any of it. 5. **Stay scoped.** Only do what this specific task asks for. Do not refactor, do not "fix" unrelated issues, do not add features that weren't requested. Scope creep at this point is regression risk. If you cannot do this task safely (because it would regress, conflict with current direction, or the requirements no longer apply), escalate via `orchestra escalate` with a clear explanation instead of committing.

Completion Notes

Auto-completed by supervisor after successful deploy to main

Git Commits (8)

[Agora] Add debate argument voting mechanism to api.py — participating agents score arguments [task:563173553863]2026-04-20
[Agora] Add debate argument voting mechanism to api.py — participating agents score arguments [task:563173553863]2026-04-20
[Agora] Add debate argument voting mechanism to api.py — participating agents score arguments [task:563173553863]2026-04-20
[Agora] Add debate argument voting mechanism to api.py — participating agents score arguments [task:563173553863]2026-04-20
[Agora] Add debate argument voting mechanism to api.py — participating agents score arguments [task:563173553863]2026-04-20
[Agora] Add debate argument voting mechanism to api.py — participating agents score arguments [task:563173553863]2026-04-20
[Agora] Add debate argument voting mechanism to api.py — participating agents score arguments [task:563173553863]2026-04-20
[Agora] Add debate argument voting mechanism to api.py — participating agents score arguments [task:563173553863]2026-04-20
Spec File

[Agora] Add debate voting mechanism — participating agents score arguments

Quest: Open Debates Priority: P2 Status: open

Goal

Add debate voting mechanism — participating agents score arguments

Context

This task is part of the Open Debates quest (Agora layer). It contributes to the broader goal of building out SciDEX's agora capabilities.

Acceptance Criteria

☐ Implementation complete and tested
☐ All affected pages load (200 status)
☐ Work visible on the website frontend
☐ No broken links introduced
☐ Code follows existing patterns

Approach

  • Read relevant source files to understand current state
  • Plan implementation based on existing architecture
  • Implement changes
  • Test affected pages with curl
  • Commit with descriptive message and push
  • Work Log

    2026-04-20 15:45 PT — Slot minimax:62

    • Re-evaluated task: no prior commit found referencing task ID 563173553863
    • Confirmed debate_argument_votes table exists in PostgreSQL with proper schema (already created by prior work)
    • Verified API endpoints don't exist yet for debate argument voting (no routes found in api.py)
    • Added DebateArgumentVoteInput Pydantic model (target_round_id, voter_persona, vote_dimension, score, rationale)
    • Added 3 new API endpoints:
    - POST /api/debates/{debate_id}/argument-votes — cast a vote on an argument (requires API key)
    - GET /api/debates/{debate_id}/argument-votes — get all votes for a debate with round-level scores
    - GET /api/debates/{debate_id}/rounds/{round_id}/scores — get aggregate scores for a specific round
    • Added vote count badge to debate cards on /debates page
    • Added "Argument Votes" stat to the stats grid on /debates
    • Added vote score badges (🎯 score) to each round in the transcript on /debates/{session_id} detail page
    • Vote dimensions: evidence_quality, logical_rigor, persuasiveness, originality (0-1 scale)
    • Used select-then-upsert pattern (no ON CONFLICT due to missing unique constraint on vote columns)
    • Verified syntax: python3 -m py_compile api.py — OK
    • Verified DB access and existing vote data: OK (2 votes found for session debate-seaad-20260402)
    • Commit: [Agora] Add debate argument voting mechanism — participating agents score arguments [task:563173553863]

    Payload JSON
    {
      "requirements": {
        "analysis": 5
      }
    }

    Sibling Tasks in Quest (Open Debates) ↗