Skip to content

Commit cdc5a12

Browse files
authored
Merge pull request #5459 from modelcontextprotocol/v2/chore/5428-per-server-interface-diff
chore(ci): diff each changed server's MCP interface, for every server
2 parents 594c2be + b3f7149 commit cdc5a12

13 files changed

Lines changed: 1127 additions & 221 deletions

‎.claude/skills/pre-push-gate/SKILL.md‎

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -275,25 +275,35 @@ of the server's stderr. Re-run a subset with
275275

276276
### `interface-diff`
277277

278-
The last stage diffs the `everything` server's MCP interface (capabilities,
279-
tools, prompts, resources, resource templates) in this checkout's build
280-
against the same server built from the merge-base with `origin/v2/main`, and
281-
prints the report. **A changed interface does not fail it**: the report is
278+
The last stage diffs the MCP interface (capabilities, tools, prompts,
279+
resources, resource templates) of each server the change touches, in this
280+
checkout's build, against the same server built from the merge-base with
281+
`origin/v2/main`, and prints one report per server. Each report says why that
282+
server was selected; a change that touches no server prints
283+
`no server changed` and passes. What selects a server is in
284+
[`docs/quality-gate.md`](../../../docs/quality-gate.md). **A changed interface does not fail it**: the report is
282285
what the PR's sticky comment will show, so read it, and if a change is not
283286
one you meant, that is the finding. It fails only when the diff cannot run,
284287
with `❌ The interface diff could not run` and the reason:
285288

286289
- **"origin/v2/main is not available"**: `git fetch origin v2/main`.
287-
- **"src/everything/dist/index.js does not exist"**: you ran it on its own
288-
before building: `npm run build -w src/everything`.
289-
- **An `npm ci` or `npm run build` failure**: the _base_ did not install or
290-
build. Offline with a cold npm cache is the usual cause; otherwise name a
290+
- **"src/<server>/dist/index.js does not exist"**: you ran it on its own
291+
before building: `npm run build -w src/<server>`.
292+
- **"src/<server>/.venv does not exist"**: a Python server was not synced:
293+
`cd src/<server> && uv sync --frozen --all-extras --dev` (the gate's
294+
`validate:py` does it).
295+
- **"does not exist at the base"**: the server is new on this branch, so
296+
there is no base to diff it against.
297+
- **An `npm ci`, `npm run build` or `uv sync` failure**: the _base_ did not
298+
install or build. Offline with a cold npm cache is the usual cause; otherwise name a
291299
base that builds with `npm run interface-diff -- --base <ref>`.
292300
- **"Base server probe failed" / "Target probe failed"**: a server did not
293301
answer the probe. A target failure is this checkout's server and is the
294302
real defect; the smoke stage before it usually fails first.
295303

296-
Re-run it on its own with `npm run interface-diff` (about ten seconds). What
304+
Re-run it on its own with `npm run interface-diff` (about ten seconds for
305+
every server), `-- --server <name>` for one, or `-- --list` to see what it
306+
would select and why. What
297307
it compares against in CI, and why it is a script rather than an action, is
298308
in [`docs/quality-gate.md`](../../../docs/quality-gate.md) and the header of
299309
`scripts/interface-diff.mjs`.

‎.claude/skills/release/SKILL.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,10 @@ Then, on the PR:
206206
```
207207
2. **Wait for its CI to pass.** The workflow token's push starts no workflow,
208208
so the Version Packages workflow dispatches the TypeScript, Python, DCO and
209-
Everything diff workflows on `changeset-release/v2/main` after each update.
209+
MCP interface diff workflows on `changeset-release/v2/main` after each update.
210210
A PR does not list dispatched checks, so the result shows as four commit
211211
statuses: `TypeScript (dispatched)`, `Python (dispatched)`,
212-
`DCO (dispatched)` and `Everything diff (dispatched)`. The PR may also
212+
`DCO (dispatched)` and `Interface diff (dispatched)`. The PR may also
213213
list `DCO signoff` and the diff as pending or failed with no jobs: GitHub
214214
holds the token's `pull_request` runs (#5173), so read the statuses
215215
instead. Closing and reopening the PR does not start the CI workflows
@@ -255,8 +255,8 @@ gh workflow run prepare-python-release.yml --repo modelcontextprotocol/servers \
255255

256256
It opens a PR that starts with `Closes #N`, on a branch named
257257
`v2/chore/<N>-python-calver-<date>`, labeled `v2`, and dispatches the
258-
TypeScript, Python and DCO workflows on that branch, as the Version Packages
259-
workflow does (not the Everything diff, whose paths it never touches).
258+
TypeScript, Python, DCO and MCP interface diff workflows on that branch, as
259+
the Version Packages workflow does.
260260
No PR means no Python server has a shipped change since its last stamp.
261261

262262
Then, on the PR:
@@ -272,7 +272,7 @@ Then, on the PR:
272272
--json number,headRefName,url \
273273
| jq --arg p "v2/chore/$N-python-calver-" '.[] | select(.headRefName | startswith($p))'
274274
```
275-
2. **Wait for its three `(dispatched)` statuses to pass**, check that each
275+
2. **Wait for its four `(dispatched)` statuses to pass**, check that each
276276
stamped package really changed, and a maintainer merges it.
277277

278278
⚠️ GitHub only dispatches a workflow that exists on the default branch. Until

0 commit comments

Comments
 (0)