Skip to content

[Code Quality] Investigate 77% test coverage decline in past 7 days #12366

@github-actions

Description

@github-actions

Description

The Daily Code Metrics Report - 2026-01-25 identified a critical test coverage decline:

  • Test-to-Source Ratio: Dropped from ~1.0 to 0.498 (below recommended target)
  • 7-Day Trend: ⬇️ -77.67% decrease
  • Current Test LOC: 264,983 lines
  • Current Source LOC: 531,941 lines

This dramatic decline suggests either:

  • Large amount of new source code added without corresponding tests
  • Test files being removed or refactored
  • Calculation changes in metrics methodology

Impact

  • Critical: Test coverage is below recommended 1.0 target
  • Risk: Reduced confidence in code quality and reliability
  • Trend: Significant negative trend requires immediate investigation

Suggested Investigation Steps

  1. Analyze Recent Commits (last 7 days):

    • Identify large source code additions without tests
    • Check for test file deletions or refactoring
    • Review PRs that added significant LOC
  2. Review Metrics Calculation:

    • Verify test-to-source ratio calculation is correct
    • Check if file counting logic changed
    • Confirm test file pattern matching (*_test.go, *.test.cjs)
  3. Identify Coverage Gaps:

    • Use go test -cover ./... to measure actual coverage
    • Identify packages with <50% coverage
    • Prioritize critical packages (pkg/workflow/, pkg/cli/)
  4. Create Action Plan:

    • Set minimum coverage requirements (>50% per package)
    • Add missing tests for newly added code
    • Implement pre-commit coverage checks

Success Criteria

  • Identify root cause of 77% decline
  • Test-to-source ratio returns to >0.8
  • Coverage gaps documented with remediation plan
  • CI checks prevent future coverage regression

Source

Extracted from Daily Code Metrics Report - 2026-01-25 (Discussion #11784)

Priority

High - Test coverage decline is a critical quality indicator requiring immediate investigation

AI generated by Discussion Task Miner - Code Quality Improvement Agent

  • expires on Feb 11, 2026, 9:09 PM UTC

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions