Repository navigation
ci: make DCO a required status check on v2/main (ruleset), after #2619 merges #2621
Description
Problem
No ruleset or branch protection applies to v2/main: gh api repos/modelcontextprotocol/inspector/rules/branches/v2/main returns []. Both "L3 - full protection" rulesets (org and repo) target ~DEFAULT_BRANCH, which is main only.
So once #2619 (#2616) merges, the DCO check will run on every v2 PR, but nothing stops a PR from merging while it's red or missing. A missing check would pass silently, which is how the probot app's outage went unnoticed for seven weeks after #1981 (#2566). #2566 asked for a required check, and #2603 deliberately deferred that part: making it required while the workflow couldn't report would have blocked every PR.
Change
Add a repository ruleset for v2/main, modeled on the existing v1/main - full protection ruleset (19858989):
gh api -X POST repos/modelcontextprotocol/inspector/rulesets --input - <<'JSON'
{
"name": "v2/main - DCO",
"target": "branch",
"enforcement": "active",
"conditions": { "ref_name": { "include": ["refs/heads/v2/main"], "exclude": [] } },
"bypass_actors": [
{ "actor_id": 5, "actor_type": "RepositoryRole", "bypass_mode": "always" }
],
"rules": [
{ "type": "deletion" },
{ "type": "non_fast_forward" },
{ "type": "required_status_checks",
"parameters": {
"strict_required_status_checks_policy": false,
"do_not_enforce_on_create": false,
"required_status_checks": [ { "context": "DCO", "integration_id": 15368 } ] } }
]
}
JSONintegration_id: 15368(GitHub Actions) pins the check to the workflow. Without it, anyone with write access could post a commit status namedDCOand satisfy the rule.v1/main's ruleset pinsbuildthe same way.deletion+non_fast_forward: theDCO (v2/main push)backstop checksbefore..afterand assumesv2/mainis never rewritten. Today nothing prevents a force-push.- Bypass: repository admins (role
5), as onv1/main. Drop this if admins should be held to it too.
Preconditions and side effects
- Apply only after ci: run the DCO check on every v2 PR now, before push, and after merge (#2616) #2619 is merged to
v2/main. Before that, PRs get noDCOcheck at all (the old workflow ispull_request_target, read frommain, which has nodco.yml), so a required check would block every merge. - Open PRs need one new event. A
pull_requestrun starts only on an event, so a PR opened before ci: run the DCO check on every v2 PR now, before push, and after merge (#2616) #2619 merged has noDCOresult until its next push, a close/reopen, or a base edit. Push to (or close/reopen) any open v2 PR that shows the check as "expected". - Direct pushes to
v2/mainwill be refused unless the pusher can bypass, because a required check applies to every commit landing on the branch. The release flow uses PRs, so this shouldn't bite. - If the next milestone merge lands before ci: run the DCO check on every v2 PR now, before push, and after merge (#2616) #2619,
mainreceives the oldpull_request_targetdco.yml, and v2 PRs get twoDCOchecks until the following milestone merge. Both run the same script and agree, so requiring the nameDCOstays satisfiable.
Done when
gh api repos/modelcontextprotocol/inspector/rules/branches/v2/mainlistsdeletion,non_fast_forwardandrequired_status_checks(DCO, integration15368).- A test PR with one unsigned commit shows
DCOfailing and merging blocked. Re-signing the commit unblocks it. AGENTS.md("it gates merges only as a required status check…"),pr-flowstep 3 and thedco.ymlheader no longer describe the requirement as pending.
Out of scope
Requiring build / coverage on v2/main, or a pull_request review rule as on v1/main. Worth deciding, but that's a separate call.
Activity
cliffhall commentedon Oct 7, 2026
Triage: Priority Medium (total 6)
test: unsigned commit to probe the v2/main DCO ruleset (#2621)
Merge pull request #2635 from modelcontextprotocol/v2/chore/2621-dco-…
cliffhall commentedon Oct 7, 2026
Shipped in #2635 (merge commit 36db875). The
v2/main - DCOruleset is live, and an unsigned commit blocking merges was verified on #2636.docs(ci): describe DCO as a required check on v2/main (modelcontextpr…