Skip to content

Normalize interrupted shell replay results - #2370

Merged
stephentoub merged 1 commit into
mainfrom
stephentoub-fix-abort-replay-tests
Aug 21, 2026
Merged

Normalize interrupted shell replay results#2370
stephentoub merged 1 commit into
mainfrom
stephentoub-fix-abort-replay-tests

Conversation

@stephentoub

Copy link
Copy Markdown
Collaborator

Summary

  • normalize the runtime's exact <shell context is being reconfigured; retry the command> result to the replay harness's existing canonical interrupted-tool result
  • apply the normalization symmetrically to live requests and stored cassettes, so all SDK language suites can continue sharing session/should_abort_a_session.yaml
  • add focused capture and replay coverage, including a negative check that unrelated tool failures still fail strict matching

This fixes the abort-session replay failure observed in copilot-agent-runtime#16636, specifically workflow run 32478858178 / CAPI C# job 96769866111. The test remains responsible for verifying that abort leaves the session alive and usable; it no longer depends on which semantically equivalent cancellation string wins a timing race.

Validation

  • replay harness: 32 tests passed
  • .NET Should_Abort_A_Session
  • Node should abort a session
  • Go TestSessionE2E/should_abort_a_session
  • Rust session::should_abort_a_session
  • Java CopilotSessionTest#testShouldAbortSession

Python uses the same shared replay harness and cassette; it was not run locally because this host has no Python interpreter.

Treat runtime shell-context reconfiguration as the same semantic interruption already represented by abort cassettes, while retaining strict matching for unrelated tool failures.

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

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.

Pull request overview

Normalizes equivalent interrupted shell results so shared SDK replay cassettes remain stable across runtime timing differences.

Changes:

  • Extends interrupted-tool result normalization for shell reconfiguration.
  • Adds capture, replay, and strict mismatch coverage.
Show a summary per file
File Description
test/harness/replayingCapiProxy.ts Canonicalizes the shell interruption result.
test/harness/replayingCapiProxy.test.ts Verifies capture and replay normalization behavior.

Review details

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

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@stephentoub
stephentoub merged commit cc0438d into main Aug 21, 2026
58 checks passed
@stephentoub
stephentoub deleted the stephentoub-fix-abort-replay-tests branch August 21, 2026 13:31
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