Stabilize unknown session delete E2E assertions#1198
Merged
stephentoub merged 1 commit intomainfrom May 4, 2026
Merged
Conversation
Assert the SDK-level delete failure prefix instead of the runtime-specific detail text so the tests pass against runtimes with different unknown-session wording. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR stabilizes the cross-SDK E2E assertions for deleting an unknown session ID by asserting on each SDK’s own consistent “Failed to delete session ” wrapper, rather than runtime/CLI-specific error detail strings that can differ in live copilot-agent-runtime CI.
Changes:
- Update Python, Node, Go, and .NET client API E2Es to assert on the SDK-level delete failure prefix (including the unknown session ID).
- Remove brittle assertions that depended on a specific underlying detail message (e.g., “Session file not found”).
- Keep the unknown session ID explicit via a named variable/constant in each test.
Show a summary per file
| File | Description |
|---|---|
| python/e2e/test_client_api_e2e.py | Assert the Python SDK’s stable delete failure prefix for unknown session IDs. |
| nodejs/test/e2e/client_api.e2e.test.ts | Assert the Node SDK’s stable delete failure prefix for unknown session IDs. |
| go/internal/e2e/client_api_e2e_test.go | Assert the Go SDK’s stable delete failure prefix for unknown session IDs. |
| dotnet/test/E2E/ClientSessionManagementE2ETests.cs | Assert the .NET SDK’s stable delete failure prefix for unknown session IDs. |
Copilot's findings
- Files reviewed: 4/4 changed files
- Comments generated: 0
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 CI runs these SDK E2Es against the live runtime, whose unknown-session delete detail can differ from the checked-in CLI. The SDKs already add a stable
Failed to delete session <id>wrapper, so these tests should assert that SDK behavior rather than a runtime-specific detail string.Changes
Session file not found.Testing
dotnet test dotnet\test\GitHub.Copilot.SDK.Test.csproj --filter "FullyQualifiedName~ClientSessionManagementE2ETests" --logger "console;verbosity=minimal"npm test --prefix nodejs -- test/e2e/client_api.e2e.test.tsgo test ./internal/e2e -run TestClientApiE2E -count=1python -m pytest python\e2e\test_client_api_e2e.py -qGenerated by Copilot.