Repository navigation
Fix inline case-insensitive index filtering and full-corpus stats - #163
Merged
Merged
Conversation
Honor inline and scoped case flags in trigram planning, preserve Unicode matches, and report full-corpus candidate selection for server and local searches. Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Server and local filtered-candidate counts diverge when a stricter --max-filesize is used.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
What changed in this PR
Fixes inline case-insensitive trigram planning and expands indexed-search statistics across local and server backends.
Changes:
- Parses case flags into regex HIR and safely recovers ASCII-foldable literals.
- Adds snapshot-aware corpus counts and server candidate statistics.
- Documents and tests candidate narrowing behavior.
| File | Description |
|---|---|
tgrep-core/src/query.rs |
Improves case-insensitive query planning. |
tgrep-core/src/live.rs |
Exposes overlay-shadowed paths. |
tgrep-core/src/hybrid.rs |
Adds snapshot-aware file counting. |
tgrep-core/tests/snapshot_consistency.rs |
Tests overlay and snapshot totals. |
tgrep-cli/src/serve.rs |
Returns server-side index statistics. |
tgrep-cli/src/search.rs |
Displays consistent candidate statistics. |
tgrep-cli/tests/ripgrep_compat.rs |
Adds CLI, server, and RPC regressions. |
README.md |
Documents indexed statistics and case flags. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Count candidates after scope, visibility, glob and type filtering but before max-filesize checks. Cover server/local parity when the size cap excludes some or all candidates, and document the reporting stage. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Treat killpg EPERM as an exit race only after confirming the child has finished. Always close query pipes, preserve permission failures for live children, and cover both cases with deterministic subprocess regressions. Co-authored-by: Copilot App <[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.

Summary
Fixes #162.
-Ppatterns without excluding Unicode case-fold matches.--stats, matching local-index reporting. Annotate summaries withno index narrowingwhenever raw candidates cover the nonempty corpus, even for a usable trigram plan.(?i)or-i, locally and through the server.Validation
MatchAllregression before the fix.cargo test -p tgrep-core --quietcargo test -p tgrep-cli --test ripgrep_compat --test concurrent_search --quietcargo test -p tgrep-cli --bin tgrep search::tests --quietcargo fmt --all -- --checkcargo clippy --workspace --benches -- -D warningsAll listed checks passed on Windows.