Skip to content

Robustness: Known heuristic limitation in changes_from_diff with silent fallback #336

@Koan-Bot

Description

@Koan-Bot

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions