Repository navigation
ci: a scope_hint that matches zero paths is an error, not a pass - #14466
Merged
Merged
Conversation
A hint that matches nothing is skipped during candidate narrowing, so the class disappears and the author invents a new one. Fail closed when a changed definition adds a hint that hits zero tracked files. Co-authored-by: Cursor <[email protected]>
This was referenced Sep 18, 2026
…merged #14465 rewrote the change-set helpers in scripts/failure-class to diff three-dot against the live base, which collides with this branch's additions to the same file. Resolved by taking main's file wholesale and re-applying this branch's three additions onto it, rather than hand-editing conflict markers: - tracked_paths() and dead_scope_hint_errors(), inserted before added_definition_paths() where they sat relative to the merge base. - The prepare call site, at the same indent as the try/except it follows. - The validate call site, as the first statement of the else: block. The second call site is the reason this needed care. Placing it inside the except: block instead of the else: left it running only when the diff raised, and scripts/test_failure_class.py caught that: 27 of 28 passed and the one failure was test_scope_hint_matching_zero_paths_is_error, the exact test this branch exists to add. Corrected placement, then the full suite: 28 of 28 OK. Co-Authored-By: Claude Opus 5 <[email protected]>
This was referenced Sep 18, 2026
summersmile1984
added a commit
to summersmile1984/omi
that referenced
this pull request
Sep 26, 2026
…definition Upstream BasedHardware#18722 (43c27b7) deleted backend/utils/task_intelligence/rollout.py but left its scope_hint in .github/failure-classes/FC-gate-principal-outside-consolidated-entitlement.json; scripts/failure-class treats a hint matching zero tracked paths as an error, so failure-class-protocol fails for any range spanning that deletion — ours does. Retarget the hint to the surviving task_intelligence directory (upstream repairs dead hints the same way: BasedHardware#14493, BasedHardware#14466, BasedHardware#14495). Registered as T1 (max_added_lines 1) with upstream-prs queue row #18. Evidence: scripts/failure-class validate --base origin/main --head HEAD --pr-body-file /tmp/pr-body.md passes the declaration and this error; re-run after commit. Failure-Class: none
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 preparematches a class definition'sscope_hintswithfnmatch, so ahint written the way a person naturally writes one — with a trailing slash, or without
**—matches zero paths. It then passed. A hint that matches nothing is not a narrow gate, it is
no gate, and it looks identical to a gate that is working. Failing open is the worst behaviour a
check can have, because nothing in the output tells you it stopped protecting anything.
A newly added
scope_hinton a changed definition that matches zero paths undergit ls-filesis now
scope_hint_matches_nothing, in bothprepareandvalidate.Scoped deliberately, so this does not become a tree-wide lint. A fix that reddened every
open PR on day one would have been reverted rather than absorbed, and the existing definitions
are not this PR's change set.
Correction to an earlier draft of this body, found by the App core lane's adversarial review.
I originally wrote that existing dead hints "fail when their own JSON is next edited." That is
wrong, and the reviewer proved it rather than arguing it: the check compares
current - previous,so editing a definition while keeping a pre-existing dead hint fires nothing; only a newly
added hint that matches zero paths is caught. The reviewer scanned the live registry — 9 of
260 classes, out of 606 hints total, carry a hint that matches nothing today — and those nine
stay fail-open through artifact-only instance-fix edits.
That is a deliberate limit of this PR, not a claim that the tree is clean. Sweeping those nine
is a separate change with its own blast radius, and it should be measured before it is written.
Product invariants affected
none
How it was verified
test_scope_hint_matching_zero_paths_is_errorasserts exit 1, not merely a warning — thetest would fail if the check went back to passing. The full
scripts/test_failure_class.pysuite passed, including the existing cases that pin
prepareandvalidatebehaviour on hintsthat do match.
Failure class (fixes)
Failure-Class: none
The defect class here is "a matcher that finds nothing reports success", which is worth
registering; it is not registered in this PR because the protocol allows exactly one added
definition per PR and the companion change-set fix is in flight alongside this one. Flagged for
a follow-up rather than silently dropped.
🤖 Generated with Claude Code