Fix schedule issue title by checking actual test files instead of coverage proxy#2281
Merged
hiroshinishio merged 1 commit intomainfrom Feb 19, 2026
Merged
Fix schedule issue title by checking actual test files instead of coverage proxy#2281hiroshinishio merged 1 commit intomainfrom
hiroshinishio merged 1 commit intomainfrom
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
has_existing_testsusedstatement_coverage > 0as 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 viais_test_file()+ stem matching.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.