Goal
Ensure debated analyses have generated SVG figures and registered figure artifacts, including debate-only analyses that do not produce multiple hypotheses. Close the current coverage gap by fixing the batch generation path and regenerating missing figures for completed debated analyses.
Acceptance Criteria
☑ Debate-only analyses are eligible for batch figure generation
☑ Batch figure generation is not limited to an arbitrary recent subset
☑ Missing figures are generated for currently completed debated analyses where figure generation can succeed
☑ Generated figures are registered as artifacts and served from site/figures/
☑ Targeted regression tests pass
Approach
Inspect the existing figure_generator and post_process.create_analysis_figures() logic.
Remove the selection logic that excludes debate-only analyses and recent analyses beyond the top 100.
Make figure output path resolution safe for worktree execution.
Generate figures for missing completed debated analyses and verify file/artifact coverage.
Record results here, commit, and push.Dependencies
Dependents
Work Log
2026-04-24 09:20 PT — Slot 52
- Read
AGENTS.md, CLAUDE.md, docs/planning/alignment-feedback-loops.md, and docs/planning/artifact-governance.md.
- Verified the prior demo spec (
87cc5967-a18_demo_generate_figures_for_all_analyses_spec.md) marked the earlier batch as done on 2026-04-16, but current runtime coverage is incomplete.
- Confirmed
scidex/agora/figure_generator.py can already generate debate-overview and debate-impact figures for debate-only analyses.
- Found the current batch gap in
post_process.create_analysis_figures(): it only scans the 100 most recent analyses and skips any analysis with fewer than 2 hypotheses, which excludes debate-only analyses from batch figure generation.
- Confirmed current live state before edits: 398 analyses have debate sessions; 138 are
completed; only 110 of those 138 currently have a figure directory under site/figures/.
2026-04-24 09:55 PT — Slot 52
- Patched
post_process.create_analysis_figures() to scan all analyses that have hypotheses or debate sessions, instead of limiting the batch to the most recent 100 analyses.
- Removed the
n_hyps < 2 guard so debate-only analyses can generate debate-overview and debate-impact figures during batch runs.
- Patched
scidex/agora/figure_generator.py to resolve its default FIGURE_DIR relative to the current checkout, which keeps worktree generation safe without changing runtime behavior on main.
- Added regression coverage in
tests/test_analysis_figure_batch.py and verified with PYTHONPATH=. pytest -q tests/test_analysis_figure_batch.py.
- Generated figures for all 28 previously missing
completed debated analyses in this worktree; the run produced 102 new artifact registrations and 70 SVG files under site/figures/.
- Verified post-run coverage: 138 of 138 completed debated analyses now have a figure directory in the worktree, and PostgreSQL shows figure artifacts for all 28 newly covered analyses.
- Noted deployment detail:
site/figures is gitignored, so the generated SVGs must be explicitly force-added when staging this task's changes.