test(mcp): pin session concurrency, document error codes, assert id round-trip

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Mathias Bergqvist
2026-05-04 20:46:07 +02:00
parent ea19516109
commit 50a3b27825
3 changed files with 47 additions and 4 deletions

View File

@@ -15,6 +15,9 @@ func TestRequestUnmarshal(t *testing.T) {
require.NoError(t, json.Unmarshal(raw, &req))
assert.Equal(t, "2.0", req.JSONRPC)
assert.Equal(t, "initialize", req.Method)
// ID is opaque; encoding/json decodes JSON numbers into float64 by default.
// We don't type-assert in the server — we echo it back unchanged.
assert.Equal(t, float64(1), req.ID)
}
func TestErrorResponseShape(t *testing.T) {