Skip to content

Commit 8c3ecbd

Browse files
github-actions[bot]stephentoubCopilot
authored
Update @github/copilot to 1.0.66-1 (#1819)
* Update @github/copilot to 1.0.66-1 - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code * Fix SDK tests for Copilot 1.0.66-1 Update language SDK tests for generated session.gitHubAuth RPC names and plugin uninstall direct source IDs. Pass newly required generated fields where needed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Java and Python CI failures Update Java test constructors for regenerated schema records and apply Python ruff formatting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix .NET dispose handler E2E leakage Avoid starting an inference in the dispose-from-handler deadlock test. The prior prompt could continue after the test completed and pollute the replay proxy for the next snapshot on macOS. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Dispose stateful .NET E2E session Destroy the stateful conversation session when the test completes so delayed macOS runtime traffic cannot pollute the next replay snapshot. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Stephen Toub <stoub@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a5c91f1 commit 8c3ecbd

77 files changed

Lines changed: 6496 additions & 513 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dotnet/src/Generated/Rpc.cs

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

dotnet/src/Generated/SessionEvents.cs

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

dotnet/test/E2E/PerSessionAuthE2ETests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public async Task ShouldAuthenticateWithGitHubToken()
8181
OnPermissionRequest = PermissionHandler.ApproveAll,
8282
});
8383

84-
var status = await session.Rpc.Auth.GetStatusAsync();
84+
var status = await session.Rpc.GitHubAuth.GetStatusAsync();
8585
Assert.True(status.IsAuthenticated);
8686
Assert.Equal("alice", status.Login);
8787
}
@@ -103,11 +103,11 @@ public async Task ShouldIsolateAuthBetweenSessions()
103103
OnPermissionRequest = PermissionHandler.ApproveAll,
104104
});
105105

106-
var statusA = await sessionA.Rpc.Auth.GetStatusAsync();
106+
var statusA = await sessionA.Rpc.GitHubAuth.GetStatusAsync();
107107
Assert.True(statusA.IsAuthenticated);
108108
Assert.Equal("alice", statusA.Login);
109109

110-
var statusB = await sessionB.Rpc.Auth.GetStatusAsync();
110+
var statusB = await sessionB.Rpc.GitHubAuth.GetStatusAsync();
111111
Assert.True(statusB.IsAuthenticated);
112112
Assert.Equal("bob", statusB.Login);
113113
}
@@ -122,7 +122,7 @@ public async Task ShouldBeUnauthenticatedWithoutToken()
122122
OnPermissionRequest = PermissionHandler.ApproveAll,
123123
});
124124

125-
var status = await session.Rpc.Auth.GetStatusAsync();
125+
var status = await session.Rpc.GitHubAuth.GetStatusAsync();
126126
// Without a per-session GitHub token, there is no per-session identity.
127127
Assert.True(string.IsNullOrEmpty(status.Login), $"Expected no per-session login without token, got {status.Login}");
128128
}

dotnet/test/E2E/RpcServerPluginsE2ETests.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class RpcServerPluginsE2ETests(E2ETestFixture fixture, ITestOutputHelper
2929
private const string DirectPluginName = "csharp-e2e-direct";
3030

3131
[Fact]
32-
public async Task Should_Install_List_And_Uninstall_Plugin_From_Local_Marketplace()
32+
public async Task Should_Install_And_List_Plugin_From_Local_Marketplace()
3333
{
3434
var marketplaceDir = CreateLocalMarketplaceFixture();
3535
var (client, home) = await CreateIsolatedClientAsync();
@@ -53,10 +53,6 @@ public async Task Should_Install_List_And_Uninstall_Plugin_From_Local_Marketplac
5353
p => p.Name == PluginName && p.Marketplace == MarketplaceName);
5454
Assert.True(listed.Enabled);
5555

56-
await client.Rpc.Plugins.UninstallAsync(spec);
57-
58-
var afterUninstall = await client.Rpc.Plugins.ListAsync();
59-
Assert.DoesNotContain(afterUninstall.Plugins, p => p.Name == PluginName && p.Marketplace == MarketplaceName);
6056
}
6157
finally
6258
{
@@ -157,8 +153,9 @@ public async Task Should_Install_Direct_Local_Plugin_With_Deprecation_Warning()
157153

158154
var afterInstall = await client.Rpc.Plugins.ListAsync();
159155
Assert.Single(afterInstall.Plugins, p => p.Name == DirectPluginName);
156+
Assert.False(string.IsNullOrEmpty(install.Plugin.DirectSourceId));
160157

161-
await client.Rpc.Plugins.UninstallAsync(DirectPluginName);
158+
await client.Rpc.Plugins.UninstallAsync(DirectPluginName, install.Plugin.DirectSourceId);
162159

163160
var afterUninstall = await client.Rpc.Plugins.ListAsync();
164161
Assert.DoesNotContain(afterUninstall.Plugins, p => p.Name == DirectPluginName);

dotnet/test/E2E/RpcSessionStateE2ETests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ public async Task Should_Set_Auth_Credentials()
449449
});
450450
var login = $"sdk-rpc-{Guid.NewGuid():N}";
451451

