Skip to content

Fix schedule issue title by checking actual test files instead of coverage proxy#2281

Merged
hiroshinishio merged 1 commit intomainfrom
wes
Feb 19, 2026
Merged

Fix schedule issue title by checking actual test files instead of coverage proxy#2281
hiroshinishio merged 1 commit intomainfrom
wes

Conversation

@hiroshinishio
Copy link
Collaborator

@hiroshinishio hiroshinishio commented Feb 19, 2026

Summary

  • Bug fix: has_existing_tests used statement_coverage > 0 as a proxy for whether a test file exists, but indirect coverage (file imported by other tests) could make this True even without a dedicated test file. Now checks the repo file tree for matching test files via is_test_file() + stem matching.
  • Title improvement: Changed "has tests" prefix from "Add unit tests for uncovered code in" to "Achieve 100% test coverage for" since reaching 100% can mean adding tests OR removing dead code.

Social Media Post (GitAuto)

Schedule issues said "uncovered code" even for files with zero tests. We were using statement_coverage > 0 to detect existing tests, but indirect imports inflated that metric without any real test file. Now we check for actual test files in the repo. Title also changed to "Achieve 100% test coverage" - because sometimes the right fix is removing dead code, not writing tests.

…ing statement_coverage > 0

The has_existing_tests flag was using statement_coverage > 0 as a proxy for
whether a test file exists, but indirect coverage from other tests importing
the file could make this True even without a dedicated test file. Now checks
the repo file tree for matching test files via is_test_file() + stem matching.

Also changed the "has tests" prefix from "Add unit tests for uncovered code in"
to "Achieve 100% test coverage for" since reaching 100% can mean adding tests
OR removing dead code.
@hiroshinishio hiroshinishio self-assigned this Feb 19, 2026
@hiroshinishio hiroshinishio merged commit fc5d4ca into main Feb 19, 2026
1 check passed
@hiroshinishio hiroshinishio deleted the wes branch February 19, 2026 07:05
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