inspector/clients/web/src/test/integration/mcp/remote
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cliffhall b70aed6914 test(fix): probe a single-source route when waiting for the dead transport
Review feedback on #1987: `waitForDeadTransport` polled `/api/mcp/send`,
which answers `transport_error` from two branches — the `isTransportDead()`
short-circuit and the `catch` around a rejected `send()`. Only the first
implies the transport is marked dead, so the stop condition could not tell
them apart from the response alone.

That was safe in practice: `StdioClientTransport.send` rejects only when
`_process` is undefined, and the transport clears `_process` and calls
`onclose` in one synchronous block, so the `catch` branch is not observable
before `markTransportDead()` has run (confirmed empirically — 0/25 probes
returned early). But the safety rested on an SDK-internal ordering this test
neither states nor controls, and if it changed the send test would silently
cover the `catch` branch instead of the short-circuit it names — a regression
with no failing run attached to it.

Poll `/api/mcp/auth-state` instead. For a session connected without an
authState there is no auth provider, so `setAuthState` always throws and
`transport_error` there has exactly one source: the dead-transport
short-circuit. The route never awaits a transport response, so it cannot
hang either. Same cost, exact condition, no dependence on SDK internals.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WLYmVPVLdeYpE6aMTUsCks
2026-08-12 01:10:03 -04:00
..
client-store-route.test.ts Guided-auth removal, OAuth smoke testing, and TUI/CLI support (#1531) 2026-06-29 15:35:51 -04:00
connect-crash.test.ts test: deterministic remote-server teardown to kill #1667 afterEach hang (#1763) 2026-07-24 12:20:54 -04:00
harnessTeardown.ts test: deterministic remote-server teardown to kill #1667 afterEach hang (#1763) 2026-07-24 12:20:54 -04:00
remote-auth-branches.test.ts test(fix): probe a single-source route when waiting for the dead transport 2026-08-12 01:10:03 -04:00
remote-session.test.ts fix: reject a non-string protocolVersion, and drop the test double casts 2026-08-10 20:55:51 -04:00
remoteClientTransport-unit.test.ts fix(core): mirror SEP-2243 x-mcp-header args to Mcp-Param-* on tools/call (#1847) 2026-07-28 19:19:48 -04:00
server-config.test.ts feat(web): catalog vs read-only session launch model + apply --header (#1481, #1483) (#1496) 2026-06-16 14:24:58 -04:00
server-extra-coverage.test.ts fix(core): mirror SEP-2243 x-mcp-header args to Mcp-Param-* on tools/call (#1847) 2026-07-28 19:19:48 -04:00
servers-events.test.ts feat(web): catalog vs read-only session launch model + apply --header (#1481, #1483) (#1496) 2026-06-16 14:24:58 -04:00
servers-order.test.ts feat(web): reorderable ServerCards — drag-and-drop + keyboard (#1369) (#1447) 2026-06-09 14:15:58 -04:00
servers-route.test.ts Era-aware connection model & capability gating (#1626) (#1697) 2026-07-16 23:39:29 -04:00
sse-priming.test.ts fix: prime SSE streams so Firefox resolves the events fetch 2026-08-06 17:05:36 -04:00
transport.test.ts fix: forward the negotiated protocol version to the remote backend transport 2026-08-10 20:44:37 -04:00