[Senate] Link validation sweep

← All Specs

Goal

Crawl all site links (static HTML files + live HTTP routes), test for 404s and 500s, and create one-shot fix tasks for any broken links found. Runs every 6 hours to catch regressions introduced by new deployments.

Acceptance Criteria

☑ Static HTML files scanned with link_checker.py
☑ Live HTTP routes sampled across all major entity types (analysis, hypothesis, gap, wiki, entity, debate, notebook)
☑ Nav links extracted from key pages and checked
☑ Broken links reported and fix tasks created for actionable issues

Approach

  • Run python3 link_checker.py — checks all static HTML files in site/
  • HTTP-sweep live routes: sample from DB (analyses, hypotheses, gaps, wiki, entities)
  • Crawl nav links from key pages (/exchange, /forge, /senate, etc.)
  • For each broken link: create a one-shot Orchestra fix task with a spec
  • Commit sweep report and spec updates
  • Work Log

    2026-04-12 23:30 UTC — Slot dff08e77 (recurring run)

    • Static HTML check: python3 link_checker.py0 broken links (508 HTML files)
    • HTTP sweep — key nav routes (30 pages): all returned 200 except /api/graph (timeout — expected for large KG query, not a bug)
    • HTTP sweep — entity routes: sampled 45 routes across analyses/hypotheses/gaps/wiki/entity → all 200
    • HTTP sweep — debate routes: 20 sampled, all 200 via /debates/{session_id} (plural)
    • HTTP sweep — nav links extracted from live pages: 1 broken link found
    Broken link found:
    • URL: /api/hypotheses/{hyp_id}/price-attribution (literal {hyp_id} placeholder leaked into HTML)
    • Location: api.py:21054 — economy/exchange page signal overview section
    • Root cause: {{hyp_id}} in f-string renders as literal {hyp_id} in HTML, creating an unclickable/404ing href
    • The actual API endpoint /api/hypotheses/{real_id}/price-attribution works correctly (200)
    • Fix: change the href to # or to API docs, or render as <code> text instead of an <a> tag
    Fix task created: See [UI] Fix template variable link in economy page price-attribution task

    • Result: 1 actionable broken link found, fix task spawned. All other routes healthy.

    File: f07360c3_link_validation_sweep_spec.md
    Modified: 2026-05-01 20:13
    Size: 2.3 KB