Skip to content

Commit 1600b57

Browse files
stephentoubCopilot
andauthored
Make exit_plan_mode E2E snapshot tolerant of reworded CLI tool result (#1639)
The runtime reworded the exit_plan_mode post-approval tool result for interactive mode. The copilot-agent-runtime `C# SDK tests'' leg builds the CLI from source (new wording) and started failing because the recorded snapshot only contained the old wording, so the replay proxy could not match the request. Published @github/copilot 1.0.61 (pinned by this repo's own E2E harness and all language legs) still emits the old wording, so the snapshot must satisfy both. Add a second conversation variant covering the new wording; the replay proxy matches a request as a strict prefix of any stored conversation, so old and new CLI versions both resolve. The SDK never asserts on this CLI-internal text. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 810bbbf commit 1600b57

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

test/snapshots/mode_handlers/should_invoke_exit_plan_mode_handler_when_model_uses_tool.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
models:
22
- claude-sonnet-4.5
3+
# Two stored conversations cover the two CLI versions of the exit_plan_mode
4+
# post-approval tool result. The CLI injects this text and feeds it back to the
5+
# model; the SDK never asserts on its exact wording. The interactive-mode message
6+
# was reworded in copilot-agent-runtime:
7+
# conv0: CLI 1.0.61 and earlier -> "...interactive mode (edits require manual
8+
# approval). Proceed with implementing the plan."
9+
# conv1: newer runtime builds -> "...interactive mode. Start implementing the
10+
# plan now, in this same response. ..."
11+
# The replay proxy matches a request as a strict prefix of a stored conversation
12+
# and returns the next assistant message, so both versions resolve correctly.
313
conversations:
414
- messages:
515
- role: system
@@ -21,3 +31,23 @@ conversations:
2131
You are now in interactive mode (edits require manual approval). Proceed with implementing the plan.
2232
- role: assistant
2333
content: Plan approved; I will wait for the next instruction before making changes.
34+
- messages:
35+
- role: system
36+
content: ${system}
37+
- role: user
38+
content: Create a brief implementation plan for adding a greeting.txt file, then request approval with exit_plan_mode.
39+
- role: assistant
40+
tool_calls:
41+
- id: toolcall_0
42+
type: function
43+
function:
44+
name: exit_plan_mode
45+
arguments: '{"summary":"Greeting file implementation plan","actions":["interactive","autopilot","exit_only"],"recommendedAction":"interactive"}'
46+
- role: tool
47+
tool_call_id: toolcall_0
48+
content: |-
49+
Plan approved! Exited plan mode.
50+
51+
You are now in interactive mode. Start implementing the plan now, in this same response. Approving the plan is your go-signal, so do not stop to ask whether to proceed or wait for another message.
52+
- role: assistant
53+
content: Plan approved; I will wait for the next instruction before making changes.

0 commit comments

Comments
 (0)