Static Analysis File URL Mapping Mismatch

← All Specs

Goal

Investigate and resolve URL routing inconsistency between /analysis/ and /analyses/ routes for static analysis file links.

Acceptance Criteria

☐ [To be defined]

Problem

Link checker flagged 4 URLs as potentially broken due to URL pattern inconsistency between /analysis/ and /analyses/ routes.

Affected links:

  • /analysis/SDA-2026-04-01-gap-010
  • /analyses/SDA-2026-04-01-gap-010
  • /debates/sess_SDA-2026-04-04-gap-20260404-microglial-priming-early-ad
  • /analyses/SDA-2026-04-04-gap-20260404-microglial-priming-early-ad

Investigation

The URL routing in api.py already handles this correctly:

  • @app.get("/analyses/{analysis_id}") at line 10540 — primary route, serves static HTML case-insensitively
  • @app.get("/analysis/{analysis_id}") at line 16695 — redirects (301) to /analyses/ for backwards compatibility
  • @app.get("/debates/{session_id}") at line 36833 — handles debate session URLs

Work Log

2026-04-04 — Investigation

Tested all 4 affected URLs after API restart:

  • /analyses/SDA-2026-04-01-gap-010 → 200 OK ✓
  • /analysis/SDA-2026-04-01-gap-010 → 301 → 200 OK ✓
  • /debates/sess_SDA-2026-04-04-gap-20260404-microglial-priming-early-ad → 200 OK ✓
  • /analyses/SDA-2026-04-04-gap-20260404-microglial-priming-early-ad → 200 OK ✓

All URLs work correctly. This task was generated by the link checker during a transient period when pages were being created. No code changes required.

Resolution

Already resolved. URL routing is consistent and working correctly. The /analysis//analyses/ redirect and case-insensitive static file serving are both functional.

File: url_mapping_mismatch_spec.md
Modified: 2026-04-28 03:24
Size: 1.8 KB