Problem
The find_changes method has multiple plugin fallback branches with minimal validation — if a plugin returns undef or empty list the code silently continues. The changes_from_diff algorithm (line ~475) is internally documented as "good enough, not perfect": changes between subroutines are attributed to the previous sub, which can cause the wrong tests to be selected.
Why This Matters
Coverage-based test selection may miss regressions when changes occur in gaps between subs or when plugins silently fail, giving a false sense of test completeness.
Suggested Fix
Add explicit logging/warnings when plugins return empty results. Add a visible warning when the diff heuristic encounters changes outside of any sub context. Consider a --strict-changes flag that fails rather than silently falling back.
Details
|
|
| Severity |
🟡 Medium |
| Category |
robustness |
| Location |
lib/App/Yath/Finder.pm:228-273, 475 |
| Effort |
🛠️ Moderate effort |
🤖 Created by Kōan from audit session
Problem
The
find_changesmethod has multiple plugin fallback branches with minimal validation — if a plugin returnsundefor empty list the code silently continues. Thechanges_from_diffalgorithm (line ~475) is internally documented as "good enough, not perfect": changes between subroutines are attributed to the previous sub, which can cause the wrong tests to be selected.Why This Matters
Coverage-based test selection may miss regressions when changes occur in gaps between subs or when plugins silently fail, giving a false sense of test completeness.
Suggested Fix
Add explicit logging/warnings when plugins return empty results. Add a visible warning when the diff heuristic encounters changes outside of any sub context. Consider a
--strict-changesflag that fails rather than silently falling back.Details
lib/App/Yath/Finder.pm:228-273, 475🤖 Created by Kōan from audit session