[UI] Restore static HTML coverage for completed analyses

← All Specs

Goal

Ensure completed analyses in the database always have a static HTML page under site/analyses/, and prevent the analyses index from linking to pages that do not exist.

Approach

Add a validation/backfill pass in post_process.py that:

  • scans completed analyses from the DB
  • preserves existing static files
  • regenerates full reports when possible
  • falls back to a DB-backed summary page when the full debate artifacts are unavailable
  • filters the analyses index to only emit links for pages confirmed in the static inventory

Add focused tests covering both the backfill path and the index filtering behavior.

Acceptance Criteria

  • Completed analyses missing site/analyses/*.html are backfilled during dashboard regeneration.
  • Analyses without static HTML are omitted from site/analyses/index.html.
  • The behavior is covered by a focused regression test.

Implementation

  • Introduced ensure_completed_analysis_html() to validate static coverage for completed analyses.
  • Extracted _write_analysis_summary_html() so missing completed analyses can still get a minimal HTML page from DB state.
  • Updated regenerate_dashboard() to run the coverage check first and skip links for analyses absent from the static inventory.
  • Added tests/test_post_process_analysis_html.py to lock in the regression coverage.

Work Log

  • 2026-04-24 18:46 PT: Validated the workspace patch, confirmed post_process.py contains the missing completed-analysis backfill path, and ran focused verification of the two regression cases plus py_compile.

File: task_76be1f5a_missing_analysis_html_spec.md
Modified: 2026-04-28 03:24
Size: 1.7 KB