Skip to content

Stabilize C# rewind E2E initialization - #2661

Merged
stephentoub merged 1 commit into
mainfrom
stephentoub-investigate-csharp-sdk-ci
Sep 15, 2026
Merged

stephentoub merged 1 commit into
mainfrom
stephentoub-investigate-csharp-sdk-ci

Conversation

@stephentoub

Copy link
Copy Markdown
Collaborator

The C# rewind E2E can send its first file-mutating turn before runtime file-change tracking has established the initial baseline. When that race occurs, the first capture is incomplete and the test times out waiting for two restorable rewind points.

Wait for session.history.listRewindPoints to report enabled tracking with an initialized empty point set before sending the first edit. This matches the runtime protocol E2E synchronization and preserves the existing behavior under test.

Validation: the focused rewind E2E passed 10 consecutive runs against Copilot CLI 1.0.84-6, and the rewind plus MCP OAuth lifecycle tests passed together.

Generated by Copilot

Wait for file-change tracking to establish its baseline before the first mutating turn, matching the runtime protocol E2E and preventing missed rewind captures.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 15, 2026 01:23
@stephentoub
stephentoub requested a review from a team as a code owner September 15, 2026 01:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused synchronization correctly addresses the initialization race without altering tested behavior.

Review tier: Balanced
Findings: None

What changed in this PR

Adds synchronization to prevent the C# rewind E2E from mutating files before tracking initialization completes.

Changes:

  • Polls until file-change tracking is enabled with no rewind points.
  • Provides a 30-second timeout with a clear failure message.
File Description
dotnet/​test/​E2E/​RewindE2ETests.cs Waits for tracking initialization before the first edit.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

SDK Consistency Review — PR #2661

Scope of change: Only dotnet/test/E2E/RewindE2ETests.cs was modified (12 additions), adding a TestHelper.WaitForConditionAsync poll that waits for rewind-point tracking to initialize (UnavailableReason is null, FileChangeTrackingEnabled, and an empty initial Points list) before proceeding with the existing test flow.

Finding: No consistency issue. This change is confined to a .NET E2E test file and does not touch any SDK client/library code (dotnet/src/, nodejs/src/, python/copilot/, go/, java/sdk/src/main/java/, rust/src/) or public API surface. It's a test-reliability fix (avoiding a race condition where rewind points might not yet be tracked when the test proceeds), not a new feature or behavior change in the SDK itself, so there is nothing to mirror in the other language SDKs.

No action needed for cross-SDK parity.

Generated by SDK Consistency Review Agent for #2661 · copilot · sonnet50 · 18.1 AIC · ⌖ 12.1 AIC · ⊞ 8.3K ·

@stephentoub
stephentoub merged commit a675b55 into main Sep 15, 2026
56 checks passed
@stephentoub
stephentoub deleted the stephentoub-investigate-csharp-sdk-ci branch September 15, 2026 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants