Skip to content

test(mcp): ready providers before live prompt completion checks - #2137

Merged
morluto merged 1 commit into
mainfrom
fix/prompt-completion-ready-checks
Oct 12, 2026
Merged

morluto merged 1 commit into
mainfrom
fix/prompt-completion-ready-checks

Conversation

@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

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, at c22111eca, 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.ts fails with expected [] to deeply equal [ 'App', 'AppTests' ]
  • Native package baseline (darwin arm64 / x64): packaged MCP prompt completion lifecycle failed

Root cause

07b36c148 made document and procedure completion call BinarySession.executeIfProviderReady. That path returns nothing unless the provider client already exists and implements executeIfReady. CompositeProvider creates clients only on the first ordinary execute. The intended contract is that completion never cold-starts a provider. The commit updated promptMcp.test.ts but missed two checks that still completed straight after opening a target:

  1. promptCompletion.test.ts: the fixture client had no executeIfReady, and no ordinary operation ran before completion.
  2. scripts/verify-package-mcp.mjs: on non-Linux hosts it expected ["fixture"] immediately after open_binary, before current_document started the fake Hopper. Linux passed only because it expects [] there.

Change

Production code is untouched; only the two stale checks change. Each now:

  • asserts that completion on a cold session is [], which proves completion does not start the provider
  • readies the provider through an ordinary operation (list_documents in the test, current_document in the packaged smoke)
  • asserts the same live candidates as before (App/AppTests with the procedure set; ["fixture"] on non-Linux)

The fixture client gains executeIfReady because 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 passed
  • npm run verify:package on macOS arm64 (the failing CI host): passed
  • npm run check:fast: passed
  • Not run locally: the darwin x64 and Linux package hosts, which CI covers.

Fixes #2123

🤖 Generated with Claude Code

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]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T10:25:58.758597Z 5d4fb61 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.

@morluto
morluto merged commit 621cee1 into main Oct 12, 2026
31 checks passed
@morluto
morluto deleted the fix/prompt-completion-ready-checks branch October 12, 2026 10:37
@github-actions github-actions Bot mentioned this pull request Oct 12, 2026
3 tasks done
@morluto morluto added area: tests Test suite and verification area: mcp MCP server, transport, and tool registration labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: mcp MCP server, transport, and tool registration area: tests Test suite and verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Main CI fails prompt completion checks since 07b36c148

2 participants