Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c2ef3b8a-d96c-4821-b346-694f49854981
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused cleanup-order change resolves the documented hang without altering product behavior.
Review effort: Balanced
Findings: None
What changed in this PR
Deflakes .NET E2E cleanup by releasing the blocked original tool callback before disposing the resumed session.
Changes:
- Releases the callback after successful pending-tool verification.
- Retains
finallycleanup for failure paths.
| File | Description |
|---|---|
dotnet/test/E2E/PendingWorkResumeE2ETests.cs |
Prevents resumed-session disposal from waiting indefinitely. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been deployed
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.
Problem
The
.NET SDK Testsvalidation run35724488486hung for ten minutes inShould_Keep_Pending_External_Tool_Handleable_On_Warm_Resume_When_ContinuePendingWork_Is_False.The test intentionally leaves the original external-tool callback blocked while a second client resumes the active session and completes that pending request. After verifying that the external completion succeeded, it disposed the resumed session before releasing the original callback. Cleanup could therefore wait indefinitely for the callback whose release lived in the later
finallyblock.The test is worthwhile because it verifies that an active session resumed with
ContinuePendingWork = falsestill exposes its pending external tool request for explicit completion.Changes
Release the original blocked callback immediately after the resumed client successfully handles the pending tool call and verifies the single invocation. The existing
finallyremains as failure-path cleanup.Product impact
No product behavior changes. This only fixes test cleanup ordering after the behavior under test has been verified.
Validation
git diff --check.NET SDK Testsworkflow runs pending