Skip to content

Fix analyze report to use bundled default template#1

Open
johnjosephhorton wants to merge 1 commit intomainfrom
fix-builtin-report-template
Open

Fix analyze report to use bundled default template#1
johnjosephhorton wants to merge 1 commit intomainfrom
fix-builtin-report-template

Conversation

@johnjosephhorton
Copy link
Copy Markdown
Contributor

Summary

  • Bug: premortem analyze report printed "Using built-in" but immediately exited with code 1 because no built-in template existed
  • Fix: Added a bundled premortem/templates/report_template.html and updated fallback logic in analyze.py to use it when no user template is found in .premortem/output/
  • Packaging: Added [tool.setuptools.package-data] to pyproject.toml so the template is included in the installed package

Test plan

  • Run premortem analyze report in a project that has no custom report_template.html in .premortem/output/ — should produce a valid HTML report using the built-in template
  • Run premortem analyze report in a project that does have a custom template in .premortem/output/ — should use the custom template (no change in behavior)
  • Verify the generated HTML renders correctly: EP branding, Mermaid graph, collapsible sections, print styles

🤖 Generated with Claude Code

The `analyze report` command claimed to use a built-in template when
no user template was found, but then immediately exited with code 1
because no built-in template actually existed. This adds a bundled
report_template.html and updates the fallback logic to use it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant