diff --git a/Directory.Packages.props b/Directory.Packages.props index b5f33da..3160c83 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,15 +6,15 @@ - - + + - - - - + + + + - + @@ -24,6 +24,6 @@ - + \ No newline at end of file diff --git a/tests/ProjGraph.Tests.Integration.Mcp/Helpers/InProcessMcpSession.cs b/tests/ProjGraph.Tests.Integration.Mcp/Helpers/InProcessMcpSession.cs index 039d611..aced357 100644 --- a/tests/ProjGraph.Tests.Integration.Mcp/Helpers/InProcessMcpSession.cs +++ b/tests/ProjGraph.Tests.Integration.Mcp/Helpers/InProcessMcpSession.cs @@ -86,8 +86,11 @@ public static McpServerOptions CreateServerOptions() /// When (the default), pins the client to the 2025-11-25 /// handshake so client capabilities are established session-scoped on the root /// — required by tests that drive that root instance directly. When - /// , the client negotiates the latest revision, where capabilities - /// arrive per request in _meta and are visible only on the request-scoped server. + /// , pins the client to 2026-07-28, where capabilities arrive + /// per request in _meta and are visible only on the request-scoped server. Pinning + /// matters: left unset, the client falls back to the initialize handshake whenever its + /// server/discover probe outlasts + /// (5 seconds), which a loaded CI runner can hit, silently testing the wrong revision. /// public static McpClientOptions CreateClientOptionsWithRoots( Func> rootProvider, @@ -98,7 +101,10 @@ public static McpClientOptions CreateClientOptionsWithRoots( #pragma warning disable MCP9005 return new McpClientOptions { - ProtocolVersion = pinDownLevel ? "2025-11-25" : null, + ProtocolVersion = pinDownLevel ? "2025-11-25" : "2026-07-28", + // The probe is only issued on 2026-07-28; leave it bounded by InitializationTimeout + // alone so a slow runner does not fail the connection. + DiscoverProbeTimeout = Timeout.InfiniteTimeSpan, ClientInfo = new Implementation { Name = "ProjGraph.Tests", diff --git a/tests/ProjGraph.Tests.Integration.Mcp/McpToolRootsTests.cs b/tests/ProjGraph.Tests.Integration.Mcp/McpToolRootsTests.cs index 6a9cd1d..1909d5a 100644 --- a/tests/ProjGraph.Tests.Integration.Mcp/McpToolRootsTests.cs +++ b/tests/ProjGraph.Tests.Integration.Mcp/McpToolRootsTests.cs @@ -49,8 +49,8 @@ public async Task CallTool_RelativePath_OnCurrentProtocol_ShouldResolveAgainstTh await using var session = await InProcessMcpSession.StartAsync( CreateServerOptionsWithTools(), - // Not pinned: the client negotiates the latest revision (2026-07-28), which drops the - // initialize handshake. This is the case that silently regressed on the v2 upgrade. + // Pinned to the latest revision (2026-07-28), which drops the initialize handshake. + // This is the case that silently regressed on the v2 upgrade. InProcessMcpSession.CreateClientOptionsWithRoots(() => [_temp.DirectoryPath], pinDownLevel: false)); var result = await session.Client.CallToolAsync(