Skip to content

test(apps): add Socket Mode e2e matrix - #743

Open
Kavin (singhk97) wants to merge 4 commits into
kavinsingh-microsoft-socket-mode-transportfrom
kavinsingh-microsoft-socket-mode-e2e-matrix
Open

test(apps): add Socket Mode e2e matrix#743
Kavin (singhk97) wants to merge 4 commits into
kavinsingh-microsoft-socket-mode-transportfrom
kavinsingh-microsoft-socket-mode-e2e-matrix

Conversation

@singhk97

@singhk97 Kavin (singhk97) commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

An App-level end-to-end matrix for inbound Socket Mode, plus the manual E2E plan for live connectivity.

Automated coverage

Exercises the real App / SocketServer / CompositeServer / HttpServer pipeline through contract-faithful fake connection + HTTP adapter seams:

  • transport selection & the SocketReady readiness gate; multi-geo default (one connection per geo);
  • dispatch: invoke / one-way / missing-payload / handler-failure / casing & version mismatch;
  • lifecycle: disconnect → reconnect → stop with geo-tagged events, plus throwing-listener isolation;
  • connection-option forwarding and bounded startup retries;
  • HTTP-fallback (composite) dual delivery, supplied-adapter reuse, and primary start-failure propagation;
  • config guards (HttpPlugin rejected; adapter only with fallback) and browser-feature gates.

Manual E2E

Live Teams backend service / Azure SignalR connectivity is outside deterministic Jest scope. See the manual test plan: Socket Mode manual E2E testing matrix.

Validation

apps build ✅ · jest ✅ · eslint ✅


📚 Top of the stack — depends on the Socket Mode transport PR (#716).

@singhk97
Kavin (singhk97) force-pushed the kavinsingh-microsoft-socket-mode-e2e-matrix branch from 3060acd to f32aff3 Compare August 20, 2026 20:05
Copilot AI lite review requested due to automatic review settings August 20, 2026 21:08
@singhk97
Kavin (singhk97) force-pushed the kavinsingh-microsoft-socket-mode-e2e-matrix branch from f32aff3 to cb3c499 Compare August 20, 2026 21:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new end-to-end Jest test matrix to exercise App behavior in Socket Mode (socket-only and composite socket+HTTP fallback) and closes a remaining CompositeServer lifecycle gap with a targeted unit test.

Changes:

  • Added a new Socket Mode App e2e test suite covering lifecycle events, envelope casing/version mismatch handling, handler error behavior, and connection option forwarding.
  • Expanded CompositeServer unit coverage to ensure an HTTP start failure propagates and prevents the socket server from being started.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/apps/src/ws-connect/composite-server.spec.ts Adds a unit test asserting HTTP-start failure propagation without starting the socket server.
packages/apps/src/ws-connect/app.e2e.spec.ts Introduces a comprehensive Socket Mode App e2e matrix for socket-only and composite transport scenarios.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/apps/src/ws-connect/app.e2e.spec.ts Outdated
@singhk97
Kavin (singhk97) force-pushed the kavinsingh-microsoft-socket-mode-e2e-matrix branch 2 times, most recently from 19e19d0 to 0052ae7 Compare August 21, 2026 21:00
Comment thread packages/apps/src/ws-connect/app.e2e.spec.ts Outdated
Comment thread packages/apps/src/ws-connect/app.e2e.spec.ts Outdated
Comment thread packages/apps/src/socket-mode/app.e2e.spec.ts
Comment thread packages/apps/src/ws-connect/app.e2e.spec.ts Outdated

@corinagum Corina (corinagum) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Are you planning on adding integration tests? maybe scoped to .net? Please verify if TS and PY need any language-specific additions.

@singhk97
Kavin (singhk97) force-pushed the kavinsingh-microsoft-socket-mode-e2e-matrix branch 10 times, most recently from 365b749 to a6a3cf2 Compare August 26, 2026 16:24
@singhk97
Kavin (singhk97) force-pushed the kavinsingh-microsoft-socket-mode-e2e-matrix branch 6 times, most recently from 34eafc9 to d8c9f95 Compare August 26, 2026 21:08
Kavin (singhk97) and others added 4 commits August 26, 2026 14:43
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The matrix only exercised the options-object form; add a case that constructs
an App with the boolean `socketMode: true` shorthand and asserts it runs the
composite transport (HTTP fallback defaults on), exposes app.socketMode, and
forwards the default connection options to the underlying connection.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: fa8eeb9a-6b45-4a3a-b742-785a1f4607b8
…lifecycle

Update the e2e fake to the new single-generation connection contract: start()
now blocks until readiness (modeling the SocketReady gate), a drop is reported
via onClosed, and the supervisor renegotiates a fresh connection. Rework the
lifecycle test to assert supervisor-driven reconnect (a brand-new connection is
built on drop) and update the connection-option assertions to the new context
fields (keepAlive/serverTimeout instead of the removed per-connection reconnect
schedule). Add a case asserting readiness is not wedged when a 'ready' listener
throws.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: fa8eeb9a-6b45-4a3a-b742-785a1f4607b8
Pin the single-connection lifecycle/options cases to geos:[''] and update the
lifecycle event assertions to the geo-tagged payloads (ready {geo,frame},
disconnected {geo,error}, reconnected {geo}). Add cases asserting the default
opens one geo-scoped connection per geo (amer/emea/apac), including via the
socketMode:true shorthand.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: fa8eeb9a-6b45-4a3a-b742-785a1f4607b8
@singhk97
Kavin (singhk97) force-pushed the kavinsingh-microsoft-socket-mode-e2e-matrix branch 2 times, most recently from d8c9f95 to 58c3cf7 Compare August 26, 2026 21:47
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