Skip to content

Add cross-version interop test against the published ext-apps 1.7.5 - #770

Merged
ochafik merged 1 commit into
mainfrom
interop-unit
Sep 8, 2026
Merged

Add cross-version interop test against the published ext-apps 1.7.5#770
ochafik merged 1 commit into
mainfrom
interop-unit

Conversation

@ochafik

@ochafik ochafik commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Adds a unit test that runs the published ext-apps 1.7.5 against this build over an in-memory transport, in both pairings: 2.x App with the 1.x AppBridge (outer client on sdk 1.30), and 1.x App with the 2.x AppBridge (outer client on SDK 2.0). It complements src/wire-compat.test.ts, which replays hand-shaped 1.x JSON: that file pins message shapes, this one runs the real 1.x code.

Why it earns its place: mutation-testing showed a coordinated wire rename in 2.x (sender and shared schema literal changed together, e.g. ui/notifications/tool-cancelled, ui/open-link's url param, or ui/initialize's appInfo) is invisible to the whole same-version suite and to wire-compat.test.ts, and is caught only here. It also carries an exact assertion on the raw ui/initialize result the 1.x View receives, so additive drift fails too.

Mechanics: two devDependencies (ext-apps-v1 as an npm alias of @modelcontextprotocol/ext-apps@1.7.5, and @modelcontextprotocol/sdk@1.30.0, whose name does not collide with the 2.x split packages; a second alias for the sdk would install it twice and break its instanceof McpError checks), and one test file. A provenance test asserts the alias resolves to 1.7.5 and that the 1.x classes descend from sdk-1's Protocol while the 2.x ones do not, so the pairing cannot silently collapse to same-version. 15 tests, 57 assertions.

Checked: npm audit unchanged versus main; lockfile entries all registry.npmjs.org; check-versions, check-dependency-isolation, npm pack contents, prettier and tsc --noEmit unaffected; the test step runs offline in the CI image (--network none) after npm ci. 10 of 10 native runs green. The cases in each pairing share one connected fixture and run in file order, noted in a comment.

The 1.7.5 pin is deliberate: it is the last 1.x, and bump-version.mjs leaves it alone. A deliberate 2.x wire change would need a pairings-table decision here, which is the point.

Install @modelcontextprotocol/ext-apps@1.7.5 under the npm alias ext-apps-v1
(plus @modelcontextprotocol/sdk@1.30.0, its peer) as devDependencies and run
the 2.x App against the 1.x AppBridge and vice versa over an in-memory
duplex, with each bridge fronting a real Client+McpServer of its own SDK
generation. Covers initialize, notifications, view-to-host requests,
tool/resource proxying, error codes, AbortSignal cancellation, teardown and
close.
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Preview

Preview deployments for this PR have been cleaned up.

@pkg-pr-new

pkg-pr-new Bot commented Sep 8, 2026

Copy link
Copy Markdown

Open in StackBlitz

@modelcontextprotocol/ext-apps

npm i https://pkg.pr.new/@modelcontextprotocol/ext-apps@770

@modelcontextprotocol/server-basic-preact

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-preact@770

@modelcontextprotocol/server-basic-react

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-react@770

@modelcontextprotocol/server-basic-solid

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-solid@770

@modelcontextprotocol/server-basic-svelte

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-svelte@770

@modelcontextprotocol/server-basic-vanillajs

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-vanillajs@770

@modelcontextprotocol/server-basic-vue

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-vue@770

@modelcontextprotocol/server-budget-allocator

npm i https://pkg.pr.new/@modelcontextprotocol/server-budget-allocator@770

@modelcontextprotocol/server-cohort-heatmap

npm i https://pkg.pr.new/@modelcontextprotocol/server-cohort-heatmap@770

@modelcontextprotocol/server-customer-segmentation

npm i https://pkg.pr.new/@modelcontextprotocol/server-customer-segmentation@770

@modelcontextprotocol/server-debug

npm i https://pkg.pr.new/@modelcontextprotocol/server-debug@770

@modelcontextprotocol/server-lazy-auth

npm i https://pkg.pr.new/@modelcontextprotocol/server-lazy-auth@770

@modelcontextprotocol/server-map

npm i https://pkg.pr.new/@modelcontextprotocol/server-map@770

@modelcontextprotocol/server-pdf

npm i https://pkg.pr.new/@modelcontextprotocol/server-pdf@770

@modelcontextprotocol/server-scenario-modeler

npm i https://pkg.pr.new/@modelcontextprotocol/server-scenario-modeler@770

@modelcontextprotocol/server-shadertoy

npm i https://pkg.pr.new/@modelcontextprotocol/server-shadertoy@770

@modelcontextprotocol/server-sheet-music

npm i https://pkg.pr.new/@modelcontextprotocol/server-sheet-music@770

@modelcontextprotocol/server-system-monitor

npm i https://pkg.pr.new/@modelcontextprotocol/server-system-monitor@770

@modelcontextprotocol/server-threejs

npm i https://pkg.pr.new/@modelcontextprotocol/server-threejs@770

@modelcontextprotocol/server-transcript

npm i https://pkg.pr.new/@modelcontextprotocol/server-transcript@770

@modelcontextprotocol/server-video-resource

npm i https://pkg.pr.new/@modelcontextprotocol/server-video-resource@770

@modelcontextprotocol/server-wiki-explorer

npm i https://pkg.pr.new/@modelcontextprotocol/server-wiki-explorer@770

commit: 5f6346e

@ochafik
ochafik merged commit 12aa50b into main Sep 8, 2026
23 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.

1 participant