2025-11-25 spec compliance fixes + JuliaC trim-compile harness - #4
Open
quinnj wants to merge 6 commits into
Open
2025-11-25 spec compliance fixes + JuliaC trim-compile harness#4quinnj wants to merge 6 commits into
quinnj wants to merge 6 commits into
Conversation
Add a concrete tools-only Streamable HTTP server for native compilation. Typed request envelopes, raw JSON fragments, concrete handlers, and explicit sessions avoid dynamic Function and Dict dispatch while preserving initialize, tools/list, tools/call, ping, and session lifecycle behavior.
…med responses - Return tools/prompts/resources/templates lists in deterministic sorted order so clients get stable prompt-cache-friendly results - Unknown tool/prompt in tools/call & prompts/get now return -32602 (Invalid params) instead of -32601; unknown resource in resources/read returns -32002 (Resource not found) per the 2025-11-25 spec - Client now handles Streamable HTTP POST responses delivered as SSE streams: request-scoped notifications/server requests are dispatched to registered handlers and the final JSON-RPC response is extracted Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
JSON.lazy/typed-parse request paths reach Parsers' recursive float parsing and repr()-based error formatting, neither of which passes the JuliaC --trim=safe verifier (456 errors). Replace them with a minimal self-contained scanner (string unescape incl. surrogate pairs, value extent skipping, Int64 ids) so the static server's entire request graph verifies clean. Drops the StructUtils dependency. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- test/trim_compile_tests.jl: standard trim harness (compiles workloads with --trim=safe in a temp env, requires 0 verifier errors/warnings, runs the produced executable); skips on Julia < 1.12/prerelease/32-bit - test/mcp_trim_safe.jl: StaticMCPServer workload exercising the full session + tools request lifecycle over in-memory HTTP requests - New testset covering deterministic list ordering, spec error codes, and SSE-streamed POST response handling in the client Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
3 tasks
quinnj
added a commit
that referenced
this pull request
Jul 30, 2026
Replace fixed 200 ms sleeps with bounded condition waits. This matches the deterministic listener test change already present in PR #4 and prevents unrelated platform timing failures from masking the stale-session regression.
quinnj
added a commit
that referenced
this pull request
Jul 31, 2026
* fix(transport): return 404 for stale sessions Return the HTTP status required by Streamable HTTP when a client sends an unknown MCP session ID. Keep the JSON-RPC -32001 body so clients can log the protocol error while using HTTP 404 to start a new session. * test(client): wait for streamed events Replace fixed 200 ms sleeps with bounded condition waits. This matches the deterministic listener test change already present in PR #4 and prevents unrelated platform timing failures from masking the stale-session regression.
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.
Summary
Brings the implementation into full compliance with MCP 2025-11-25 and adds the standard JuliaC `--trim=safe` compile harness used across JuliaServices packages.
Spec compliance fixes
Trim-compile harness
Test plan
🤖 Generated with Claude Code