fix(core): exclude hidden glob matches before limiting results - #47422
Merged
Conversation
kitlangton
marked this pull request as ready for review
September 9, 2026 13:18
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.
Issue for this PR
Closes #47421
Type of change
What does this PR do?
Why:
**/*.tsreturns hidden basenames even whenhiddenis omitted or false. Positive ripgrep globs override its default hidden-file filtering, and hidden matches can consume the result limit.What changes: Apply a native hidden-path exclusion after the positive glob, before collecting limited results.
hidden: truestill includes hidden files and directories;.gitremains excluded.Scope: The glob API's flag applies to broad and explicit hidden-name patterns.
findandgrepkeep their separate existing behavior.How did you verify your code works?
From
packages/core:bun run test test/ripgrep.test.ts test/tool-search.test.ts bun typecheckFresh regressions reproduce hidden matches and incorrect truncation on the base. All ten new adapter/tool cases now pass using native ripgrep. The complete focused suites pass 27 tests, including existing find, ignore-file and Git-metadata controls. No new glob ignore-file compliance is claimed.
Additional combined-tree checks passed full Core twice (5,267 passed, 41 skipped). An earlier run hit
pty > retains exited sessions until removed; the timeout did not recur in paired clean-base/fixed reruns, but its cause remains unresolved.Screenshots / recordings
Not a UI change; tests check actual native search results and tool output.
Checklist