Fix fuzzy search notification buffering in app-server tests#14955
Merged
aibrahim-oai merged 1 commit intomainfrom Mar 17, 2026
Merged
Fix fuzzy search notification buffering in app-server tests#14955aibrahim-oai merged 1 commit intomainfrom
aibrahim-oai merged 1 commit intomainfrom
Conversation
Preserve out-of-order fuzzy-search notifications in the app-server test harness so session completion events are not dropped while a later-matching session update is still pending. Co-authored-by: Codex <noreply@openai.com>
nornagon-openai
approved these changes
Mar 17, 2026
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.
What is flaky
codex-rs/app-server/tests/suite/fuzzy_file_search.rsintermittently loses the expectedfuzzyFileSearch/sessionUpdatedandfuzzyFileSearch/sessionCompletednotifications when multiple fuzzy-search sessions are active and CI delivers notifications out of order.Why it was flaky
The wait helpers were keyed only by JSON-RPC method name.
wait_for_session_updatedconsumed the nextfuzzyFileSearch/sessionUpdatednotification even when it belonged to a different search session.wait_for_session_completeddid the same forfuzzyFileSearch/sessionCompleted.The result depended on notification ordering and runner scheduling instead of on the actual product behavior.
How this PR fixes it
codex-rs/app-server/tests/common/mcp_process.rs.Why this fix fixes the flakiness
The test now behaves like a real consumer of an out-of-order event stream: notifications for other sessions stay buffered until the correct waiter asks for them. Reordering no longer loses the target event, so the test result is determined by whether the server emitted the right notifications, not by which one happened to be read first.