TestBuildMetaPayload_FallbackVersion guarantees an empty padVersion resolves to FallbackVersion — same invariant the handshake's serverInfo.version honours, so the meta document never reports a blank pad_version.
(t *testing.T)
| 14 | // serverInfo.version honours, so the meta document never reports a |
| 15 | // blank pad_version. |
| 16 | func TestBuildMetaPayload_FallbackVersion(t *testing.T) { |
| 17 | got := BuildMetaPayload("") |
| 18 | if got.PadVersion != FallbackVersion { |
| 19 | t.Errorf("PadVersion = %q, want fallback %q", got.PadVersion, FallbackVersion) |
| 20 | } |
| 21 | if got.CmdhelpVersion != CmdhelpVersion { |
| 22 | t.Errorf("CmdhelpVersion = %q, want %q", got.CmdhelpVersion, CmdhelpVersion) |
| 23 | } |
| 24 | if got.ToolSurfaceVersion != ToolSurfaceVersion { |
| 25 | t.Errorf("ToolSurfaceVersion = %q, want %q", got.ToolSurfaceVersion, ToolSurfaceVersion) |
| 26 | } |
| 27 | if !got.ToolSurfaceStable { |
| 28 | t.Errorf("ToolSurfaceStable = false, want true") |
| 29 | } |
| 30 | if got.MCPProtocolVersion != AdvertisedMCPProtocolVersion { |
| 31 | t.Errorf("MCPProtocolVersion = %q, want %q", |
| 32 | got.MCPProtocolVersion, AdvertisedMCPProtocolVersion) |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | // TestAdvertisedProtocolVersion is what replaced a tautology. The old |
| 37 | // assertion compared the payload against mcp.LATEST_PROTOCOL_VERSION while |
nothing calls this directly
no test coverage detected