Skip to content

Commit fd5d064

Browse files
stephentoubCopilot
andcommitted
Fix stale hooks E2E snapshots for .NET/Rust/Java (1.0.64-0)
Test-name sanitization differs across SDKs, so .NET/Rust/Java consume differently-named snapshot files than Node/Go/Python for the same hooks tests. Those files still recorded the removed report_intent tool's "Intent logged" success result. Overwrite them with the fresh new-runtime recordings (report_intent -> "does not exist"): - invoke_both_hooks_for_single_tool_call.yaml (Java) - should_invoke_both_pretooluse_and_posttooluse_hooks_for_single_tool_call.yaml (.NET/Rust) - invoke_pre_tool_use_hook_when_model_runs_a_tool.yaml (Java) - invoke_post_tool_use_hook_after_model_runs_a_tool.yaml (Java) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c99d8e0 commit fd5d064

4 files changed

Lines changed: 32 additions & 8 deletions

test/snapshots/hooks/invoke_both_hooks_for_single_tool_call.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,15 @@ conversations:
3939
arguments: '{"path":"${workdir}/both.txt"}'
4040
- role: tool
4141
tool_call_id: toolcall_0
42-
content: Intent logged
42+
content: Tool 'report_intent' does not exist. Available tools that can be called are ${shell}, ${read_shell},
43+
${stop_shell}, ${list_shell}, view, create, edit, web_fetch, skill, sql, read_agent, list_agents, grep, glob,
44+
task.
4345
- role: tool
4446
tool_call_id: toolcall_1
4547
content: 1. Testing both hooks!
4648
- role: assistant
47-
content: 'The file contains: "Testing both hooks!"'
49+
content: |-
50+
The file **both.txt** contains:
51+
```
52+
Testing both hooks!
53+
```

test/snapshots/hooks/invoke_post_tool_use_hook_after_model_runs_a_tool.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,14 @@ conversations:
3939
arguments: '{"path":"${workdir}/world.txt"}'
4040
- role: tool
4141
tool_call_id: toolcall_0
42-
content: Intent logged
42+
content: Tool 'report_intent' does not exist. Available tools that can be called are ${shell}, ${read_shell},
43+
${stop_shell}, ${list_shell}, view, create, edit, web_fetch, skill, sql, read_agent, list_agents, grep, glob,
44+
task.
4345
- role: tool
4446
tool_call_id: toolcall_1
4547
content: 1. World from the test!
4648
- role: assistant
47-
content: 'The file world.txt contains: "World from the test!"'
49+
content: |-
50+
The file `world.txt` contains:
51+
52+
**"World from the test!"**

test/snapshots/hooks/invoke_pre_tool_use_hook_when_model_runs_a_tool.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,16 @@ conversations:
3939
arguments: '{"path":"${workdir}/hello.txt"}'
4040
- role: tool
4141
tool_call_id: toolcall_0
42-
content: Intent logged
42+
content: Tool 'report_intent' does not exist. Available tools that can be called are ${shell}, ${read_shell},
43+
${stop_shell}, ${list_shell}, view, create, edit, web_fetch, skill, sql, read_agent, list_agents, grep, glob,
44+
task.
4345
- role: tool
4446
tool_call_id: toolcall_1
4547
content: 1. Hello from the test!
4648
- role: assistant
47-
content: The file says "Hello from the test!"
49+
content: |-
50+
The file **hello.txt** contains:
51+
52+
```
53+
Hello from the test!
54+
```

test/snapshots/hooks/should_invoke_both_pretooluse_and_posttooluse_hooks_for_single_tool_call.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,15 @@ conversations:
3939
arguments: '{"path":"${workdir}/both.txt"}'
4040
- role: tool
4141
tool_call_id: toolcall_0
42-
content: Intent logged
42+
content: Tool 'report_intent' does not exist. Available tools that can be called are ${shell}, ${read_shell},
43+
${stop_shell}, ${list_shell}, view, create, edit, web_fetch, skill, sql, read_agent, list_agents, grep, glob,
44+
task.
4345
- role: tool
4446
tool_call_id: toolcall_1
4547
content: 1. Testing both hooks!
4648
- role: assistant
47-
content: 'The file `both.txt` contains: "Testing both hooks!"'
49+
content: |-
50+
The file **both.txt** contains:
51+
```
52+
Testing both hooks!
53+
```

0 commit comments

Comments
 (0)