feat: Create TestRunner.Report with markdown generation#199
feat: Create TestRunner.Report with markdown generation#199andreasronge merged 2 commits intomainfrom
Conversation
Extract report generation functionality from LispTestRunner into a shared Report module that can be used by both JSON and Lisp test runners. The module generates structured markdown test reports with: - Parameterized DSL name for report titles - Summary table with pass/fail counts and metrics - Results table with test outcomes - Failed test details with error messages and attempted programs - Complete list of all generated programs Reuses Base module formatting functions (format_cost, format_duration, truncate, format_attempt_result) to avoid duplication. Includes comprehensive documentation with examples for all public functions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
PR Review: Create TestRunner.Report with markdown generationSummaryThis PR creates a new What's Good
Issues (Must Fix)
Suggestions (Optional)None - the implementation is focused and appropriately scoped for Phase 1.2 of the refactoring plan. SecurityNo concerns. The module only generates markdown strings from structured data with no external input handling. DocumentationNo updates needed. The module includes comprehensive inline documentation. The refactoring plan ( VerdictRequest Changes - The division by zero issue should be addressed before merge. This is a one-line fix. |
|
@claude please fix these issues from PR review: Issue 1: Division by zero in average attempts calculationLocation: | Avg Attempts/Test | #{if summary.total > 0, do: Float.round(summary.total_attempts / summary.total, 2), else: 0.0} |Please fix this issue in a SINGLE commit. Make minimal changes to resolve the issue. |
Auto-Triage SummaryDecisions Made
Status
ReasoningThe division by zero issue is a straightforward bug in the newly created Report module that will cause crashes for empty test runs. This is:
The fix adds a guard to return 0.0 when |
Add a guard to prevent ArithmeticError when calculating average attempts with an empty test results list. Returns 0.0 when summary.total is 0. Fixes PR #199 review comment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Fix SummaryIssue 1: Division by zero in average attempts calculation ✅Status: Fixed Change: Added conditional guard on line 69 of The fix prevents when calculating average attempts for empty test results by:
Verification:
The minimal change resolves the crash when generating reports for empty test runs. |
PR Review: Create TestRunner.Report with markdown generationSummaryCreates a shared What's Good
Issues (Must Fix)None. The implementation is correct and matches the requirements. Suggestions (Optional)
SecurityNo concerns. The module generates markdown reports from internal data structures - no user input handling or external data ingestion. DocumentationDocumentation is excellent:
VerdictApprove - Clean implementation that correctly extracts report generation into a shared module. No bugs, good documentation, proper code reuse. Ready to merge. |
Auto-Triage Summary (Cycle 1)Review StatusThe latest review (post-fix) resulted in Approve with no required changes. Decisions Made
Status
Next Steps✅ Added |
Summary
Creates a new
TestRunner.Reportmodule that extracts markdown report generation functionality fromLispTestRunner. The Report module can now be shared by both JSON and Lisp test runners.TestRunner.Base(no duplication)Test plan
mix compile --warnings-as-errorsmix testFixes #198