Fix hook snapshot for runtime replay#1337
Conversation
Add the alternate pre-tool-use replay shape emitted by the live runtime so the shared hooks_extended fixture matches both histories. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds an alternate cached conversation to the shared hooks_extended snapshot so E2E hook-replay tests pass against the newer copilot-agent-runtime, which preserves original tool-call arguments in the pre-tool-use history while still applying hook-modified arguments to the tool result.
Changes:
- Append a second conversation variant to the snapshot YAML preserving original
value:"original"in the assistant tool_call while keepingmodified by hookin the tool result.
Show a summary per file
| File | Description |
|---|---|
| test/snapshots/hooks_extended/should_allow_pretooluse_to_return_modifiedargs_and_suppressoutput.yaml | Adds alternate conversation shape to support both old and new runtime history formats during replay. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Cross-SDK Consistency Review ✅This PR makes two types of changes:
No cross-SDK consistency issues found. The changes are either Go-specific test correctness fixes or shared infrastructure that benefits all languages equally.
|
The live runtime now preserves the original tool-call arguments in one pre-tool-use history shape while still applying the hook-modified arguments to the tool result. The shared hooks_extended replay fixture only covered the older shape, so the C# SDK test failed when run against copilot-agent-runtime.
This adds the alternate cached conversation to the shared snapshot while keeping the existing one, so C#, Node, Go, Python, and Rust E2E tests can replay both valid histories.
Validation:
D:\repos\copilot-agent-runtime\dist-cli\index.js: 470 total, 468 passed, 2 skipped.