Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions dotnet/test/HooksTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ await session.SendAsync(new MessageOptions
Assert.Contains(preToolUseInputs, i => !string.IsNullOrEmpty(i.ToolName));
}

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

// TODO: Re-enable once runtime postToolUse hooks are fixed (https://github.com/github/copilot-sdk/issues/972)
[Fact(Skip = "Runtime postToolUse hooks broken")]
[Fact]
public async Task Should_Invoke_Both_PreToolUse_And_PostToolUse_Hooks_For_Single_Tool_Call()
{
var preToolUseInputs = new List<PreToolUseHookInput>();
Expand Down
4 changes: 0 additions & 4 deletions go/internal/e2e/hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ func TestHooks(t *testing.T) {
}
})

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

var postToolUseInputs []copilot.PostToolUseHookInput
Expand Down Expand Up @@ -141,9 +139,7 @@ func TestHooks(t *testing.T) {
}
})

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

var preToolUseInputs []copilot.PreToolUseHookInput
Expand Down
56 changes: 28 additions & 28 deletions nodejs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"author": "GitHub",
"license": "MIT",
"dependencies": {
"@github/copilot": "^1.0.15-1",
"@github/copilot": "^1.0.15-2",
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When bumping @github/copilot here, the repo’s dependency-update workflow also updates test/harness and refreshes nodejs/samples lockfile. Right now test/harness/package.json is still pinned to ^1.0.14-0 and nodejs/samples/package-lock.json still records an older @github/copilot range for the file:.. dependency; that can leave parts of the repo on different runtime/type versions and can make npm ci in those dirs fail due to lockfile drift. Please update test/harness (package.json + lock) and regenerate nodejs/samples/package-lock.json as part of this runtime bump.

Suggested change
"@github/copilot": "^1.0.15-2",
"@github/copilot": "^1.0.14-0",

Copilot uses AI. Check for mistakes.
"vscode-jsonrpc": "^8.2.1",
"zod": "^4.3.6"
},
Expand Down
6 changes: 2 additions & 4 deletions nodejs/test/e2e/hooks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ describe("Session hooks", async () => {
await session.disconnect();
});

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

const session = await client.createSession({
Comment on lines +51 to 54
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the re-enabled postToolUse test, the assertions later in the body only check toolResult !== undefined. Since PostToolUseHookInput.toolResult is required by the SDK types and other language tests assert non-null, consider tightening this test to fail if the runtime ever provides a null/empty toolResult (e.g., assert non-null and validate a key field like resultType/textResultForLlm). This will better catch regressions in the postToolUse payload.

Copilot uses AI. Check for mistakes.
Expand Down Expand Up @@ -80,8 +79,7 @@ describe("Session hooks", async () => {
await session.disconnect();
});

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

Expand Down
4 changes: 0 additions & 4 deletions python/e2e/test_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ async def on_pre_tool_use(input_data, invocation):

await session.disconnect()

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

await session.disconnect()

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