Skip to content

fix(scripts): treat trailing-slash failure-class scope hints as directory globs - #14401

Merged
Git-on-my-level merged 1 commit into
mainfrom
task/msd-ci-failure-class-prepare-glob
Sep 17, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
task/msd-ci-failure-class-prepare-glob

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

What changed and why

scripts/failure-class prepare matched scope_hints with fnmatch(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 and prepare either 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_directory failed before the matching change (listed the whole registry) and passed after
  • python3 scripts/test_failure_class.py
  • OMI_PR_BODY_FILE=.local/pr-body-fc-prepare.md make preflight

Tests

  • trailing-slash hint app/lib/pages/home/ matches app/lib/pages/home/page.dart and narrows to that class
  • existing src/** narrowing still holds

🤖 Generated with Claude Code

Review in cubic

…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]>
@Git-on-my-level
Git-on-my-level merged commit be74c0f into main Sep 17, 2026
42 checks passed
@Git-on-my-level
Git-on-my-level deleted the task/msd-ci-failure-class-prepare-glob branch September 17, 2026 21:04
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