Repository navigation
fix(scripts): treat trailing-slash failure-class scope hints as directory globs - #14401
Merged
Merged
Conversation
…tory globs prepare matched scope_hints with fnmatch, so a prefix like app/lib/pages/home/ never hit files under that directory. Eight committed definitions already use that form. Co-authored-by: Cursor <[email protected]>
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.
What changed and why
scripts/failure-class preparematchedscope_hintswithfnmatch(path, hint). A hint written as a directory prefix (app/lib/pages/home/) is not a glob, so it never matches files under that directory andprepareeither lists unrelated hits or falls through to the full registry. That is a matching defect, not a hint-format defect: eight committed definitions already use the trailing-slash form.Treat a slash-terminated hint that is not already a glob as
hint + "**". Existing**/*hints are unchanged. The eight trailing-slash JSON files are left as written.Product invariants affected
none
Failure class (fixes)
Failure-Class: none
This is display narrowing in the prepare CLI, not a product instance of a registered class.
How it was verified
python3 scripts/test_failure_class.py FailureClassCliTests.test_prepare_trailing_slash_scope_hint_matches_files_under_that_directoryfailed before the matching change (listed the whole registry) and passed afterpython3 scripts/test_failure_class.pyOMI_PR_BODY_FILE=.local/pr-body-fc-prepare.md make preflightTests
app/lib/pages/home/matchesapp/lib/pages/home/page.dartand narrows to that classsrc/**narrowing still holds🤖 Generated with Claude Code