Skip to content

Commit 8fb154e

Browse files
fix: update runtime to 1.0.15-2, re-enable postToolUse hook tests (#978)
The postToolUse hook regression (issue #972) was fixed in runtime PR copilot-agent-runtime#5629. Update @github/copilot to 1.0.15-2 and re-enable all skipped postToolUse hook tests across all 4 languages. Regenerate stale snapshots.
1 parent 6e3d72c commit 8fb154e

File tree

6 files changed

+33
-45
lines changed

6 files changed

+33
-45
lines changed

dotnet/test/HooksTests.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ await session.SendAsync(new MessageOptions
4646
Assert.Contains(preToolUseInputs, i => !string.IsNullOrEmpty(i.ToolName));
4747
}
4848

49-
// TODO: Re-enable once runtime postToolUse hooks are fixed (https://github.com/github/copilot-sdk/issues/972)
50-
[Fact(Skip = "Runtime postToolUse hooks broken")]
49+
[Fact]
5150
public async Task Should_Invoke_PostToolUse_Hook_After_Model_Runs_A_Tool()
5251
{
5352
var postToolUseInputs = new List<PostToolUseHookInput>();
@@ -84,8 +83,7 @@ await session.SendAsync(new MessageOptions
8483
Assert.Contains(postToolUseInputs, i => i.ToolResult != null);
8584
}
8685

87-
// TODO: Re-enable once runtime postToolUse hooks are fixed (https://github.com/github/copilot-sdk/issues/972)
88-
[Fact(Skip = "Runtime postToolUse hooks broken")]
86+
[Fact]
8987
public async Task Should_Invoke_Both_PreToolUse_And_PostToolUse_Hooks_For_Single_Tool_Call()
9088
{
9189
var preToolUseInputs = new List<PreToolUseHookInput>();

go/internal/e2e/hooks_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@ func TestHooks(t *testing.T) {
7474
}
7575
})
7676

77-
// TODO: Re-enable once runtime postToolUse hooks are fixed (https://github.com/github/copilot-sdk/issues/972)
7877
t.Run("should invoke postToolUse hook after model runs a tool", func(t *testing.T) {
79-
t.Skip("Runtime postToolUse hooks broken")
8078
ctx.ConfigureForTest(t)
8179

8280
var postToolUseInputs []copilot.PostToolUseHookInput
@@ -141,9 +139,7 @@ func TestHooks(t *testing.T) {
141139
}
142140
})
143141

144-
// TODO: Re-enable once runtime postToolUse hooks are fixed (https://github.com/github/copilot-sdk/issues/972)
145142
t.Run("should invoke both preToolUse and postToolUse hooks for a single tool call", func(t *testing.T) {
146-
t.Skip("Runtime postToolUse hooks broken")
147143
ctx.ConfigureForTest(t)
148144

149145
var preToolUseInputs []copilot.PreToolUseHookInput

nodejs/package-lock.json

Lines changed: 28 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nodejs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"author": "GitHub",
5757
"license": "MIT",
5858
"dependencies": {
59-
"@github/copilot": "^1.0.15-1",
59+
"@github/copilot": "^1.0.15-2",
6060
"vscode-jsonrpc": "^8.2.1",
6161
"zod": "^4.3.6"
6262
},

nodejs/test/e2e/hooks.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ describe("Session hooks", async () => {
4848
await session.disconnect();
4949
});
5050

51-
// TODO: Re-enable once runtime postToolUse hooks are fixed (https://github.com/github/copilot-sdk/issues/972)
52-
it.skip("should invoke postToolUse hook after model runs a tool", async () => {
51+
it("should invoke postToolUse hook after model runs a tool", async () => {
5352
const postToolUseInputs: PostToolUseHookInput[] = [];
5453

5554
const session = await client.createSession({
@@ -80,8 +79,7 @@ describe("Session hooks", async () => {
8079
await session.disconnect();
8180
});
8281

83-
// TODO: Re-enable once runtime postToolUse hooks are fixed (https://github.com/github/copilot-sdk/issues/972)
84-
it.skip("should invoke both preToolUse and postToolUse hooks for a single tool call", async () => {
82+
it("should invoke both preToolUse and postToolUse hooks for a single tool call", async () => {
8583
const preToolUseInputs: PreToolUseHookInput[] = [];
8684
const postToolUseInputs: PostToolUseHookInput[] = [];
8785

python/e2e/test_hooks.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ async def on_pre_tool_use(input_data, invocation):
4141

4242
await session.disconnect()
4343

44-
# TODO: Re-enable once runtime postToolUse hooks are fixed (https://github.com/github/copilot-sdk/issues/972)
45-
@pytest.mark.skip(reason="Runtime postToolUse hooks broken")
4644
async def test_should_invoke_posttooluse_hook_after_model_runs_a_tool(
4745
self, ctx: E2ETestContext
4846
):
@@ -73,8 +71,6 @@ async def on_post_tool_use(input_data, invocation):
7371

7472
await session.disconnect()
7573

76-
# TODO: Re-enable once runtime postToolUse hooks are fixed (https://github.com/github/copilot-sdk/issues/972)
77-
@pytest.mark.skip(reason="Runtime postToolUse hooks broken")
7874
async def test_should_invoke_both_pretooluse_and_posttooluse_hooks_for_a_single_tool_call(
7975
self, ctx: E2ETestContext
8076
):

0 commit comments

Comments
 (0)