Repository navigation
Description
Problem
The DCO check added in #2603 (#2566) does not run on any PR into v2/main, and it won't until the next milestone merge.
dco.yml triggers on pull_request_target, and GitHub reads pull_request_target workflows from the default branch (main). The file is not on main yet. The workflow header documents this ("this file does nothing until a milestone merge carries it from v2/main to main"). The only recorded run is a pull_request event on #2603's own branch, and no PR since has a DCO check (#2603 at merge, #2612, #2613).
So until a milestone merge, unsigned commits can reach v2/main unchecked, and the first we'd hear of them is when the milestone PR into main is opened. That is too late to fix them cheaply.
Change
- PR check on
pull_request. Switch the trigger frompull_request_targettopull_request(stillbranches: [v2/main], same event types), so it runs from the PR's own ref as soon as this merges tov2/main.- Trade-off, accepted deliberately: under
pull_requesta PR could editdco.ymlorscripts/dco-check.mjsto pass itself. PRs here are opened by maintainers only, and the check exists to catch a forgotten signoff, not a forged one (dco-check.mjsalready says the trailer is self-asserted). Keep running the script from the checked-out base and only fetching the PR head, so the job still never executes PR code. - Edits to the workflow now take effect immediately, not one milestone later.
- Trade-off, accepted deliberately: under
- Backstop on
pushtov2/main. Run the same script overbefore..afterfor every push that lands onv2/main. That catches anything that reached the branch without a passing PR check while the workflow and script stayed intact (an admin merge, a direct push, a merge made while the check was red), at merge time rather than at the milestone merge. It does not catch a PR that edited the check itself: a push run reads the workflow and script from the pushed revision too. The control for that case is review. A zerobefore(branch creation) is skipped. - Update the header comment, the
dco-check.mjsheader, andpr-flowstep 3, which all describe thepull_request_target/ milestone-merge rollout.
Out of scope
Making DCO a required status check on v2/main is a ruleset change in repo settings, not something a file can do. Once this lands and the check reports, it can be made required.
Activity
cliffhall commentedon Oct 7, 2026
Triage: Priority Medium (total 6)
npm run dco:checkby hand is only a partial workaround.docs(dco): describe the PR check's scope as every v2 PR, stacked ones…
ci(dco): scope the PR job to v2/** bases rather than excluding main a…
docs(dco): stacked-branch check and repair guidance, and refresh the …
cliffhall commentedon Oct 7, 2026
Follow-up: #2621 makes
DCOa required status check onv2/main(a ruleset), to be applied after #2619 merges.fix(dco): match GitHub's web-flow identity whole, and document the sq…
docs(dco): the push backstop does not cover a PR that edits the check…
fix(dco): local:dco excludes origin/main, so the gate passes on a mil…
Merge pull request #2619 from modelcontextprotocol/v2/chore/2616-dco-…
cliffhall commentedon Oct 7, 2026
Re-milestoned v2.11.0 → v2.10.0: its PR merged to
v2/mainafter the 2.9.0 tag and before the 2.10.0 milestone merge, so it ships in 2.10.0.ci: run the DCO check on every v2 PR now, before push, and after merge (