Skip to content

Reuse regexes across rollout snippet searches - #62076

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/1a7ade8c8c4ee533a452658808886a1d83e90741
Nov 17, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/1a7ade8c8c4ee533a452658808886a1d83e90741

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Reuse regexes across rollout snippet searches

Why

Thread search compiled the same snippet-matching regexes for each rollout file. Reusing them avoids repeated compilation and preserves regex scratch caches across file scans.

What changed

Introduce RolloutSnippetMatcher to lazily compile and share patterns for one search term. Reuse the matcher across thread search catalog pages and within compressed rollout search workers, preserving per-file I/O error precedence.

Testing

Add regression coverage for lazy, once-per-matcher compilation, matching decoded text across files, and independent concurrent searches spanning catalog refills. Adapt compressed rollout tests to the matcher API.

## Why

Thread search compiled the same snippet-matching regexes for each rollout file. Reusing them avoids repeated compilation and preserves regex scratch caches across file scans.

## What changed

Introduce `RolloutSnippetMatcher` to lazily compile and share patterns for one search term. Reuse the matcher across thread search catalog pages and within compressed rollout search workers, preserving per-file I/O error precedence.

## Testing

Add regression coverage for lazy, once-per-matcher compilation, matching decoded text across files, and independent concurrent searches spanning catalog refills. Adapt compressed rollout tests to the matcher API.

GitOrigin-RevId: 1a7ade8c8c4ee533a452658808886a1d83e90741
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/1a7ade8c8c4ee533a452658808886a1d83e90741 branch from 628b5e7 to 378364e Compare November 17, 2026 16:27
@copyberry
copyberry Bot merged commit 378364e into main Nov 17, 2026
10 of 23 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/1a7ade8c8c4ee533a452658808886a1d83e90741 branch November 17, 2026 16:27
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-17T16:27:32.285057Z 378364e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch was previously deployed

1 inactive deployment
issue-triage — 378364e7 Deployed Nov 17, 2026 by mesqueeb via Identify potential duplicates (open issues fallback) #64003
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants