Skip to content

Commit 2165207

Browse files
github-actions[bot]stephentoubCopilot
authored
Update @github/copilot to 1.0.81-4 (#2363)
* Update @github/copilot to 1.0.81-4 - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code * Fix schema ingestion CI failures Migrate permission-mode tests, harden Go and Java code generation, and restore ephemeral query coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Fix Python and Rust validation Use the public session-events permission mode and apply repository formatting. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Restore in-process Node E2E coverage Remove the temporary 1.0.81-2 model-turn exclusion now that the runtime hang is fixed, and finish the Rust permission-mode imports. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Update Rust permission source expectation Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Restore in-process test coverage Re-enable the Java model-driven suites and the .NET CAPI matrix cells that were disabled for the CLI 1.0.81-2 active-time hang. The Node suites were restored separately. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Keep ephemeral query tests disabled CLI 1.0.81-4 still fails the recorded session.ui.ephemeralQuery exchange across SDKs, independently of the fixed in-process active-time hang. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f70ec065-c448-4cc3-9372-e5796968f52f * Stabilize Python metadata persistence test Poll for persisted session metadata instead of assuming the runtime flushes it within 200 ms. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f70ec065-c448-4cc3-9372-e5796968f52f * Stabilize abort and rewind E2E tests Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f70ec065-c448-4cc3-9372-e5796968f52f * Wait for abort completion before recovery Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f70ec065-c448-4cc3-9372-e5796968f52f * Normalize interrupted tool results in snapshots Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f70ec065-c448-4cc3-9372-e5796968f52f * Keep broken in-process model suites disabled Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f70ec065-c448-4cc3-9372-e5796968f52f * Fix Go lint with disabled in-process transport Keep the unavailable error behind a package-level sentinel so staticcheck does not treat the caller's normal error check as an impossible comparison. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f70ec065-c448-4cc3-9372-e5796968f52f --------- 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 App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f70ec065-c448-4cc3-9372-e5796968f52f
1 parent 1593e22 commit 2165207

112 files changed

Lines changed: 39133 additions & 24538 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.

.github/workflows/dotnet-sdk-tests.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,9 @@ jobs:
3232
- os: windows-latest
3333
transport: default
3434
shard: full
35-
# TODO(cli-1.0.81-2): @github/copilot 1.0.81-2 never completes a model-driven
36-
# turn when the runtime is hosted in-process against the CAPI backend. A full
37-
# run reported 241 failures across 43 classes and took 150-225 minutes, which
38-
# also starved the rest of the matrix. The defect is specific to this pairing:
39-
# the in-process BYOK cells below and the stdio capi cells are unaffected.
40-
# Drop these two entries once a fixed CLI build is picked up.
35+
# TODO(cli-1.0.81-4): in-process CAPI model turns eventually stop
36+
# completing and poison the shared runtime until the job times out.
37+
# Stdio CAPI and in-process BYOK cells remain enabled.
4138
- os: ubuntu-latest
4239
transport: inprocess
4340
- os: macos-latest

dotnet/src/Generated/Rpc.cs

Lines changed: 14506 additions & 11268 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: 135 additions & 136 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dotnet/test/E2E/RewindE2ETests.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,13 @@ await TestHelper.WaitForConditionAsync(
4242
async () =>
4343
{
4444
rewindPoints = await session.Rpc.History.ListRewindPointsAsync();
45-
return rewindPoints.UnavailableReason is null;
45+
return rewindPoints.UnavailableReason is null
46+
&& rewindPoints.Points.Count == 1
47+
&& rewindPoints.Points[0].CanRestoreFiles
48+
&& rewindPoints.Points[0].FileCount == 1;
4649
},
4750
timeout: TimeSpan.FromSeconds(10),
48-
timeoutMessage: "Timed out waiting for rewind points to become available.",
51+
timeoutMessage: "Timed out waiting for a restorable file rewind point.",
4952
pollInterval: TimeSpan.FromMilliseconds(100));
5053

5154
Assert.NotNull(rewindPoints);

dotnet/test/E2E/RpcSessionStateExtrasE2ETests.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace GitHub.Copilot.Test.E2E;
1212
/// <summary>
1313
/// E2E coverage for session-scoped RPC methods that were previously untested:
1414
/// completions, model.list, metadata.activity/context attribution/heaviest messages,
15-
/// permissions.getAllowAll/setAllowAll, plan.readSqlTodos, provider.add,
15+
/// permissions.getMode/setMode, plan.readSqlTodos, provider.add,
1616
/// telemetry.getEngagementId, tools.getCurrentMetadata/updateSubagentSettings,
1717
/// session visibility, and the session-scoped plugins.reload.
1818
/// </summary>
@@ -158,22 +158,22 @@ public async Task Should_Get_And_Set_AllowAll_Permissions()
158158

159159
try
160160
{
161-
var initial = await session.Rpc.Permissions.GetAllowAllAsync();
162-
Assert.False(initial.Enabled, "Allow-all should be disabled on a fresh session.");
161+
var initial = await session.Rpc.Permissions.GetModeAsync();
162+
Assert.Equal(PermissionMode.Manual, initial.Mode);
163163

164-
var enable = await session.Rpc.Permissions.SetAllowAllAsync(enabled: true);
164+
var enable = await session.Rpc.Permissions.SetModeAsync(PermissionMode.AllowAll);
165165
Assert.True(enable.Success);
166-
Assert.True(enable.Enabled);
167-
Assert.True((await session.Rpc.Permissions.GetAllowAllAsync()).Enabled);
166+
Assert.Equal(PermissionMode.AllowAll, enable.Mode);
167+
Assert.Equal(PermissionMode.AllowAll, (await session.Rpc.Permissions.GetModeAsync()).Mode);
168168

169-
var disable = await session.Rpc.Permissions.SetAllowAllAsync(enabled: false);
169+
var disable = await session.Rpc.Permissions.SetModeAsync(PermissionMode.Manual);
170170
Assert.True(disable.Success);
171-
Assert.False(disable.Enabled);
172-
Assert.False((await session.Rpc.Permissions.GetAllowAllAsync()).Enabled);
171+
Assert.Equal(PermissionMode.Manual, disable.Mode);
172+
Assert.Equal(PermissionMode.Manual, (await session.Rpc.Permissions.GetModeAsync()).Mode);
173173
}
174174
finally
175175
{
176-
await session.Rpc.Permissions.SetAllowAllAsync(enabled: false);
176+
await session.Rpc.Permissions.SetModeAsync(PermissionMode.Manual);
177177
}
178178
}
179179

