Skip to content

MCP parity: request metadata and 165 interaction tests#11

Merged
0xeb merged 5 commits intomainfrom
feature/mcp-parity-20251126
Nov 28, 2025
Merged

MCP parity: request metadata and 165 interaction tests#11
0xeb merged 5 commits intomainfrom
feature/mcp-parity-20251126

Conversation

@0xeb
Copy link
Copy Markdown
Owner

@0xeb 0xeb commented Nov 28, 2025

Summary

  • Add 165 server interaction tests matching Python's test_server_interactions.py
  • Add request metadata fields to Context (method, params access)
  • Comprehensive test coverage for tools, resources, prompts, and edge cases

Test plan

  • All 36 tests pass locally
  • CI passes

0xeb added 5 commits November 28, 2025 01:49
Comprehensive test coverage matching Python's test_server_interactions.py:
- TestTools, TestToolParameters, TestOutputSchema, TestContentTypes
- TestResource, TestResourceTemplates, TestResourceAnnotations
- TestPrompts, TestPromptVariations, TestMeta
- TestCapabilities, TestProgressAndNotifications, TestRootsNotification
- TestCancelledNotification, TestLogging, TestImageContent
- TestEmbeddedResource, TestToolInputValidation, TestResourceSubscribe
- TestCompletionEdgeCases, TestBatchOperations, TestTransportEdgeCases
- Unicode, pagination, large data, error handling, and edge cases

Also fixes iterator dereference bug in client.hpp when accessing
structuredContent without registered outputSchema.
The InitializeResult type is a typed struct, not JSON - use proper
struct field access instead of JSON-style accessor methods.
@0xeb 0xeb merged commit 43e5e64 into main Nov 28, 2025
6 of 9 checks passed
@0xeb 0xeb deleted the feature/mcp-parity-20251126 branch November 28, 2025 10:39
0xeb added a commit that referenced this pull request Nov 28, 2025
Split tests/server/interactions.cpp (5,548 lines, 193KB) into 3 smaller
files to avoid MSVC C1060 "compiler is out of heap space" error on GitHub
Actions Windows CI.

Issue: Windows CI failed at interactions.cpp:2307 with C1060 during both
Debug and Release builds. The file was too large for MSVC to compile in
CI's constrained environment, despite compiling fine locally with the same
compiler version (MSVC 14.44.35207).

Solution: Split into 3 parts following the same pattern as commit 54dc027
which explicitly "split large test files for maintainability":

- interactions_part1.cpp (55 tests, 1,989 lines) - Core Tools/Resources/Prompts
- interactions_part2.cpp (59 tests, 2,104 lines) - Data types/Validation
- interactions_part3.cpp (50 tests, 1,741 lines) - Server capabilities/Notifications

All 164 tests accounted for and passing locally (3/3 tests, 0.04s).

Related: PR #11 (43e5e64) which introduced the large interactions.cpp file.
This change maintains all test coverage while fixing Windows CI builds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant