Skip to content

test(mcp): integration test — MCP protocol path over the real socket to a live core - #1690

Merged
joelteply merged 1 commit into
canaryfrom
test/mcp-server-integration
Jun 19, 2026
Merged

joelteply merged 1 commit into
canaryfrom
test/mcp-server-integration

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Why

The mcp_protocol / mcp_transport unit tests mock CommandDispatch, 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-mcp ships — CoreIpcTransport → Connection → ConnectionDispatch → McpServer — and round-trips against a live core:

  • initialize — handshake survives the real transport (ids line up, serverInfo populated)
  • tools/list — round-trips to the real command catalog (non-empty, meta tools present)
  • tools/call — maps (mcp_search_tools → mcp/search-tools, hyphen-exception) + dispatches through the socket; well-formed CallToolResult

Convention

Skip-if-no-live-core, reusing 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.

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

…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]>
@joelteply
joelteply merged commit 057fdbf into canary Jun 19, 2026
4 checks passed
@joelteply
joelteply deleted the test/mcp-server-integration branch June 19, 2026 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant