diff --git a/.github/workflows/everything-mcp-diff.yml b/.github/workflows/everything-mcp-diff.yml index ca94985acc..3de61944a4 100644 --- a/.github/workflows/everything-mcp-diff.yml +++ b/.github/workflows/everything-mcp-diff.yml @@ -52,6 +52,9 @@ # dispatches only a workflow whose file exists on the default branch (`main`), # and both version workflows dispatch this one by file name from `v2/main`, so # renaming it here would break their dispatch until the next milestone merge. +# The rename is staged instead: `mcp-interface-diff.yml` lands on `main` first +# as a dispatch-only placeholder (#5463), then #5527 moves this file's contents +# there, switches the callers and deletes this file. # # See: https://github.com/modelcontextprotocol/inspector/issues/1034 name: MCP Interface Diff diff --git a/.github/workflows/mcp-interface-diff.yml b/.github/workflows/mcp-interface-diff.yml new file mode 100644 index 0000000000..4bda642ed5 --- /dev/null +++ b/.github/workflows/mcp-interface-diff.yml @@ -0,0 +1,42 @@ +# Placeholder for the MCP interface diff's future file name (#5463, Step 1 of +# a rename staged across a milestone merge). +# +# The interface diff lives in `everything-mcp-diff.yml`, a name left over from +# when it diffed only the Everything server. GitHub dispatches a workflow only +# when its file exists on the default branch (`main`), and both version +# workflows (`version-packages.yml`, `prepare-python-release.yml`) dispatch +# the diff by file name from `v2/main`. Renaming it in one step on `v2/main` +# would break their dispatch until the next milestone merge. So the rename is +# staged: +# +# 1. This file ships to `main` in a milestone merge. It is a placeholder, not +# a copy of the diff: a dispatch resolves the file name on `main` but runs +# the file as it is on the dispatched ref, so a placeholder makes the name +# dispatchable as well as a copy would, without a second copy to keep in +# step meanwhile. It has only a `workflow_dispatch` trigger, so it never +# runs beside the real diff on a push or a pull request. +# 2. After that merge, #5527 (Step 2) moves `everything-mcp-diff.yml`'s +# contents here, switches the callers to this name, and deletes the old +# file. +# +# Until then, nothing dispatches this file, and a manual dispatch only says +# where the diff is. +name: MCP Interface Diff (rename placeholder) + +on: + workflow_dispatch: + +permissions: + contents: read + +jobs: + placeholder: + name: Point to the interface diff + timeout-minutes: 5 + runs-on: ubuntu-latest + steps: + - name: Say where the interface diff runs + run: | + echo "This file is a placeholder for a staged rename (#5463, #5527)." + echo "The MCP interface diff runs from .github/workflows/everything-mcp-diff.yml:" + echo " gh workflow run everything-mcp-diff.yml --ref " diff --git a/AGENTS.md b/AGENTS.md index bad74767a6..28b1d587ed 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -64,6 +64,7 @@ servers/ ├── .github/workflows/ typescript.yml, python.yml (per-package CI), release.yml (publishes on a GitHub Release), │ version-packages.yml (the changesets PR), prepare-python-release.yml (the CalVer PR), │ everything-mcp-diff.yml (each changed server's interface diff on PRs), +│ mcp-interface-diff.yml (a dispatch-only placeholder for that file's new name, #5463), │ main-source.yml (a PR into main must bring nothing that is not on v2/main), │ and the scheduled sweeps that file issues: dependency-refresh.yml, dependabot-alerts.yml, sdk-watch.yml ├── .github/ISSUE_TEMPLATE/ Bug and feature issue forms; config.yml routes security and new servers away diff --git a/scripts/version-pr-ci.test.mjs b/scripts/version-pr-ci.test.mjs index 4166bed272..31bd4ed19c 100644 --- a/scripts/version-pr-ci.test.mjs +++ b/scripts/version-pr-ci.test.mjs @@ -257,3 +257,18 @@ test("RELEASING.md names the statuses a version PR is merged on", () => { assert.ok(releasing.includes(`\`${context}\``), context); assert.doesNotMatch(releasing, /Close and reopen the PR to run CI/); }); + +// #5463 (Step 1 of a staged rename): `mcp-interface-diff.yml` exists so the +// name is on `main` before #5527 (Step 2) points the version workflows at it. +// Until then it must not run beside the real diff on a push or a pull +// request, and nothing may dispatch it yet: the version workflows keep +// dispatching `everything-mcp-diff.yml` (pinned in VERSION_WORKFLOWS above). +test("mcp-interface-diff.yml is a dispatch-only placeholder until Step 2", () => { + const wf = workflow("mcp-interface-diff.yml"); + assert.deepEqual(Object.keys(wf.on), ["workflow_dispatch"]); + for (const { file } of VERSION_WORKFLOWS) + assert.ok( + !read(`.github/workflows/${file}`).includes("mcp-interface-diff.yml"), + `${file} does not dispatch the placeholder yet`, + ); +});