dotnet/test/E2E/RpcUiEphemeralQueryE2ETests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ namespace GitHub.Copilot.Test.E2E;
1919
public class RpcUiEphemeralQueryE2ETests(E2ETestFixture fixture, ITestOutputHelper output)
2020
: E2ETestBase(fixture, "rpc_ui_ephemeral_query", output)
2121
{
22-
// TODO(cli-1.0.81-2): CLI 1.0.81-2 fails session.ui.ephemeralQuery against the recorded
23-
// snapshot ("Failed to get response from the AI model"). Re-enable once the runtime
24-
// fix ships.
25-
[Fact(Skip = "Blocked on CLI 1.0.81-2 session.ui.ephemeralQuery regression")]
22+
// TODO(cli-1.0.81-2): CLI 1.0.81-4 still fails session.ui.ephemeralQuery against the
23+
// recorded snapshot ("Failed to get response from the AI model"). Re-enable once the
24+
// runtime fix ships.
25+
[Fact(Skip = "Blocked on CLI 1.0.81-4 session.ui.ephemeralQuery regression")]
2626
public async Task Should_Answer_Ephemeral_Query()
2727
{
2828
await using var session = await CreateSessionAsync();

go/inprocess_disabled.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import "errors"
66

77
const inProcessAvailable = false
88

9+
var errInProcessUnavailable = errors.New("in-process transport unavailable")
10+
911
func createInProcessHost(string, inProcessHostConfig) (inProcessHost, error) {
10-
return nil, errors.New("in-process transport unavailable")
12+
return nil, errInProcessUnavailable
1113
}

go/internal/e2e/abort_e2e_test.go

Lines changed: 43 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ func TestAbortE2E(t *testing.T) {
3232
var mu sync.Mutex
3333
var events []copilot.SessionEvent
3434
firstDelta := make(chan *copilot.AssistantMessageDeltaData, 1)
35+
sessionIdle := make(chan struct{}, 1)
3536

3637
session.On(func(event copilot.SessionEvent) {
3738
mu.Lock()
@@ -43,6 +44,12 @@ func TestAbortE2E(t *testing.T) {
4344
default:
4445
}
4546
}
47+
if _, ok := event.Data.(*copilot.SessionIdleData); ok {
48+
select {
49+
case sessionIdle <- struct{}{}:
50+
default:
51+
}
52+
}
4653
})
4754

4855
// Fire-and-forget — we'll abort before it finishes
@@ -67,6 +74,11 @@ func TestAbortE2E(t *testing.T) {
6774
if err := session.Abort(t.Context()); err != nil {
6875
t.Fatalf("Abort failed: %v", err)
6976
}
77+
select {
78+
case <-sessionIdle:
79+
case <-time.After(60 * time.Second):
80+
t.Fatal("Timed out waiting for session to become idle after abort")
81+
}
7082

7183
mu.Lock()
7284
snapshot := make([]copilot.SessionEvent, len(events))
@@ -85,33 +97,15 @@ func TestAbortE2E(t *testing.T) {
8597
t.Error("Expected at least one assistant.message_delta event before abort")
8698
}
8799

88-
// Session should be usable after abort. Wait for the specific recovery
89-
// message rather than racing against a late idle from the aborted turn.
90-
recoveryReceived := make(chan *copilot.AssistantMessageData, 1)
91-
session.On(func(event copilot.SessionEvent) {
92-
if d, ok := event.Data.(*copilot.AssistantMessageData); ok {
93-
if strings.Contains(strings.ToLower(d.Content), "abort_recovery_ok") {
94-
select {
95-
case recoveryReceived <- d:
96-
default:
97-
}
98-
}
99-
}
100+
// Session should be usable after abort.
101+
msg, err := session.SendAndWait(t.Context(), copilot.MessageOptions{
102+
Prompt: "Say 'abort_recovery_ok'.",
100103
})
101-
102-
go func() {
103-
_, _ = session.Send(t.Context(), copilot.MessageOptions{
104-
Prompt: "Say 'abort_recovery_ok'.",
105-
})
106-
}()
107-
108-
select {
109-
case msg := <-recoveryReceived:
110-
if !strings.Contains(strings.ToLower(msg.Content), "abort_recovery_ok") {
111-
t.Errorf("Expected recovery message to contain 'abort_recovery_ok', got %q", msg.Content)
112-
}
113-
case <-time.After(60 * time.Second):
114-
t.Fatal("Timed out waiting for recovery message after abort")
104+
if err != nil {
105+
t.Fatalf("Recovery SendAndWait failed after abort: %v", err)
106+
}
107+
if content := assistantContent(t, msg); !strings.Contains(strings.ToLower(content), "abort_recovery_ok") {
108+
t.Errorf("Expected recovery message to contain 'abort_recovery_ok', got %q", content)
115109
}
116110
})
117111

@@ -144,6 +138,16 @@ func TestAbortE2E(t *testing.T) {
144138
}
145139
t.Cleanup(func() { _ = session.Disconnect() })
146140

141+
sessionIdle := make(chan struct{}, 1)
142+
session.On(func(event copilot.SessionEvent) {
143+
if _, ok := event.Data.(*copilot.SessionIdleData); ok {
144+
select {
145+
case sessionIdle <- struct{}{}:
146+
default:
147+
}
148+
}
149+
})
150+
147151
// Fire-and-forget
148152
go func() {
149153
_, _ = session.Send(t.Context(), copilot.MessageOptions{
@@ -172,33 +176,21 @@ func TestAbortE2E(t *testing.T) {
172176
case releaseTool <- "RELEASED_AFTER_ABORT":
173177
default:
174178
}
175-
176-
// Session should be usable after abort
177-
recoveryReceived := make(chan *copilot.AssistantMessageData, 1)
178-
session.On(func(event copilot.SessionEvent) {
179-
if d, ok := event.Data.(*copilot.AssistantMessageData); ok {
180-
if strings.Contains(d.Content, "tool_abort_recovery_ok") {
181-
select {
182-
case recoveryReceived <- d:
183-
default:
184-
}
185-
}
186-
}
187-
})
188-
189-
go func() {
190-
_, _ = session.Send(t.Context(), copilot.MessageOptions{
191-
Prompt: "Say 'tool_abort_recovery_ok'.",
192-
})
193-
}()
194-
195179
select {
196-
case msg := <-recoveryReceived:
197-
if !strings.Contains(msg.Content, "tool_abort_recovery_ok") {
198-
t.Errorf("Expected recovery message to contain 'tool_abort_recovery_ok', got %q", msg.Content)
199-
}
180+
case <-sessionIdle:
200181
case <-time.After(60 * time.Second):
201-
t.Fatal("Timed out waiting for recovery message after abort")
182+
t.Fatal("Timed out waiting for session to become idle after tool abort")
183+
}
184+
185+
// Session should be usable after abort.
186+
msg, err := session.SendAndWait(t.Context(), copilot.MessageOptions{
187+
Prompt: "Say 'tool_abort_recovery_ok'.",
188+
})
189+
if err != nil {
190+
t.Fatalf("Recovery SendAndWait failed after tool abort: %v", err)
191+
}
192+
if content := assistantContent(t, msg); !strings.Contains(content, "tool_abort_recovery_ok") {
193+
t.Errorf("Expected recovery message to contain 'tool_abort_recovery_ok', got %q", content)
202194
}
203195
})
204196
}

go/internal/e2e/rpc_session_state_extras_e2e_test.go

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -70,45 +70,45 @@ func TestRpcSessionStateExtras(t *testing.T) {
7070
session := createPortedSession(t, client, nil)
7171
defer session.Disconnect()
7272
defer func() {
73-
_, _ = session.RPC.Permissions.SetAllowAll(t.Context(), &rpc.PermissionsSetAllowAllRequest{Enabled: copilot.Bool(false)})
73+
_, _ = session.RPC.Permissions.SetMode(t.Context(), &rpc.PermissionsSetModeRequest{Mode: rpc.PermissionModeManual})
7474
}()
7575

76-
initial, err := session.RPC.Permissions.GetAllowAll(t.Context())
76+
initial, err := session.RPC.Permissions.GetMode(t.Context())
7777
if err != nil {
78-
t.Fatalf("Permissions.GetAllowAll initial failed: %v", err)
78+
t.Fatalf("Permissions.GetMode initial failed: %v", err)
7979
}
80-
if initial.Enabled {
81-
t.Fatal("Allow-all should be disabled on a fresh session")
80+
if initial.Mode != rpc.PermissionModeManual {
81+
t.Fatalf("Expected manual mode on a fresh session, got %q", initial.Mode)
8282
}
8383

84-
enable, err := session.RPC.Permissions.SetAllowAll(t.Context(), &rpc.PermissionsSetAllowAllRequest{Enabled: copilot.Bool(true)})
84+
enable, err := session.RPC.Permissions.SetMode(t.Context(), &rpc.PermissionsSetModeRequest{Mode: rpc.PermissionModeAllowAll})
8585
if err != nil {
86-
t.Fatalf("Permissions.SetAllowAll(true) failed: %v", err)
86+
t.Fatalf("Permissions.SetMode(allow-all) failed: %v", err)
8787
}
88-
if !enable.Success || !enable.Enabled {
89-
t.Fatalf("Expected successful enable, got %+v", enable)
88+
if !enable.Success || enable.Mode != rpc.PermissionModeAllowAll {
89+
t.Fatalf("Expected successful allow-all mode change, got %+v", enable)
9090
}
91-
afterEnable, err := session.RPC.Permissions.GetAllowAll(t.Context())
91+
afterEnable, err := session.RPC.Permissions.GetMode(t.Context())
9292
if err != nil {
93-
t.Fatalf("Permissions.GetAllowAll after enable failed: %v", err)
93+
t.Fatalf("Permissions.GetMode after allow-all failed: %v", err)
9494
}
95-
if !afterEnable.Enabled {
96-
t.Fatal("Expected allow-all to be enabled")
95+
if afterEnable.Mode != rpc.PermissionModeAllowAll {
96+
t.Fatalf("Expected allow-all mode, got %q", afterEnable.Mode)
9797
}
9898

99-
disable, err := session.RPC.Permissions.SetAllowAll(t.Context(), &rpc.PermissionsSetAllowAllRequest{Enabled: copilot.Bool(false)})
99+
disable, err := session.RPC.Permissions.SetMode(t.Context(), &rpc.PermissionsSetModeRequest{Mode: rpc.PermissionModeManual})
100100
if err != nil {
101-
t.Fatalf("Permissions.SetAllowAll(false) failed: %v", err)
101+
t.Fatalf("Permissions.SetMode(manual) failed: %v", err)
102102
}
103-
if !disable.Success || disable.Enabled {
104-
t.Fatalf("Expected successful disable, got %+v", disable)
103+
if !disable.Success || disable.Mode != rpc.PermissionModeManual {
104+
t.Fatalf("Expected successful manual mode change, got %+v", disable)
105105
}
106-
afterDisable, err := session.RPC.Permissions.GetAllowAll(t.Context())
106+
afterDisable, err := session.RPC.Permissions.GetMode(t.Context())
107107
if err != nil {
108-
t.Fatalf("Permissions.GetAllowAll after disable failed: %v", err)
108+
t.Fatalf("Permissions.GetMode after manual failed: %v", err)
109109
}
110-
if afterDisable.Enabled {
111-
t.Fatal("Expected allow-all to be disabled")
110+
if afterDisable.Mode != rpc.PermissionModeManual {
111+
t.Fatalf("Expected manual mode, got %q", afterDisable.Mode)
112112
}
113113
})
114114

go/internal/e2e/rpc_ui_ephemeral_query_e2e_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ func TestRpcUiEphemeralQuery(t *testing.T) {
1414
t.Cleanup(func() { client.ForceStop() })
1515

1616
t.Run("should_answer_ephemeral_query", func(t *testing.T) {
17-
// TODO(cli-1.0.81-2): CLI 1.0.81-2 fails session.ui.ephemeralQuery against the
17+
// TODO(cli-1.0.81-2): CLI 1.0.81-4 still fails session.ui.ephemeralQuery against the
1818
// recorded snapshot ("Failed to get response from the AI model"). Re-enable once
1919
// the runtime fix ships.
20-
t.Skip("blocked on CLI 1.0.81-2 session.ui.ephemeralQuery regression")
20+
t.Skip("blocked on CLI 1.0.81-4 session.ui.ephemeralQuery regression")
2121

2222
ctx.ConfigureForTest(t)
2323
session := createPortedSession(t, client, nil)

0 commit comments

Comments
 (0)