Skip to content

Fix search compatibility bugs and Linux RSS test - #187

Merged
Shengyu Fu (shengyfu) merged 1 commit into
mainfrom
shengyfu-open-issue-fixes
Oct 9, 2026
Merged

Shengyu Fu (shengyfu) merged 1 commit into
mainfrom
shengyfu-open-issue-fixes

Conversation

@shengyfu

Copy link
Copy Markdown
Member

Summary

  • Preserve whitespace and blank lines in pattern files, distinguish an empty file from an empty pattern, and snapshot patterns once per invocation. Preserve inverted matching for empty pattern sets.
  • Scope inline flags to individual patterns and derive smart case from literal characters across all supplied patterns, including extended-regex expressions.
  • Use half-word boundaries for -w, with equivalent lookarounds for the backtracking engine, and honor the last -w/-x flag across subcommands.
  • Keep adjacent multiline matches separate in per-match output and counts, without inventing an extra zero-width match after a trailing newline.
  • Remove the invalid ordering assertion between independently sampled Linux RSS counters while retaining query-success and nonzero assertions.
  • Update CLI help and README, with regression coverage across scan, local-index, server, and regex-engine paths.

Issues addressed

Fixes #181
Fixes #182
Fixes #183
Fixes #184
Fixes #185
Fixes #186

Fixes #181
Fixes #182
Fixes #183
Fixes #184
Fixes #185
Fixes #186

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 9, 2026 00:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The compatibility fixes are consistent across engines and backends with comprehensive regression coverage.

0 open findings

What changed in this PR

Improves ripgrep compatibility across pattern parsing, case handling, boundaries, multiline output, and RSS testing.

Changes:

  • Preserves pattern-file semantics and correctly scopes smart case and inline flags.
  • Fixes -w/-x precedence and adjacent multiline match reporting.
  • Expands cross-backend regression coverage and updates documentation.
File Description
tgrep-cli/​src/​search.rs Snapshots patterns and fixes smart-case resolution.
tgrep-cli/​src/​matching.rs Corrects boundaries, pattern scoping, and multiline spans.
tgrep-cli/​src/​main.rs Implements ordered -w/-x overrides.
tgrep-cli/​src/​mem.rs Removes invalid RSS ordering assertion.
tgrep-cli/​tests/​ripgrep_compat.rs Adds cross-backend compatibility tests.
tgrep-cli/​Cargo.toml Adds required regex parser dependency and minimum version.
Cargo.lock Records the direct dependency.
README.md Documents corrected search semantics.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@shengyfu
Shengyu Fu (shengyfu) merged commit b614b8c into main Oct 9, 2026
12 checks passed
@shengyfu
Shengyu Fu (shengyfu) deleted the shengyfu-open-issue-fixes branch October 9, 2026 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants