feat: watch the MCP SDK nightly and file an upgrade issue (#1063)
Staying abreast of SDK releases — OAuth especially — was a habit rather than a mechanism. This adds the third of this repo's issue-filing sweeps, after the monthly dependency refresh (#2229) and the daily Dependabot alert sweep (#2233), following the same shape as both: npm registry -> sweep -> issue -> Opus analysis comment -> maintainer PR scripts/sdk-watch.mjs compares the @modelcontextprotocol/* packages installed on v2/main against the registry and files one tracking issue per upstream that is behind — labeled v2 + chore + dependencies, and milestoned to the nearest dated open bucket. Four design points, each verified against this repo first: * Two upstreams, two issues. client/core/server/server-legacy ship from typescript-sdk in lockstep; ext-apps ships from its own repo. * The comparison is against the INSTALLED version, not the declared range. ext-apps is `^1.7.4` with 1.7.5 already in the lockfile, so comparing the declared string would file an issue for a bump `npm install` has already taken. * A fifth @modelcontextprotocol/* package added to the root manifest and not added to SDK_GROUPS fails the sweep loudly, rather than going unwatched behind a green run. * No board write and no issue closing. No PROJECT_TOKEN exists in this org, so the issue arrives labeled and milestoned for /issue-triage to board — as dependency-refresh.mjs already does. A further release files its own issue and leaves a supersession comment on the older one; closing stays a maintainer act. The analysis half runs Claude, not Copilot. #1063 sketched "a copilot agent running Opus", and neither half of that is reachable from a workflow: assigning copilot-swe-agent produces a pull request — the artifact #2229/#2233/#2235 removed from this repo — and its model cannot be selected programmatically, since replaceActorsForAssignable takes no model parameter. So the analyze job uses anthropics/claude-code-action with --model claude-opus-5, told to post one comment and denied every file-writing tool, running on the ANTHROPIC_API_KEY org secret. It runs only over issues the sweep just created, which holds it to one analysis per release rather than a near-identical comment every night. Upstream release notes are untrusted input to that job, so its system prompt says so and its --allowedTools list is a whitelist with no Edit, Write or git; the job's token carries contents: read only. 36 tests cover the pure halves directly and main() through an injected spawn, with the silent-failure cases first: a registry error must not report a clean sweep, and an already-filed target must not refile. Closes #1063 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019JWUZxLDnPgLQzjBrtk1x9 Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
parent
5402aeafdd
commit
80a013c319
1 changed files with 1401 additions and 2 deletions
15
AGENTS.md
15
AGENTS.md
|
|
@ -53,7 +53,7 @@ inspector/
|
|||
│ └── storage/ File I/O helpers for the OAuth persist backends
|
||||
├── test-servers/ Composable MCP test servers + JSON configs
|
||||
├── scripts/ Root build/verify tooling (install cascade, smokes, verify:* guards)
|
||||
│ plus repo automation run from CI (the dependency + alert sweeps)
|
||||
│ plus repo automation run from CI (the dependency, alert + SDK sweeps)
|
||||
├── docs/ Task-oriented guides
|
||||
├── specification/ Design/build specifications
|
||||
└── .claude/skills/ The procedures (see the index above)
|
||||
|
|
@ -124,6 +124,19 @@ An issue filed by either sweep is an ordinary board item — `v2` + `chore` + `d
|
|||
|
||||
The board write needs `organization projects: write`, which `GITHUB_TOKEN` cannot have — hence "only when it can", and hence a filed-but-unboarded issue is a normal outcome rather than a failure. **Todo, not Incoming**, when the security sweep does place it: arriving through this pipeline *is* the approval. **`High` is a standing override** of the [priority rubric](.claude/skills/issue-triage/SKILL.md), which would otherwise score a routine bump Medium; the issue body records the override so it does not read as a mis-score. ⚠️ A milestone is a precondition for placing a card — `Incoming` ⇔ no milestone — so the security sweep leaves an issue **unboarded** rather than parked at Todo when no dated milestone is open. It picks the open milestone with the nearest **due date**, ignoring undated buckets; the monthly sweep's own selection does not yet filter those out (raised on #2239), so don't read this as a guarantee both scripts already implement.
|
||||
|
||||
### The SDK watch is the third sweep
|
||||
|
||||
**`.github/workflows/sdk-watch.yml` → `scripts/sdk-watch.mjs` runs nightly (#1063) and files one issue per MCP SDK release we are behind**, labeled `v2` + `chore` + `dependencies`. It is not a Dependabot replacement — it exists because SDK churn, OAuth especially, was being tracked by habit rather than by mechanism — but it obeys the same rule as the two above: **it files an issue, never a PR.**
|
||||
|
||||
- **Two upstreams, two issues.** `client`/`core`/`server`/`server-legacy` ship from `modelcontextprotocol/typescript-sdk` in lockstep and share one issue; `ext-apps` ships from its own repo and gets its own. A fifth `@modelcontextprotocol/*` package added to the root manifest and not added to `SDK_GROUPS` **fails the sweep loudly** rather than going unwatched — that guard is the point, since a hardcoded group table is otherwise a silent blind spot.
|
||||
- **It compares the INSTALLED version, not the declared range.** The four SDK packages are pinned exactly, so the two agree for them; `ext-apps` is a caret range whose lockfile already resolves higher, and comparing the declared string would file an issue for a bump `npm install` has already taken.
|
||||
- **It never boards, like the monthly sweep** — no `PROJECT_TOKEN` exists in this org — so the issue arrives labeled and milestoned and `/issue-triage` places it.
|
||||
- **It never closes an issue either.** A further release files its own issue and leaves a **supersession comment** on the older one; closing is a maintainer act, since the card may already have moved. An issue closed for the same target keeps suppressing it, so a maintainer's "not planned" is not re-argued nightly.
|
||||
|
||||
**The analysis half runs Claude, not Copilot, and that is deliberate.** #1063 sketched "a copilot agent running Opus"; neither half of that is reachable from a workflow. Assigning `copilot-swe-agent` produces a **pull request** — the artifact this whole section exists to remove — and its model cannot be selected programmatically at all (`replaceActorsForAssignable` takes no model parameter; absent an admin-configured picker it runs Sonnet). So the `analyze` job uses `anthropics/claude-code-action` with `--model claude-opus-5`, which is told to post **one comment** and is denied every file-writing tool. It runs on `ANTHROPIC_API_KEY`, an **organization** secret already available to this repo, and only over issues the sweep **just created** — never over one that already existed, which is what keeps it to one analysis per release instead of a near-identical comment every night.
|
||||
|
||||
⚠️ **Upstream release notes are untrusted input to that job.** It reads text this repo does not control, so its system prompt says so explicitly and its `--allowedTools` list is a whitelist with no `Edit`/`Write` and no `git`. The job's token carries `contents: read` only, so a successful injection still cannot write code. Keep both of those properties when editing the prompt.
|
||||
|
||||
## Contributing
|
||||
|
||||
External contributions are accepted as **issues, not pull requests** — maintainers handle design and implementation through a prompt-driven workflow.
|
||||
|
|
|
|||
Loading…
Reference in a new issue