{ "version": 1, "caseName": "conversation-session-mcp-oauth-status-isolation", "spec": "./test/e2e/conversation-session/plugins/conversation-session-mcp-oauth-status-isolation.test.ts", "fixtures": [ { "id": "conversation-session-mcp-oauth-status-isolation-title-sidecar", "description": "本例标题旁路响应。", "metadata": { "kind": "common", "source": "synthetic", "timingPolicy": "fast-text", "syntheticReason": "运行时证据显示标题旁路缺少响应;在本例显式登记固定标题,避免依赖 legacy fixture 或触发后台网络重试。" }, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": ["Generate a concise title"] }, "response": { "statusCode": 200, "statusMessage": "OK", "headers": { "content-type": "application/json; charset=utf-8" }, "body": "{\"id\":\"upstream-e2e-title-fixture\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Upstream E2E Fixture\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":125,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":24,\"service_tier\":\"standard\"}}" } }, { "id": "upstream-mcp-oauth-status-isolation-direct-call", "description": "OAuth 授权完成后先调用仍保持连接的用户级 stdio MCP ping 工具。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "稳定触发用户级 stdio MCP 的真实 tools/call,避免依赖模型自行选择工具。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_MCP_OAUTH_STATUS_ISOLATION"], "bodyIncludes": [ "E2E_MCP_OAUTH_STATUS_ISOLATION", "mcp__everything__ping", "mcp__plain_http__ping" ], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "toolUse": { "id": "toolu_e2e_mcp_oauth_status_isolation_direct", "name": "mcp__everything__ping", "input": { "marker": "E2E_MCP_OAUTH_STATUS_ISOLATION" } } } }, { "id": "upstream-mcp-oauth-status-isolation-http-call", "description": "消费 stdio MCP tool_result 后调用普通无鉴权 HTTP MCP ping 工具。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "证明 OAuth status refresh 后 stdio MCP tool_result 能进入 provider continuation,并继续选择普通 HTTP MCP。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": [ "E2E_MCP_OAUTH_STATUS_ISOLATION", "toolu_e2e_mcp_oauth_status_isolation_direct", "E2E_MCP_DIRECT_PONG:E2E_MCP_OAUTH_STATUS_ISOLATION", "mcp__plain_http__ping" ], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "toolUse": { "id": "toolu_e2e_mcp_oauth_status_isolation_http", "name": "mcp__plain_http__ping", "input": { "marker": "E2E_MCP_OAUTH_STATUS_ISOLATION" } } } }, { "id": "upstream-mcp-oauth-status-isolation-final", "description": "消费 stdio 与普通 HTTP MCP 的真实 tool_result 并完成会话。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "证明两类用户 MCP 的 tool_result 都能进入 provider continuation。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": [ "E2E_MCP_OAUTH_STATUS_ISOLATION", "toolu_e2e_mcp_oauth_status_isolation_direct", "E2E_MCP_DIRECT_PONG:E2E_MCP_OAUTH_STATUS_ISOLATION", "toolu_e2e_mcp_oauth_status_isolation_http", "E2E_MCP_HTTP_PONG:E2E_MCP_OAUTH_STATUS_ISOLATION" ], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "text": "upstream-e2e-ok" } } ] }