[Forge] Challenge page shows linked benchmark with leaderboard

← All Specs

Goal

When viewing a challenge that is linked to a benchmark (scope='benchmark'), the challenge detail page should display the benchmark information including the current leaderboard, top submissions, and evaluation metrics.

Acceptance Criteria

☑ Challenge detail page queries benchmarks table by challenge_id
☑ Shows benchmark card with title, description, task type, and metric
☑ Displays leaderboard with top 3-5 submissions (submitter, score, artifact link)
☑ Shows progress bar: baseline → SOTA with current top position
☑ Links back to /benchmark/{id} for full details
☑ Handles case where benchmark has no submissions yet

Approach

  • Add benchmark query in challenge_detail() function in api.py
  • Build benchmark HTML section similar to existing gap_html and analysis_html patterns
  • Query benchmark_submissions for leaderboard (order by primary_score DESC)
  • Display leaderboard with submitter, score, artifact link
  • Show progress bar visualizing baseline → SOTA → current top
  • Dependencies

    • benchmarks_infrastructure spec — provides tables and /benchmarks pages

    Dependents

    • None

    Work Log

    2026-04-10 09:45 PT — Slot 61

    • Started task: Add benchmark display to challenge detail page
    • Read benchmarks_infrastructure_spec.md to understand requirements
    • Analyzed existing challenge_detail() function in api.py (line 48469)
    • Checked database: benchmarks table exists, bench_ot_ad_target_ranking_v1 linked to ch_ot_ad_target_ranking_v1

    2026-04-10 10:15 PT — Slot 61

    • Implemented benchmark HTML section in challenge_detail():
    - Added benchmark query by challenge_id when scope='benchmark'
    - Built progress bar showing baseline → SOTA → current top score
    - Queried benchmark_submissions for leaderboard (top 5, ordered by score DESC)
    - Displayed leaderboard with medal icons, submitter name, artifact link, score
    - Added link to /benchmark/{id} for full details
    - Handled no submissions case with registration call-to-action
    • Added {benchmark_html} to challenge page HTML template (line 49107)
    • Created spec file: docs/planning/specs/ea91e022_d76f_45b7_afc4_fa3d73b8d675_spec.md
    • Committed changes: [Forge] Challenge page shows linked benchmark with leaderboard [task:ea91e022-d76f-45b7-afc4-fa3d73b8d675]
    • Pushed branch: orchestra/task/ea91e022-d76f-45b7-afc4-fa3d73b8d675
    • Note: Service restart required to apply changes (cannot sudo from worktree)
    • Result: Implementation complete, pending service restart for testing

    File: ea91e022_d76f_45b7_afc4_fa3d73b8d675_spec.md
    Modified: 2026-05-01 20:13
    Size: 2.7 KB