-
Notifications
You must be signed in to change notification settings - Fork 266
Description
Description
The Daily Code Metrics Report (Discussion #13766) revealed critical test coverage issues:
- Current test-to-source ratio: 0.70 (below recommended 1.0+)
- Test coverage declined 68.82% in the last 7 days
- High code churn: 2,004 files modified in 7 days
- pkg/ directory dominates at 353,948 LOC (65.3% of codebase)
Problem
With extremely high code volatility and declining test coverage, the risk of regressions has increased significantly. The quality score dropped from ~72 to 58 in 7 days, primarily due to insufficient test coverage keeping pace with code changes.
Suggested Changes
Focus on the highest-churn areas in pkg/ directory:
-
Identify High-Churn, Low-Coverage Files
- Use git log to find files with most commits in last 7 days
- Cross-reference with files lacking test coverage
- Prioritize files in critical paths (compilation, workflow execution)
-
Add Table-Driven Tests
- Use Go's table-driven test pattern for comprehensive coverage
- Test both happy paths and error conditions
- Include edge cases and boundary conditions
-
Target High-Impact Areas First
- Workflow compilation logic (pkg/workflow/)
- CLI command handlers (pkg/cli/)
- Validation and parsing (pkg/parser/)
Success Criteria
- Test-to-source ratio increases from 0.70 to at least 0.85
- All files with >10 commits in last 7 days have corresponding test files
- Quality score improves from 58 to at least 65
- No new code added without accompanying tests
Files Affected
Primary focus areas:
pkg/workflow/*.go- Core compilation logicpkg/cli/*.go- Command handlerspkg/parser/*.go- Frontmatter parsing
Source
Extracted from Daily Code Metrics Report - 2026-02-04
Priority
High - The 68.82% decline in test coverage over 7 days combined with high code churn creates significant regression risk. This issue directly impacts code reliability and maintainability.
AI generated by Discussion Task Miner - Code Quality Improvement Agent
- expires on Feb 6, 2026, 5:24 AM UTC