Skip to content

feat: add coverage-report.sh with tests#12

Merged
mpawliszyn merged 1 commit intomainfrom
task5-coverage-report
Feb 26, 2026
Merged

feat: add coverage-report.sh with tests#12
mpawliszyn merged 1 commit intomainfrom
task5-coverage-report

Conversation

@mpawliszyn
Copy link
Copy Markdown
Collaborator

Summary

Generates a coverage summary from review-tree.md. Third script in Phase 1.

Script interface

scripts/coverage-report.sh <tree-file>

Outputs structured markdown with:

  • Node counts by status (pending/reviewed/accepted/total)
  • Confidence breakdown (examined in detail vs pattern-trusted)
  • Nodes with comment flags
  • Top-level concept count
  • Pending nodes list (when any remain)

Tests (14)

Category Tests
Status counts 4 (pending, reviewed, accepted, total)
Comments + confidence 2
Pending list 2 (present when pending, hidden when none)
Structure 2 (section headers, top-level count)
Validation 2 (missing args, non-existent file)
Edge cases 2 (all pending, all reviewed)

158 total tests across all suites.

@mpawliszyn mpawliszyn force-pushed the task5-coverage-report branch from 7320b2d to b3ca3ad Compare February 26, 2026 02:49
Shell script to generate a coverage summary from review-tree.md.
Read-only, no file mutations. Output is structured markdown with
a documented format contract for the orchestrator.

Reports:
- Node counts: pending, reviewed, accepted, total
- Progress: decided/total with percentage
- Confidence: examined in detail (reviewed) vs pattern-trusted (accepted)
- Nodes with comments (flag-precise pattern), top-level concept count
- File coverage: files in diff, files mapped, unmapped
- Pending nodes list (only shown if any remain)

Fixes from review:
- Node-counting greps require [0-9] after status to prevent context
  block inflation (I1)
- Comment flag pattern uses \{[^}]*comment\} for precision
- File coverage data extracted from tree's Coverage section (E1)
- Progress percentage added (E2)
- Output format documented in script header as contract

18 bats tests covering:
- Status counts, progress percentage, comment count
- Confidence summary, top-level count, file coverage
- Pending nodes (listed when present, hidden when none)
- Section headers, input validation
- Context inflation protection (regression test)
- Edge cases (all pending with 0%, all reviewed with 100%)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mpawliszyn mpawliszyn force-pushed the task5-coverage-report branch from b3ca3ad to 4c58345 Compare February 26, 2026 03:04
@mpawliszyn mpawliszyn merged commit fa22092 into main Feb 26, 2026
4 checks passed
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