fix(search): zero-match probes return the file paths they found, not just counts - #80525
Merged
Merged
Conversation
…just counts The casing/hidden/literal probes already ran the widened search to produce their counts, then threw away the paths and returned a hint-only warning. Strong models pivot in one turn; weak models spiral — the A/B eval measured qwen3-coder-30b going 3.3 -> 9.3 turns on err_case_search, retrying casing variants the probe had already resolved. All three probes (case-insensitive, hidden/gitignored, literal-vs-regex) now include up to 5 matched paths (+N more) in the warning via a shared tally helper. Fixes the class, not the site. Closes #80522
Contributor
૮ >ﻌ< ა ci reviewran on 607335f — chore: re-trigger CI
|
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.
Summary
The zero-match search probes now include the file paths they already found instead of hint-only counts — ending the weak-model re-search spiral measured in the A/B eval (qwen3-coder-30b: 3.3 → 9.3 turns on
err_case_searchbecause the probe said "2 case-insensitive matches exist" but not where).Root cause: all three probes (case-insensitive, hidden/gitignored, literal-vs-regex) ran the widened
rg --count-matchessearch, then discarded the per-file paths from its own output and returned only totals.Closes #80522.
Changes
tools/file_operations.py: shared_tally()helper parsespath:countlines once; all three probe warnings now carry up to 5 matched paths (+N morebeyond that). Fixes the class, not one probe.tests/tools/test_search_zero_match_and_multipath.py: path-presence assertions on all three probes + a cap test (8 files → 5 shown,+3 more).Validation
Infographic