Repository navigation
test(mcp): ready providers before live prompt completion checks - #2137
Merged
Merged
Conversation
07b36c1 made document and procedure completion read only from an already-started provider client. Two checks still completed right after opening a target, so they observed an empty cold result: - promptCompletion.test.ts used a fixture client without executeIfReady and never ran an ordinary operation, so the composite provider had not created a client yet. - The packaged MCP smoke expected live completions on non-Linux hosts immediately after open_binary, before current_document started Hopper. Both now assert the cold result is empty, ready the provider through an ordinary operation, and then assert the unchanged live candidates. Fixes #2123 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
3 tasks done
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
Main CI has failed since
07b36c148(fix(mcp): keep prompt completion within ready provider sessions). Its own run was cancelled; the first completed run after it, atc22111eca, failed. The same two failures now appear on every open PR based on main (#2118, #2125, #2131). Tracked in #2123.Test shard:tests/boundary/mcp/promptCompletion.test.tsfails withexpected [] to deeply equal [ 'App', 'AppTests' ]Native package baseline (darwin arm64 / x64):packaged MCP prompt completion lifecycle failedRoot cause
07b36c148made document and procedure completion callBinarySession.executeIfProviderReady. That path returns nothing unless the provider client already exists and implementsexecuteIfReady.CompositeProvidercreates clients only on the first ordinaryexecute. The intended contract is that completion never cold-starts a provider. The commit updatedpromptMcp.test.tsbut missed two checks that still completed straight after opening a target:promptCompletion.test.ts: the fixture client had noexecuteIfReady, and no ordinary operation ran before completion.scripts/verify-package-mcp.mjs: on non-Linux hosts it expected["fixture"]immediately afteropen_binary, beforecurrent_documentstarted the fake Hopper. Linux passed only because it expects[]there.Change
Production code is untouched; only the two stale checks change. Each now:
[], which proves completion does not start the providerlist_documentsin the test,current_documentin the packaged smoke)App/AppTestswith the procedure set;["fixture"]on non-Linux)The fixture client gains
executeIfReadybecause it is an in-process client that is ready as soon as the session opens. No assertion was removed or relaxed.Validation
npm run test:focused -- tests/boundary/mcp/promptCompletion.test.ts tests/boundary/mcp/promptMcp.test.ts: 15 passednpm run verify:packageon macOS arm64 (the failing CI host): passednpm run check:fast: passedFixes #2123
🤖 Generated with Claude Code