Repository navigation
test(mcp): integration test — MCP protocol path over the real socket to a live core - #1690
Merged
Merged
Conversation
…to a live core Unit tests in mcp_protocol/mcp_transport mock CommandDispatch, so they never exercise the socket transport reaching a real core — exactly the gap that let the airc self-peer timeout (continuum-mcp #21) slip past green unit tests. This integration test rebuilds the EXACT composition the continuum-mcp bin ships (CoreIpcTransport → Connection → ConnectionDispatch → McpServer) and round-trips initialize → tools/list → tools/call against a live core: - initialize handshake survives the real transport (ids line up, serverInfo set) - tools/list round-trips to the real command catalog (non-empty, meta tools present) - tools/call maps + dispatches through the socket (well-formed CallToolResult) Follows the repo's skip-if-no-live-core convention (reuses tests/common; like call_server_integration / ipc_voice_tests): with `npm start` up it exercises the live path, otherwise it skips cleanly so plain `cargo test` stays green. The hermetic in-process-serve variant (boot a minimal runtime on a temp socket so this runs in CI without npm start) is the tracked depth follow-up (#22). Co-Authored-By: Claude Opus 4.8 <[email protected]>
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
The
mcp_protocol/mcp_transportunit tests mockCommandDispatch, so they never exercise the socket transport reaching a real core — exactly the gap that let the airc self-peer timeout (#21) slip past green unit tests. This pins that wiring.What
Rebuilds the EXACT composition
continuum-mcpships —CoreIpcTransport → Connection → ConnectionDispatch → McpServer— and round-trips against a live core:serverInfopopulated)mcp_search_tools→mcp/search-tools, hyphen-exception) + dispatches through the socket; well-formedCallToolResultConvention
Skip-if-no-live-core, reusing
tests/common(likecall_server_integration/ipc_voice_tests). Withnpm startup it exercises the live path; otherwise it skips cleanly so plaincargo teststays green.Validation
cargo test -p continuum-core --features metal,accelerate --test mcp_server_integration→ compiles the real composition + 3 tests pass (skip-path; no core was up locally). The compile validates the wiring typechecks exactly as the bin; live-core run is the documented manual/CI-lane step.Follow-up (#22)
Hermetic in-process-serve variant — boot a minimal runtime on a temp socket so this runs in CI without
npm start. Tracked.🤖 Generated with Claude Code