Skip to content

Stabilize unknown session delete E2E assertions#1198

Merged
stephentoub merged 1 commit intomainfrom
stephentoub/fix-session-test
May 4, 2026
Merged

Stabilize unknown session delete E2E assertions#1198
stephentoub merged 1 commit intomainfrom
stephentoub/fix-session-test

Conversation

@stephentoub
Copy link
Copy Markdown
Collaborator

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

  • Update the .NET, Node, Python, and Go client API E2E tests to assert the stable SDK-level delete failure prefix.
  • Keep the unknown session ID explicit in each test and remove the brittle dependency on 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.ts
  • go test ./internal/e2e -run TestClientApiE2E -count=1
  • python -m pytest python\e2e\test_client_api_e2e.py -q

Generated by Copilot.

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>
Copilot AI review requested due to automatic review settings May 4, 2026 19:49
@stephentoub stephentoub requested a review from a team as a code owner May 4, 2026 19:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

@github-actions github-actions Bot mentioned this pull request May 4, 2026
@stephentoub stephentoub merged commit ced6613 into main May 4, 2026
41 of 42 checks passed
@stephentoub stephentoub deleted the stephentoub/fix-session-test branch May 4, 2026 20:07
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