Skip to content

Commit 02ff69b

Browse files
github-actions[bot]stephentoubCopilot
authored
Update @github/copilot to 1.0.39-0 (#1157)
* Update @github/copilot to 1.0.39-0 - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code * Fix E2E replay normalization for CLI reminders Normalize CLI system reminders in replay matching and isolate E2E tests from user-level Copilot state by setting COPILOT_HOME in each SDK harness. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix SessionFs state path on Unix Use a writable temp-backed session state path for SessionFs E2E tests on non-Windows so the updated runtime can create its internal state without writing to /session-state. Keep the existing /session-state path on Windows, isolate Node COPILOT_HOME from per-test cleanup, and normalize temp-backed large-output paths for stable snapshots. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Python SessionFs test formatting Wrap long SessionFs assertions so the Python e2e test passes ruff after the Unix session state path update. 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 c63feb2 commit 02ff69b

26 files changed

Lines changed: 2130 additions & 115 deletions

dotnet/src/Generated/Rpc.cs

Lines changed: 436 additions & 1 deletion
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: 80 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dotnet/test/Harness/E2ETestContext.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ public IReadOnlyDictionary<string, string> GetEnvironment()
9595
.ToDictionary(e => (string)e.Key, e => e.Value?.ToString());
9696

9797
env["COPILOT_API_URL"] = ProxyUrl;
98+
env["COPILOT_HOME"] = HomeDir;
9899
env["XDG_CONFIG_HOME"] = HomeDir;
99100
env["XDG_STATE_HOME"] = HomeDir;
100101

dotnet/test/SessionFsTests.cs

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class SessionFsTests(E2ETestFixture fixture, ITestOutputHelper output)
1616
private static readonly SessionFsConfig SessionFsConfig = new()
1717
{
1818
InitialCwd = "/",
19-
SessionStatePath = "/session-state",
19+
SessionStatePath = CreateSessionStatePath(),
2020
Conventions = SessionFsSetProviderConventions.Posix,
2121
};
2222

@@ -38,7 +38,7 @@ public async Task Should_Route_File_Operations_Through_The_Session_Fs_Provider()
3838
Assert.Contains("300", msg?.Data.Content ?? string.Empty);
3939
await session.DisposeAsync();
4040

41-
var eventsPath = GetStoredPath(providerRoot, session.SessionId, "/session-state/events.jsonl");
41+
var eventsPath = GetStoredPath(providerRoot, session.SessionId, $"{SessionFsConfig.SessionStatePath}/events.jsonl");
4242
await WaitForConditionAsync(() => File.Exists(eventsPath));
4343
var content = await ReadAllTextSharedAsync(eventsPath);
4444
Assert.Contains("300", content);
@@ -69,7 +69,7 @@ public async Task Should_Load_Session_Data_From_Fs_Provider_On_Resume()
6969
Assert.Contains("100", msg?.Data.Content ?? string.Empty);
7070
await session1.DisposeAsync();
7171

72-
var eventsPath = GetStoredPath(providerRoot, sessionId, "/session-state/events.jsonl");
72+
var eventsPath = GetStoredPath(providerRoot, sessionId, $"{SessionFsConfig.SessionStatePath}/events.jsonl");
7373
await WaitForConditionAsync(() => File.Exists(eventsPath));
7474

7575
var session2 = await client.ResumeSessionAsync(sessionId, new ResumeSessionConfig
@@ -165,11 +165,11 @@ await session.SendAndWaitAsync(new MessageOptions
165165
var messages = await session.GetMessagesAsync();
166166
var toolResult = FindToolCallResult(messages, "get_big_string");
167167
Assert.NotNull(toolResult);
168-
Assert.Contains("/session-state/temp/", toolResult);
168+
Assert.Contains($"{SessionFsConfig.SessionStatePath}/temp/", toolResult);
169169

170170
var match = System.Text.RegularExpressions.Regex.Match(
171171
toolResult!,
172-
@"([/\\]session-state[/\\]temp[/\\][^\s]+)");
172+
$"({System.Text.RegularExpressions.Regex.Escape(SessionFsConfig.SessionStatePath)}/temp/[^\\s]+)");
173173
Assert.True(match.Success);
174174

175175
var fileContent = await ReadAllTextSharedAsync(GetStoredPath(providerRoot, session.SessionId, match.Groups[1].Value));
@@ -206,7 +206,7 @@ public async Task Should_Succeed_With_Compaction_While_Using_SessionFs()
206206

207207
await session.SendAndWaitAsync(new MessageOptions { Prompt = "What is 2+2?" });
208208

209-
var eventsPath = GetStoredPath(providerRoot, session.SessionId, "/session-state/events.jsonl");
209+
var eventsPath = GetStoredPath(providerRoot, session.SessionId, $"{SessionFsConfig.SessionStatePath}/events.jsonl");
210210
await WaitForConditionAsync(() => File.Exists(eventsPath), TimeSpan.FromSeconds(30));
211211
var contentBefore = await ReadAllTextSharedAsync(eventsPath);
212212
Assert.DoesNotContain("checkpointNumber", contentBefore);
@@ -244,13 +244,13 @@ public async Task Should_Write_Workspace_Metadata_Via_SessionFs()
244244
Assert.Contains("56", msg?.Data.Content ?? string.Empty);
245245

246246
// WorkspaceManager should have created workspace.yaml via sessionFs
247-
var workspaceYamlPath = GetStoredPath(providerRoot, session.SessionId, "/session-state/workspace.yaml");
247+
var workspaceYamlPath = GetStoredPath(providerRoot, session.SessionId, $"{SessionFsConfig.SessionStatePath}/workspace.yaml");
248248
await WaitForConditionAsync(() => File.Exists(workspaceYamlPath));
249249
var yaml = await ReadAllTextSharedAsync(workspaceYamlPath);
250250
Assert.Contains("id:", yaml);
251251

252252
// Checkpoint index should also exist
253-
var indexPath = GetStoredPath(providerRoot, session.SessionId, "/session-state/checkpoints/index.md");
253+
var indexPath = GetStoredPath(providerRoot, session.SessionId, $"{SessionFsConfig.SessionStatePath}/checkpoints/index.md");
254254
await WaitForConditionAsync(() => File.Exists(indexPath));
255255

256256
await session.DisposeAsync();
@@ -278,7 +278,7 @@ public async Task Should_Persist_Plan_Md_Via_SessionFs()
278278
await session.SendAndWaitAsync(new MessageOptions { Prompt = "What is 2 + 3?" });
279279
await session.Rpc.Plan.UpdateAsync("# Test Plan\n\nThis is a test.");
280280

281-
var planPath = GetStoredPath(providerRoot, session.SessionId, "/session-state/plan.md");
281+
var planPath = GetStoredPath(providerRoot, session.SessionId, $"{SessionFsConfig.SessionStatePath}/plan.md");
282282
await WaitForConditionAsync(() => File.Exists(planPath));
283283
var content = await ReadAllTextSharedAsync(planPath);
284284
Assert.Contains("# Test Plan", content);
@@ -323,6 +323,17 @@ private CopilotClient CreateSessionFsClient(string providerRoot, bool useStdio =
323323
private static string CreateProviderRoot()
324324
=> Path.Join(Path.GetTempPath(), $"copilot-sessionfs-{Guid.NewGuid():N}");
325325

326+
private static string CreateSessionStatePath()
327+
{
328+
if (OperatingSystem.IsWindows())
329+
{
330+
return "/session-state";
331+
}
332+
333+
return Path.Join(Path.GetTempPath(), $"copilot-sessionfs-state-{Guid.NewGuid():N}", "session-state")
334+
.Replace(Path.DirectorySeparatorChar, '/');
335+
}
336+
326337
private static string GetStoredPath(string providerRoot, string sessionId, string sessionPath)
327338
{
328339
var safeSessionId = NormalizeRelativePathSegment(sessionId, nameof(sessionId));

go/generated_session_events.go

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

0 commit comments

Comments
 (0)