Add rewind support across all SDKs - #2321
Merged
Merged
Conversation
Expose file change tracking on create and resume session options in all six SDKs, and add shared replay coverage that verifies conversation-and-file rewind behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 91a7e2ab-88a5-4365-accf-cbea1e1391e9
Contributor
There was a problem hiding this comment.
Pull request overview
Adds opt-in file-change tracking across all SDKs, enabling rewind operations to restore conversation history and modified files.
Changes:
- Exposes and forwards
enableFileChangeTrackingduring session creation and resumption. - Covers request serialization and configuration cloning.
- Adds a shared replay fixture and E2E coverage for file and conversation rewind.
Show a summary per file
| File | Description |
|---|---|
test/snapshots/rewind/should_restore_tracked_file_and_conversation.yaml |
Adds the shared rewind replay scenario. |
rust/tests/session_test.rs |
Tests Rust request forwarding. |
rust/tests/e2e/rewind.rs |
Adds Rust rewind E2E coverage. |
rust/tests/e2e.rs |
Registers the Rust E2E module. |
rust/src/wire.rs |
Adds the option to Rust wire requests. |
rust/src/types.rs |
Exposes and forwards the Rust setting. |
python/test_client.py |
Tests Python request forwarding. |
python/e2e/test_rewind_e2e.py |
Adds Python rewind E2E coverage. |
python/copilot/client.py |
Exposes and forwards the Python option. |
nodejs/test/e2e/rewind.e2e.test.ts |
Adds Node.js rewind E2E coverage. |
nodejs/test/client.test.ts |
Tests Node.js request forwarding. |
nodejs/src/types.ts |
Adds the Node.js configuration property. |
nodejs/src/client.ts |
Forwards the Node.js setting. |
java/src/test/java/com/github/copilot/SessionRequestBuilderTest.java |
Tests Java request construction. |
java/src/test/java/com/github/copilot/e2e/RewindIT.java |
Adds Java rewind E2E coverage. |
java/src/test/java/com/github/copilot/ConfigCloneTest.java |
Tests Java configuration cloning. |
java/src/main/java/com/github/copilot/SessionRequestBuilder.java |
Forwards the Java setting. |
java/src/main/java/com/github/copilot/rpc/SessionConfig.java |
Adds Java create-session configuration. |
java/src/main/java/com/github/copilot/rpc/ResumeSessionRequest.java |
Adds the Java resume request field. |
java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java |
Adds Java resume-session configuration. |
java/src/main/java/com/github/copilot/rpc/CreateSessionRequest.java |
Adds the Java create request field. |
go/types.go |
Adds Go configuration and wire fields. |
go/internal/e2e/rewind_e2e_test.go |
Adds Go rewind E2E coverage. |
go/client.go |
Forwards the Go setting. |
go/client_test.go |
Tests Go request forwarding. |
dotnet/test/Unit/SerializationTests.cs |
Tests .NET request serialization. |
dotnet/test/Unit/CloneTests.cs |
Tests .NET configuration cloning. |
dotnet/test/E2E/RewindE2ETests.cs |
Adds .NET rewind E2E coverage. |
dotnet/src/Types.cs |
Exposes and clones the .NET option. |
dotnet/src/Client.cs |
Forwards the .NET setting in requests. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 30/30 changed files
- Comments generated: 0
- Review effort level: Balanced
This comment has been minimized.
This comment has been minimized.
Apply the Java, Python, and Rust formatters required by CI. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 91a7e2ab-88a5-4365-accf-cbea1e1391e9
This comment has been minimized.
This comment has been minimized.
Treat both Windows path separators as equivalent when validating replayed rewind paths. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 91a7e2ab-88a5-4365-accf-cbea1e1391e9
This comment has been minimized.
This comment has been minimized.
Use Path.Join so a rooted file name cannot discard the E2E working directory. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 91a7e2ab-88a5-4365-accf-cbea1e1391e9
Contributor
Cross-SDK Consistency Review ✅This PR adds
All SDKs:
No consistency issues found. The PR maintains full cross-SDK parity.
|
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
copilot-agent-runtime now supports rewinding conversation history and tracked file changes, but SDK sessions must explicitly opt into file-change tracking. This change exposes that opt-in consistently across every supported SDK.
Summary
enableFileChangeTrackingsession setting to Node, Python, Go, .NET, Rust, and Java.Testing
Not run locally per request; validation is deferred to CI.
Generated by Copilot