Skip to content

Commit 371190b

Browse files
authored
Merge pull request #5065 from modelcontextprotocol/v2/feat/4874-issue-filing-sweeps
Replace Dependabot PRs with issue-filing sweeps; add the SDK watch and the factory overview
2 parents 7e751ec + 2b65349 commit 371190b

22 files changed

Lines changed: 7466 additions & 29 deletions

‎.claude/skills/issue-triage/SKILL.md‎

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,24 @@ maintainer and not Dependabot**. A maintainer is an author whose role on this
298298
repository is `admin` or `maintain`; write access alone is not enough, which is
299299
the policy's point.
300300

301+
**A Dependabot PR should not exist.** Dependency updates are issue-driven
302+
(`AGENTS.md`, Dependencies): `.github/dependabot.yml` is gone and security-update
303+
PRs are switched off, and three scheduled sweeps file issues instead. One that
304+
appears anyway means a config came back or the `automated-security-fixes`
305+
setting was switched on again. Close it with a pointer to the sweep issue that
306+
covers the same bump, and raise the cause with a maintainer. If no sweep issue
307+
covers it yet, do **not** file one with `issue-create`: the sweeps trust only
308+
issues the automation wrote, so the next run would file a duplicate beside it.
309+
Dispatch the sweep instead (`gh workflow run dependabot-alerts.yml`, or
310+
`dependency-refresh.yml` for a version bump) and point at the issue it files.
311+
312+
⚠️ **Until the milestone merge carries the sweeps to `main`**, none of this
313+
applies yet: a workflow can only be dispatched or scheduled from the default
314+
branch, and `main` still has `dependabot.yml`. Leave Dependabot PRs open until
315+
then. The merge PR closes them, each with the pointer #5065 records.
316+
301317
Not touched by triage:
302318

303-
- **Dependabot PRs**, the temporary exception in `AGENTS.md`, until #4874
304-
replaces them.
305319
- **Maintainer-authored PRs.** List any that target `main` for their authors to
306320
retarget or close; do nothing else with them.
307321
- **An outside PR an open issue already names as the thing to decide** (for
@@ -447,12 +461,13 @@ later edit.
447461

448462
### 5. Verify
449463

450-
The pass is complete when every open PR is maintainer-authored, a Dependabot
451-
PR, or named in the report as left open by an issue that owns it; every closed
464+
The pass is complete when every open PR is maintainer-authored or named in the
465+
report as left open by an issue that owns it; every closed
452466
PR marked for harvest names an issue that links back to it; and every harvest
453467
issue carries `v2`, one type label, its scope label where one applies, and sits
454468
in `Incoming` with no milestone. Re-run step 1: every remaining line should be
455-
`maintainer`, `dependabot`, or a PR the report names.
469+
`maintainer`, or a PR the report names. A `dependabot` line is a PR to close
470+
(see above).
456471

457472
### README-only PRs: what `readme-pr-check.yml` did
458473

‎.github/dependabot.yml‎

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Daily Dependabot alert sweep (#4874), replacing Dependabot's security-update
2+
# PRs. Ported from the MCP Inspector's workflow of the same name
3+
# (inspector#2233).
4+
#
5+
# Security-update PRs are a repo setting (`automated-security-fixes`) and are
6+
# switched off; the ALERTS stay on, and this workflow consumes them. It runs
7+
# `scripts/dependabot-alerts.mjs`, which files one issue per vulnerable
8+
# package per lockfile (npm's root `package-lock.json`, and each Python
9+
# server's `uv.lock`), and the fix is written by hand against `v2/main`:
10+
#
11+
# alert -> this sweep -> issue (labeled, milestoned) -> issue-triage boards it -> maintainer PR -> v2/main
12+
#
13+
# A schedule, not an event handler: there is no `dependabot_alert` workflow
14+
# trigger, only a webhook.
15+
#
16+
# ⚠️ GitHub computes alerts from the DEFAULT branch (`main`), and we ship from
17+
# `v2/main`. So each alert is re-checked against `v2/main`'s own lockfile
18+
# (hence the `ref: v2/main` checkout) and skipped if it is already fixed
19+
# there. The converse is a blind spot: a vulnerable dependency introduced on
20+
# `v2/main` and not yet merged to `main` produces no alert at all.
21+
#
22+
# ⚠️ A scheduled workflow runs only from `main`, so this does nothing until a
23+
# milestone merge carries it there.
24+
#
25+
# `vulnerability-alerts: read` is the one non-default permission, and
26+
# `GITHUB_TOKEN` can hold it. Two things are out of that token's reach, and
27+
# the sweep degrades rather than fails on both:
28+
#
29+
# * Reading back `automated-security-fixes` needs `administration: read`,
30+
# which `permissions:` has no key for. Under this token the script reports
31+
# that guard as UNVERIFIED; an explicit `enabled: true` still fails it.
32+
# * Writing the card on the org project board needs `organization projects:
33+
# write`. The issue arrives labeled and milestoned and `issue-triage`
34+
# boards it in `Todo`. Boarding from here waits on a GitHub App (#5061);
35+
# the Inspector's version reads a `PROJECT_TOKEN` that was never created,
36+
# so its board code never ran (inspector#2547), which is why none is
37+
# shipped here.
38+
name: Dependabot Alert Sweep
39+
40+
on:
41+
schedule:
42+
- cron: "17 6 * * *" # 06:17 UTC daily; alerts are not minute-sensitive
43+
workflow_dispatch:
44+
45+
# The marker lookup is a read before a write, so two overlapping runs could
46+
# both file. The queued run waits and re-reads what the first one wrote.
47+
concurrency:
48+
group: dependabot-alert-sweep
49+
cancel-in-progress: false
50+
51+
permissions:
52+
contents: read
53+
issues: write
54+
vulnerability-alerts: read
55+
56+
jobs:
57+
alert-sweep:
58+
timeout-minutes: 15
59+
if: github.repository_owner == 'modelcontextprotocol'
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Checkout v2/main
63+
uses: actions/checkout@v6
64+
with:
65+
ref: v2/main
66+
67+
- name: Setup Node.js
68+
uses: actions/setup-node@v7
69+
with:
70+
node-version: 22
71+
cache: npm
72+
73+
# The script reads every lockfile as text; its one dependency is
74+
# `semver`. No lifecycle scripts: nothing here builds.
75+
- name: Install dependencies
76+
run: npm ci --ignore-scripts
77+
78+
- name: Run the Dependabot alert sweep
79+
run: node scripts/dependabot-alerts.mjs
80+
env:
81+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
GITHUB_REPOSITORY: ${{ github.repository }}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Monthly dependency sweep (#4874), replacing Dependabot's version-update PRs.
2+
# Ported from the MCP Inspector's workflow of the same name (inspector#2229).
3+
#
4+
# `.github/dependabot.yml` is deleted: it opened weekly Actions PRs with no
5+
# issue and no board card. This runs `scripts/dependency-refresh.mjs` against
6+
# `v2/main` once a month, and it files or updates ONE tracking issue listing
7+
# every outdated npm package (root and workspaces), every Python server whose
8+
# `uv.lock` would move, and every workflow `uses:` ref behind its action's
9+
# highest release. No PR is opened; a maintainer picks what to bump. The
10+
# script's header holds the reasoning.
11+
#
12+
# ⚠️ A scheduled workflow runs only from the DEFAULT branch (`main`), while we
13+
# ship from `v2/main`. So this does nothing until a milestone merge carries it
14+
# to `main`, and it checks `v2/main` out explicitly rather than reading the
15+
# branch it was launched from.
16+
#
17+
# `GITHUB_TOKEN` is enough: it reads milestones and public release feeds and
18+
# writes one issue (`issues: write`). It cannot write the org project board
19+
# (`organization projects: write` is not a permission a workflow token can
20+
# hold), so the issue arrives labeled and milestoned and `issue-triage`
21+
# boards it. Boarding from here waits on a GitHub App credential (#5061).
22+
name: Dependency Refresh
23+
24+
on:
25+
schedule:
26+
- cron: "23 6 1 * *" # 06:23 UTC on the 1st of every month
27+
workflow_dispatch:
28+
29+
# The marker lookup is a read before a write, so two overlapping runs (a
30+
# dispatch on top of the schedule) could both file. The second waits instead.
31+
concurrency:
32+
group: dependency-refresh
33+
cancel-in-progress: false
34+
35+
permissions:
36+
contents: read
37+
issues: write
38+
39+
jobs:
40+
dependency-sweep:
41+
timeout-minutes: 20
42+
if: github.repository_owner == 'modelcontextprotocol'
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Checkout v2/main
46+
uses: actions/checkout@v6
47+
with:
48+
ref: v2/main
49+
50+
- name: Setup Node.js
51+
uses: actions/setup-node@v7
52+
with:
53+
node-version: 22
54+
cache: npm
55+
56+
# Each Python server's `.python-version` is fetched by uv as needed.
57+
- name: Install uv
58+
uses: astral-sh/setup-uv@v7
59+
60+
# `npm outdated` reads the installed tree, so the workspaces install too.
61+
# No lifecycle scripts: nothing here builds.
62+
- name: Install dependencies
63+
run: npm ci --ignore-scripts
64+
65+
- name: Run the dependency sweep
66+
run: node scripts/dependency-refresh.mjs
67+
env:
68+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
GITHUB_REPOSITORY: ${{ github.repository }}

0 commit comments

Comments
 (0)