Skip to content

Add cross-SDK RPC E2E coverage#1424

Open
stephentoub wants to merge 5 commits into
mainfrom
stephentoub/e2e-coverage-gaps
Open

Add cross-SDK RPC E2E coverage#1424
stephentoub wants to merge 5 commits into
mainfrom
stephentoub/e2e-coverage-gaps

Conversation

@stephentoub
Copy link
Copy Markdown
Collaborator

Why

The SDKs expose a large public RPC surface, but E2E coverage had gaps across several server and session RPC groups. This PR adds meaningful non-Canvas RPC E2E coverage across the supported SDKs so regressions in typed RPC behavior are caught consistently.

What changed

  • Adds and expands C# E2E tests for server/session RPCs, event log, queue, remote, schedule, workspace checkpoints, commands, permissions, MCP/skills, tasks/handlers, and compaction.
  • Ports the same non-Canvas coverage strategy to Node/TypeScript, Python, Go, and Rust.
  • Uses assertions for stable semantics: return shapes, state changes, event delivery, idempotent/no-op behavior, handler round trips, and capability-gated error paths.
  • Leaves Canvas coverage and Java intentionally out of scope.

Validation

  • C#: build passed; non-Canvas RPC coverage set passed 5 consecutive clean runs after the fix-first review.
  • Node/TypeScript: targeted Vitest E2E suite passed 5 consecutive runs; ESLint passed for changed tests.
  • Python: targeted pytest suite passed; repeated stress runs completed 3 consecutive passes before PR creation was requested.
  • Go: gofmt, compile smoke test, and targeted E2E suites passed.
  • Rust: cargo +nightly-2026-04-14 fmt --check, cargo check --all-features --tests, and targeted E2E filters passed.
  • git diff --check passed.

Notes

Some remote and MCP app paths are capability-gated in the local E2E environment, so those tests assert stable implemented errors or no-op result shapes rather than pretending unavailable infrastructure exists.

Add non-Canvas RPC E2E coverage across C#, Node, Python, Go, and Rust. The tests exercise server and session RPC surfaces with assertions for stable return shapes, state transitions, events, no-op behavior, and capability-gated error paths.

Java is intentionally excluded.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 26, 2026 02:44
@stephentoub stephentoub requested a review from a team as a code owner May 26, 2026 02:44
)


async def _wait_for_command_in_pending_items(session, command: str) -> QueuePendingItems:
finally:
try:
await client.stop()
except ExceptionGroup:
finally:
try:
await client.stop()
except ExceptionGroup:
@github-actions

This comment has been minimized.

Comment thread dotnet/test/E2E/RpcSessionStateE2ETests.cs Fixed
Comment on lines +164 to +169
catch (Exception ex)
{
var message = ex.ToString();
AssertNotUnhandledMethod(message);
AssertSamplingError(message);
}
Comment on lines +79 to +83
catch (Exception ex)
{
Assert.DoesNotContain($"Unhandled method {method}", ex.ToString(), StringComparison.OrdinalIgnoreCase);
return null;
}
Comment on lines +92 to +95
catch (Exception ex)
{
Assert.DoesNotContain($"Unhandled method {method}", ex.ToString(), StringComparison.OrdinalIgnoreCase);
}
Comment on lines +83 to +86
catch (Exception ex)
{
readError = ex;
}
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 expands end-to-end JSON-RPC coverage across the SDKs (C#, Node/TS, Python, Go, Rust) by adding/porting non-Canvas RPC E2E tests that validate typed request/response shapes, stable semantics (no-ops/idempotency), and capability-gated error behavior.

Changes:

  • Added new cross-SDK E2E tests for additional RPC groups (event log, queue, remote, schedule, workspace checkpoints, compaction handoff summary, commands, MCP apps/skills, and expanded tasks/UI handlers).
  • Updated existing E2E harness/helpers (Node wait helper; Python harness directory prep) to support more reliable multi-RPC tests.
  • Extended existing RPC E2E suites (tasks/handlers, permissions, server-scoped RPC, MCP/skills) with additional typed coverage paths.
Show a summary per file
File Description
rust/tests/e2e/rpc_workspace_checkpoints.rs New Rust E2E coverage for workspace checkpoints/diff/large paste.
rust/tests/e2e/rpc_tasks_and_handlers.rs Expands Rust tasks + UI pending-handler RPC coverage.
rust/tests/e2e/rpc_schedule.rs New Rust E2E coverage for session.schedule RPC.
rust/tests/e2e/rpc_remote.rs New Rust E2E coverage for session.remote RPC and steerable persistence.
rust/tests/e2e/rpc_queue.rs New Rust E2E coverage for session.queue RPC.
rust/tests/e2e/rpc_mcp_and_skills.rs Expands Rust MCP apps + skills RPC coverage.
rust/tests/e2e/rpc_event_log.rs New Rust E2E coverage for session.eventLog RPC.
rust/tests/e2e/compaction.rs Adds Rust E2E coverage for handoff summary + compaction cancel/abort.
rust/tests/e2e/commands.rs Adds Rust E2E coverage for commands list/invoke/execute/queue response.
rust/tests/e2e.rs Registers newly added Rust E2E modules.
python/e2e/testharness/context.py Ensures test harness base directories exist before cleanup.
python/e2e/test_rpc_workspace_checkpoints_e2e.py New Python E2E coverage for workspace checkpoints/diff/large paste.
python/e2e/test_rpc_tasks_and_handlers_e2e.py Expands Python tasks + UI pending handler + elicitation/auto-mode coverage.
python/e2e/test_rpc_server_e2e.py Expands Python server-scoped RPC coverage (sessions, secrets, sessionFs, etc.).
python/e2e/test_rpc_schedule_e2e.py New Python E2E coverage for schedule RPC.
python/e2e/test_rpc_remote_e2e.py New Python E2E coverage for remote RPC + persisted steerable.
python/e2e/test_rpc_queue_e2e.py New Python E2E coverage for queue pending items + mutations.
python/e2e/test_rpc_mcp_and_skills_e2e.py Expands Python MCP/skills and MCP apps host-context/capability tests.
python/e2e/test_rpc_event_log_e2e.py New Python E2E coverage for event log read/tail/interest/long-poll.
python/e2e/test_rpc_commands_e2e.py New Python E2E coverage for commands list/invoke/execute/queued response.
nodejs/test/e2e/rpc_workspace_checkpoints.e2e.test.ts New Node E2E coverage for workspace checkpoints/diff/large paste.
nodejs/test/e2e/rpc_tasks_and_handlers.e2e.test.ts Expands Node tasks + UI pending handler coverage + direct auto mode switch.
nodejs/test/e2e/rpc_server.e2e.test.ts Expands Node server-scoped RPC coverage and adds polling helper usage.
nodejs/test/e2e/rpc_schedule.e2e.test.ts New Node E2E coverage for schedule RPC.
nodejs/test/e2e/rpc_remote.e2e.test.ts New Node E2E coverage for remote RPC + persisted steerable.
nodejs/test/e2e/rpc_queue.e2e.test.ts New Node E2E coverage for queue pending items + mutations.
nodejs/test/e2e/rpc_mcp_and_skills.e2e.test.ts Expands Node MCP/skills and MCP apps host-context/capability tests.
nodejs/test/e2e/rpc_event_log.e2e.test.ts New Node E2E coverage for event log read/tail/interest/long-poll.
nodejs/test/e2e/permissions.e2e.test.ts Adds Node E2E coverage for permission paths/state/locations/folder trust.
nodejs/test/e2e/harness/sdkTestHelper.ts Adds reusable waitForCondition helper for polling-based assertions.
nodejs/test/e2e/compaction.e2e.test.ts Adds Node E2E coverage for handoff summary and compaction cancel/abort.
nodejs/test/e2e/commands.e2e.test.ts Adds Node E2E coverage for commands list/invoke/execute/enqueue/respond.
go/internal/e2e/rpc_workspace_checkpoints_e2e_test.go New Go E2E coverage for workspace checkpoints/diff/large paste.
go/internal/e2e/rpc_schedule_e2e_test.go New Go E2E coverage for schedule RPC.
go/internal/e2e/rpc_remote_e2e_test.go New Go E2E coverage for remote RPC + persisted steerable.
go/internal/e2e/rpc_queue_e2e_test.go New Go E2E coverage for queue pending items + mutations.
go/internal/e2e/rpc_event_log_e2e_test.go New Go E2E coverage for event log read/tail/interest/long-poll.
go/internal/e2e/rpc_coverage_helpers_test.go Adds shared Go E2E helpers for pointers, paths, and polling.
go/internal/e2e/permissions_e2e_test.go Expands Go permission RPC E2E coverage (paths/state/locations/folder trust).
go/internal/e2e/compaction_e2e_test.go Expands Go compaction E2E coverage (handoff summary, cancel/abort).
go/internal/e2e/commands_and_elicitation_e2e_test.go Expands Go commands E2E coverage (list/invoke/execute/enqueue/respond).
dotnet/test/E2E/RpcWorkspaceCheckpointsE2ETests.cs New .NET E2E coverage for workspace checkpoints/diff/large paste.
dotnet/test/E2E/RpcTasksAndHandlersE2ETests.cs Expands .NET tasks + UI pending handlers + elicitation/auto-mode coverage.
dotnet/test/E2E/RpcScheduleE2ETests.cs New .NET E2E coverage for schedule RPC.
dotnet/test/E2E/RpcRemoteE2ETests.cs New .NET E2E coverage for remote RPC + persisted steerable.
dotnet/test/E2E/RpcQueueE2ETests.cs New .NET E2E coverage for queue pending items + mutations.
dotnet/test/E2E/RpcMcpAndSkillsE2ETests.cs Expands .NET MCP/skills and MCP apps host-context/capability tests.
dotnet/test/E2E/RpcEventLogE2ETests.cs New .NET E2E coverage for event log read/tail/interest/long-poll.
dotnet/test/E2E/PermissionE2ETests.cs Expands .NET permission RPC E2E coverage (paths/state/locations/folder trust).
dotnet/test/E2E/CompactionE2ETests.cs Expands .NET compaction E2E coverage (handoff summary, cancel/abort).
dotnet/test/E2E/CommandsE2ETests.cs Expands .NET commands E2E coverage (list/invoke/execute/enqueue/respond).

Copilot's findings

  • Files reviewed: 61/61 changed files
  • Comments generated: 4

Comment on lines +6 to +10
async fn should_return_empty_handoff_summary_for_fresh_session() {
with_e2e_context(
"compaction",
"should_not_emit_compaction_events_when_infinite_sessions_disabled",
|ctx| {
Comment on lines +36 to +40
async fn should_report_noop_when_cancelling_compaction_without_inflight_work() {
with_e2e_context(
"compaction",
"should_not_emit_compaction_events_when_infinite_sessions_disabled",
|ctx| {
Comment on lines +73 to +77
async fn should_summarize_for_handoff_after_non_ephemeral_log_event() {
with_e2e_context(
"compaction",
"should_not_emit_compaction_events_when_infinite_sessions_disabled",
|ctx| {
Comment on lines +99 to +113
let pending = session
.rpc()
.queue()
.pending_items()
.await
.expect("pending queued command");
assert!(pending.items.is_empty());
assert!(pending.steering_messages.is_empty());
let removed = session
.rpc()
.queue()
.remove_most_recent()
.await
.expect("remove after command event");
assert!(!removed.removed);
Apply Ruff formatting and import ordering to the new Python RPC E2E tests so the Python SDK checks pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

This comment has been minimized.

Relax model switch assertions for runtime differences, remove unused Go E2E helper, align Rust fork prompt with the replay snapshot, and normalize Windows permission paths.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assert.Equal(branch, contextChanged.Data.Branch);
Assert.Equal("github/copilot-sdk-e2e", contextChanged.Data.Repository);
Assert.Equal("github.com", contextChanged.Data.RepositoryHost);
Assert.Equal("github", contextChanged.Data.HostType?.Value);
@github-actions

This comment has been minimized.

Use SendAndWaitAsync for the compaction setup turn so the test waits through the SDK send path instead of racing metadata polling and assistant event delivery.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Cross-SDK Consistency Review ✅

This PR maintains strong cross-SDK consistency. All five SDK implementations (C#/.NET, Go, Node.js/TypeScript, Python, Rust) receive equivalent E2E test coverage for the same RPC categories:

Test Category .NET Go Node.js Python Rust
commands
compaction ✅ (pre-existing) ✅ (pre-existing)
permissions ✅ (pre-existing) ✅ (pre-existing)
rpc_event_log
rpc_mcp_and_skills
rpc_queue
rpc_remote
rpc_schedule
rpc_server
rpc_session_state
rpc_tasks_and_handlers
rpc_workspace_checkpoints

Java is explicitly noted as out of scope in the PR description, which is a conscious and documented decision rather than an oversight.

No cross-SDK consistency issues found.

Generated by SDK Consistency Review Agent for issue #1424 · ● 5.6M ·

Give the Go SDK race test run enough time for the expanded E2E suite on slower Windows runners.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot mentioned this pull request May 26, 2026
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