Skip to content

fix(nodejs): Map suppressResumeEvent to disableResume on the wire#1529

Merged
MRayermannMSFT merged 3 commits into
github:mainfrom
willglas:willglas/fix-suppress-resume-event-wire-mapping
Jun 1, 2026
Merged

fix(nodejs): Map suppressResumeEvent to disableResume on the wire#1529
MRayermannMSFT merged 3 commits into
github:mainfrom
willglas:willglas/fix-suppress-resume-event-wire-mapping

Conversation

@willglas
Copy link
Copy Markdown
Contributor

@willglas willglas commented Jun 1, 2026

Summary

The Node.js and .NET SDKs send the wrong wire field name when mapping suppressResumeEvent to the JSON-RPC session.resume payload. The server expects disableResume, but:

  • Node.js sends suppressResumeEvent as-is (silently dropped by the server)
  • .NET relies on JsonSerializerDefaults.Web camelCasing, which produces suppressResumeEvent instead of disableResume

The Rust, Go, and Java SDKs already handle this correctly with explicit rename annotations.

Changes

  • nodejs/src/client.ts — map config.suppressResumeEvent to disableResume in the session.resume RPC payload
  • dotnet/src/Client.cs — add [property: JsonPropertyName("disableResume")] to SuppressResumeEvent (same pattern as ConfigDirectoryconfigDir)
  • nodejs/test/e2e/suspend.e2e.test.ts — add gitHubToken to the suspend test server so the test works without COPILOT_HMAC_KEY (matching pattern in other multi-client E2E tests)

No public API changes — the user-facing field names remain the same in both SDKs.

Copilot AI review requested due to automatic review settings June 1, 2026 15:36
@willglas willglas requested a review from a team as a code owner June 1, 2026 15:36
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

Note

Copilot was unable to run its full agentic suite in this review.

Renames the property suppressResumeEvent to disableResume when passing the config value through in the Copilot client.

Changes:

  • Updated property name from suppressResumeEvent to disableResume in the config mapping.
Show a summary per file
File Description
nodejs/src/client.ts Renames the outgoing config field to disableResume while keeping the source field config.suppressResumeEvent.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread nodejs/src/client.ts
willglas and others added 3 commits June 1, 2026 09:35
The Node.js SDK's resumeSession() sends suppressResumeEvent as-is on
the JSON-RPC wire, but the server recognizes the field as disableResume.
This aligns with the Rust SDK which already maps suppress_resume_event
to disableResume at the serialization boundary.

No public API changes - ResumeSessionConfig.suppressResumeEvent remains
the user-facing field name.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The .NET SDK's JsonSerializerDefaults.Web camelCases SuppressResumeEvent
to suppressResumeEvent, but the server expects disableResume. Add an
explicit JsonPropertyName attribute to produce the correct wire name.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The createTcpServer() helper was missing gitHubToken, causing the
suspend-resume test to fail when COPILOT_HMAC_KEY is unavailable
(e.g. fork PRs, local development). This matches the pattern used
in pending_work_resume and other multi-client E2E tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@willglas willglas force-pushed the willglas/fix-suppress-resume-event-wire-mapping branch from dc3204e to 395decd Compare June 1, 2026 17:03
@MRayermannMSFT MRayermannMSFT added this pull request to the merge queue Jun 1, 2026
Merged via the queue into github:main with commit b53dfc1 Jun 1, 2026
25 checks passed
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.

3 participants