agentHost: wait for MCP readiness in hook E2E tests (#338460) · code/app-vscode@2bbc29d · GitHub
Skip to content

Commit 2bbc29d

Browse files
roblourensCopilot
andauthored
agentHost: wait for MCP readiness in hook E2E tests (microsoft#338460)
* agentHost: wait for MCP readiness in hook E2E tests Wait for the default chat's plugin MCP server to report Ready before replaying hook tool calls, and verify real tool completion results so recorded assistant text cannot mask a failed local invocation. Document the readiness and primary-outcome rules in the Agent Host E2E skill. (Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: clarify E2E authoring workflow Separate the basic test authoring and evaluation steps from a curated set of broadly reusable quality principles, so future root-cause learnings can improve the skill without turning it into an incident log. (Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * agentHost: assert MCP hook tool success Require successful tool completion as well as the expected result text in the plugin hook E2E scenarios, so failed local calls cannot satisfy the regression guard. (Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 7804323 commit 2bbc29d

5 files changed

Lines changed: 126 additions & 24 deletions

File tree

‎.github/skills/agent-host-e2e-tests/SKILL.md‎

Lines changed: 30 additions & 21 deletions

‎src/vs/platform/agentHost/test/node/e2e/captures/copilotcli-non-json-plugin-hook-output-is-ignored-without-failing-the-provider-turn.yaml‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ exchanges:
55
model: claude-sonnet-5
66
system: ${system}
77
messages:
8+
- role: user
9+
content: Reply exactly "MCP_READY". Do not call tools.
10+
response:
11+
content: MCP_READY
12+
stopReason: end_turn
13+
- request:
14+
model: claude-sonnet-5
15+
system: ${system}
16+
messages:
17+
- role: user
18+
content: Reply exactly "MCP_READY". Do not call tools.
19+
- role: assistant
20+
content:
21+
- type: thinking
22+
- type: text
23+
text: MCP_READY
824
- role: user
925
content: Call customization_probe exactly once, then reply with only its exact result.
1026
response:
@@ -18,6 +34,13 @@ exchanges:
1834
model: claude-sonnet-5
1935
system: ${system}
2036
messages:
37+
- role: user
38+
content: Reply exactly "MCP_READY". Do not call tools.
39+
- role: assistant
40+
content:
41+
- type: thinking
42+
- type: text
43+
text: MCP_READY
2144
- role: user
2245
content: Call customization_probe exactly once, then reply with only its exact result.
2346
- role: assistant

‎src/vs/platform/agentHost/test/node/e2e/captures/copilotcli-plugin-posttooluse-hook-runs-after-an-mcp-tool-result.yaml‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ exchanges:
55
model: claude-sonnet-5
66
system: ${system}
77
messages:
8+
- role: user
9+
content: Reply exactly "MCP_READY". Do not call tools.
10+
response:
11+
content: MCP_READY
12+
stopReason: end_turn
13+
- request:
14+
model: claude-sonnet-5
15+
system: ${system}
16+
messages:
17+
- role: user
18+
content: Reply exactly "MCP_READY". Do not call tools.
19+
- role: assistant
20+
content:
21+
- type: thinking
22+
- type: text
23+
text: MCP_READY
824
- role: user
925
content: Call customization_probe exactly once, then reply with only its exact result.
1026
response:
@@ -18,6 +34,13 @@ exchanges:
1834
model: claude-sonnet-5
1935
system: ${system}
2036
messages:
37+
- role: user
38+
content: Reply exactly "MCP_READY". Do not call tools.
39+
- role: assistant
40+
content:
41+
- type: thinking
42+
- type: text
43+
text: MCP_READY
2144
- role: user
2245
content: Call customization_probe exactly once, then reply with only its exact result.
2346
- role: assistant

‎src/vs/platform/agentHost/test/node/e2e/captures/copilotcli-plugin-pretooluse-hook-runs-before-an-mcp-tool.yaml‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ exchanges:
55
model: claude-sonnet-5
66
system: ${system}
77
messages:
8+
- role: user
9+
content: Reply exactly "MCP_READY". Do not call tools.
10+
response:
11+
content: MCP_READY
12+
stopReason: end_turn
13+
- request:
14+
model: claude-sonnet-5
15+
system: ${system}
16+
messages:
17+
- role: user
18+
content: Reply exactly "MCP_READY". Do not call tools.
19+
- role: assistant
20+
content:
21+
- type: thinking
22+
- type: text
23+
text: MCP_READY
824
- role: user
925
content: Call customization_probe exactly once, then reply with only its exact result.
1026
response:
@@ -18,6 +34,13 @@ exchanges:
1834
model: claude-sonnet-5
1935
system: ${system}
2036
messages:
37+
- role: user
38+
content: Reply exactly "MCP_READY". Do not call tools.
39+
- role: assistant
40+
content:
41+
- type: thinking
42+
- type: text
43+
text: MCP_READY
2144
- role: user
2245
content: Call customization_probe exactly once, then reply with only its exact result.
2346
- role: assistant

‎src/vs/platform/agentHost/test/node/e2e/suites/mcpPluginSuite.ts‎

Lines changed: 27 additions & 3 deletions

0 commit comments

Comments
 (0)