Repository navigation
Prevent stale file search results from being labeled with a new query - #49946
Merged
copyberry[bot] merged 1 commit intoOct 1, 2026
Conversation
…#49946) ## Why The asynchronous matcher can return results for the previous query while a new query is still running. Labeling those results with the latest query produces a mismatched search snapshot. ## What changed Only report a file search snapshot when its pattern atoms match the currently requested pattern. Extract snapshot conversion into `snapshot::for_query`, which skips pending results from an older pattern. ## Testing Add a regression test that changes the query from empty to `bet`, verifies that the old snapshot is withheld, and checks that the completed snapshot contains `beta.txt` with the expected match indices and counts. GitOrigin-RevId: 01b62b822db69e15480d3233b66ec55c45646fad
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/01b62b822db69e15480d3233b66ec55c45646fad
branch
from
October 1, 2026 09:53
fd13c4d to
dd90f16
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/01b62b822db69e15480d3233b66ec55c45646fad
branch
October 1, 2026 09:53
felipecafes
temporarily deployed
to
issue-triage
October 1, 2026 10:30 — with
GitHub Actions
Inactive
felipecafes
temporarily deployed
to
issue-triage
October 1, 2026 10:30 — with
GitHub Actions
Inactive
felipecafes
temporarily deployed
to
issue-triage
October 1, 2026 10:30 — with
GitHub Actions
Inactive
NotoriousPyro
temporarily deployed
to
issue-triage
October 1, 2026 10:38 — with
GitHub Actions
Inactive
NotoriousPyro
temporarily deployed
to
issue-triage
October 1, 2026 10:38 — with
GitHub Actions
Inactive
NotoriousPyro
temporarily deployed
to
issue-triage
October 1, 2026 10:38 — with
GitHub Actions
Inactive
NotoriousPyro
temporarily deployed
to
issue-triage
October 1, 2026 10:39 — with
GitHub Actions
Inactive
This branch was previously deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Prevent stale file search results from being labeled with a new query
Why
The asynchronous matcher can return results for the previous query while a new query is still running. Labeling those results with the latest query produces a mismatched search snapshot.
What changed
Only report a file search snapshot when its pattern atoms match the currently requested pattern. Extract snapshot conversion into
snapshot::for_query, which skips pending results from an older pattern.Testing
Add a regression test that changes the query from empty to
bet, verifies that the old snapshot is withheld, and checks that the completed snapshot containsbeta.txtwith the expected match indices and counts.