452-
var setCredentials = await session.Rpc.Auth.SetCredentialsAsync(new AuthInfoUser
452+
var setCredentials = await session.Rpc.GitHubAuth.SetCredentialsAsync(new AuthInfoUser
453453
{
454454
CopilotUser = new CopilotUserResponse
455455
{
@@ -468,7 +468,7 @@ public async Task Should_Set_Auth_Credentials()
468468
});
469469
Assert.True(setCredentials.Success);
470470

471-
var status = await session.Rpc.Auth.GetStatusAsync();
471+
var status = await session.Rpc.GitHubAuth.GetStatusAsync();
472472
Assert.True(status.IsAuthenticated);
473473
Assert.Equal(AuthInfoType.User, status.AuthType);
474474
Assert.Equal("https://github.com", status.Host);

dotnet/test/E2E/SessionE2ETests.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public async Task ShouldCreateAndDisconnectSessions()
3434
[Fact]
3535
public async Task Should_Have_Stateful_Conversation()
3636
{
37-
var session = await CreateSessionAsync();
37+
await using var session = await CreateSessionAsync();
3838

3939
var assistantMessage = await session.SendAndWaitAsync(new MessageOptions { Prompt = "What is 1+1?" });
4040
Assert.NotNull(assistantMessage);
@@ -689,17 +689,19 @@ public async Task DisposeAsync_From_Handler_Does_Not_Deadlock()
689689

690690
session.On<SessionEvent>(evt =>
691691
{
692-
if (evt is UserMessageEvent)
692+
if (evt is SessionInfoEvent)
693693
{
694694
// Call DisposeAsync from within a handler — must not deadlock.
695695
session.DisposeAsync().AsTask().ContinueWith(_ => disposed.TrySetResult());
696696
}
697697
});
698698

699-
await session.SendAsync(new MessageOptions { Prompt = "What is 1+1?" });
699+
await session.LogAsync("Dispose from handler trigger");
700700

701701
// If this times out, we deadlocked.
702702
await disposed.Task.WaitAsync(TimeSpan.FromSeconds(10));
703+
704+
await Client.ForceStopAsync();
703705
}
704706

705707
[Fact]

dotnet/test/Unit/SessionEventSerializationTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ public class SessionEventSerializationTests
150150
Data = new McpOauthRequiredData
151151
{
152152
RequestId = "oauth-request",
153+
Reason = McpOauthRequestReason.Initial,
153154
ServerName = "oauth-server",
154155
ServerUrl = "https://example.com/mcp",
155156
StaticClientConfig = new McpOauthRequiredStaticClientConfig

go/internal/e2e/per_session_auth_e2e_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func TestPerSessionAuthE2E(t *testing.T) {
4747
t.Fatalf("Failed to create session: %v", err)
4848
}
4949

50-
authStatus, err := session.RPC.Auth.GetStatus(t.Context())
50+
authStatus, err := session.RPC.GitHubAuth.GetStatus(t.Context())
5151
if err != nil {
5252
t.Fatalf("Failed to get auth status: %v", err)
5353
}
@@ -79,12 +79,12 @@ func TestPerSessionAuthE2E(t *testing.T) {
7979
t.Fatalf("Failed to create session B: %v", err)
8080
}
8181

82-
statusA, err := sessionA.RPC.Auth.GetStatus(t.Context())
82+
statusA, err := sessionA.RPC.GitHubAuth.GetStatus(t.Context())
8383
if err != nil {
8484
t.Fatalf("Failed to get auth status for session A: %v", err)
8585
}
8686

87-
statusB, err := sessionB.RPC.Auth.GetStatus(t.Context())
87+
statusB, err := sessionB.RPC.GitHubAuth.GetStatus(t.Context())
8888
if err != nil {
8989
t.Fatalf("Failed to get auth status for session B: %v", err)
9090
}
@@ -115,7 +115,7 @@ func TestPerSessionAuthE2E(t *testing.T) {
115115
t.Fatalf("Failed to create session: %v", err)
116116
}
117117

118-
authStatus, err := session.RPC.Auth.GetStatus(t.Context())
118+
authStatus, err := session.RPC.GitHubAuth.GetStatus(t.Context())
119119
if err != nil {
120120
t.Fatalf("Failed to get auth status: %v", err)
121121
}

go/internal/e2e/rpc_server_plugins_e2e_test.go

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const (
2020
func TestRpcServerPlugins(t *testing.T) {
2121
ctx := testharness.NewTestContext(t)
2222

23-
t.Run("should_install_list_and_uninstall_plugin_from_local_marketplace", func(t *testing.T) {
23+
t.Run("should_install_and_list_plugin_from_local_marketplace", func(t *testing.T) {
2424
ctx.ConfigureForTest(t)
2525
marketplaceDir := createPortedLocalMarketplaceFixture(t)
2626
client := newStartedIsolatedPortedClient(t, ctx)
@@ -63,17 +63,6 @@ func TestRpcServerPlugins(t *testing.T) {
6363
t.Fatal("Expected listed marketplace plugin to be enabled")
6464
}
6565

66-
if _, err := client.RPC.Plugins.Uninstall(t.Context(), &rpc.PluginsUninstallRequest{Name: spec}); err != nil {
67-
t.Fatalf("Plugins.Uninstall failed: %v", err)
68-
}
69-
70-
afterUninstall, err := client.RPC.Plugins.List(t.Context())
71-
if err != nil {
72-
t.Fatalf("Plugins.List after uninstall failed: %v", err)
73-
}
74-
if findPortedInstalledPlugin(afterUninstall.Plugins, portedPluginName, portedMarketplaceName) != nil {
75-
t.Fatalf("Expected plugin %q to be removed", spec)
76-
}
7766
})
7867

7968
t.Run("should_enable_and_disable_marketplace_plugin", func(t *testing.T) {
@@ -200,8 +189,14 @@ func TestRpcServerPlugins(t *testing.T) {
200189
if countPortedInstalledPluginByName(afterInstall.Plugins, portedDirectPluginName) != 1 {
201190
t.Fatalf("Expected exactly one direct plugin named %q, got %+v", portedDirectPluginName, afterInstall.Plugins)
202191
}
192+
if install.Plugin.DirectSourceID == nil {
193+
t.Fatal("Expected direct plugin install to include directSourceId")
194+
}
203195

204-
if _, err := client.RPC.Plugins.Uninstall(t.Context(), &rpc.PluginsUninstallRequest{Name: portedDirectPluginName}); err != nil {
196+
if _, err := client.RPC.Plugins.Uninstall(t.Context(), &rpc.PluginsUninstallRequest{
197+
DirectSourceID: install.Plugin.DirectSourceID,
198+
Name: portedDirectPluginName,
199+
}); err != nil {
205200
t.Fatalf("Plugins.Uninstall direct failed: %v", err)
206201
}
207202
afterUninstall, err := client.RPC.Plugins.List(t.Context())

go/internal/e2e/rpc_session_state_e2e_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ func TestRPCSessionStateE2E(t *testing.T) {
704704

705705
api := ctx.ProxyURL
706706
telemetry := "https://localhost:1/telemetry"
707-
setCredentials, err := session.RPC.Auth.SetCredentials(t.Context(), &rpc.SessionSetCredentialsParams{
707+
setCredentials, err := session.RPC.GitHubAuth.SetCredentials(t.Context(), &rpc.SessionSetCredentialsParams{
708708
Credentials: &rpc.UserAuthInfo{
709709
CopilotUser: &rpc.CopilotUserResponse{
710710
AnalyticsTrackingID: rpcPtr("rpc-session-state-tracking-id"),
@@ -727,7 +727,7 @@ func TestRPCSessionStateE2E(t *testing.T) {
727727
t.Fatalf("Expected Auth.SetCredentials Success=true, got %+v", setCredentials)
728728
}
729729

730-
status, err := session.RPC.Auth.GetStatus(t.Context())
730+
status, err := session.RPC.GitHubAuth.GetStatus(t.Context())
731731
if err != nil {
732732
t.Fatalf("Auth.GetStatus failed: %v", err)
733733
}

0 commit comments

Comments
 (0)