Skip to content

fix(rg): match inverted stats counters#1739

Merged
chaliy merged 1 commit into
mainfrom
2026-05-24-rg-large-parity-batch
May 25, 2026
Merged

fix(rg): match inverted stats counters#1739
chaliy merged 1 commit into
mainfrom
2026-05-24-rg-large-parity-batch

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented May 25, 2026

What

Fix rg inverted-search stats/JSON counters and add real-rg differential coverage.

Why

Real rg distinguishes matched lines from submatches for inverted searches. Normal inverted output has matched lines but zero matches; count modes still count inverted lines.

How

  • Make JSON end-event searches_with_match depend on matched lines, not submatch count.
  • Keep inverted matches at zero for normal stats/JSON output.
  • Preserve count-mode stats behavior for -v -c and -v --count-matches.
  • Add single-line and multiline real-rg differential cases.

Risk

  • Low
  • Limited to rg inverted-search stats and JSON event counters.

Checklist

  • Tests added or updated
  • Backward compatibility considered

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bashkit 57bffdf Commit Preview URL May 25 2026, 01:39 AM

@chaliy chaliy merged commit 510c38e into main May 25, 2026
34 checks passed
@chaliy chaliy deleted the 2026-05-24-rg-large-parity-batch branch May 25, 2026 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant