Skip to content

DCO sign-off

Every commit in a pull request carries a Signed-off-by: line. The required check DCO Sign-off fails the pull request when one does not, or when the commit or pull request body carries model or coding tool attribution. ADR-2462 records why.

What the sign-off means

By signing off you state, under the Developer Certificate of Origin 1.1, that you wrote the change or have the right to submit it under the licence of the files it touches. VMAFx has no contributor licence agreement; the sign-off is the whole of the paperwork. See CONTRIBUTING.md and ADR-1250 for the licences.

Sign off

git commit -s -m "fix(scope): subject"          # a new commit
git commit --amend -s --no-edit                 # the last commit
git rebase --signoff origin/master              # every commit of the branch
git push --force-with-lease

-s appends Signed-off-by: Your Name <you@example.org> from user.name and user.email. The address must be the one in the commit's author or committer field; a sign-off for somebody else does not count. The line must sit in the last block of the message, as git writes it.

Check before you push

The dco-sign-off pre-push hook in .pre-commit-config.yaml runs the check on every push, so a push that would turn the DCO job red stops locally:

python3 scripts/ci/check-dco.py --merge-base origin/master

--merge-base REF checks the commits the push adds on top of REF: those reachable from the pushed commit but not from REF, so commits a branch took in by merging master are not checked again. The pushed commit is --head, else the PRE_COMMIT_TO_REF that pre-commit sets during a push, else HEAD; an exported HEAD_SHA is ignored in this mode. It cannot be combined with --base or --landed, and an unknown REF or pushed commit exits 2. Refresh origin/master with git fetch when it is stale; a stale ref only widens the range.

The hook matters because the commit-msg hook sees only commits made in your checkout. A commit that arrives another way, such as a review bot's suggestion applied on the pull request branch and then pulled, has never been checked; pull request #3426 reached CI that way without a sign-off. Fix such a branch with git rebase --signoff origin/master, which re-commits every commit under your name with your sign-off, then push with --force-with-lease.

Check a range or the pull request body by hand:

python3 scripts/ci/check-dco.py --base origin/master --head HEAD
python3 scripts/ci/check-dco.py --base origin/master --head HEAD --pr-body-file path/to/pr-body.md

For the pull request body, pass --pr-body-file PATH (alias --pr-body PATH). The file takes precedence over the local PR_BODY environment fallback; an empty or absent body has no lines to scan. In CI, --pr-body-from-event reads pull_request.body from the JSON file at GITHUB_EVENT_PATH. A null body is empty; an unreadable file, malformed JSON, or non-string body is an error. The file and event flags are mutually exclusive. Body edits rerun the check. The DCO workflow job passes the body through files to both the attribution check and the squash-message check, avoiding process environment size limits.

Exit status: 0 all applicable checks pass, 1 an attribution or sign-off check fails (including an input bound), 2 the range or body file could not be read. Commit failures list the commit subject; body failures give the line number.

Attribution rules

Both pull request and landed modes reject model or coding tool names in commit author and committer names or email addresses. Matching is case-insensitive and uses the tokens in BANNED_COAUTHOR_TOKENS in scripts/ci/check-dco.py. The shared identity scan excludes the [bot] trailer token. In PR and pre-push modes, a separate bot-author check refuses an author name ending in [bot] or author email ending in [bot]@users.noreply.github.com, after NFKC normalization, format-character removal, and lowercasing, unless the commit belongs to the branch opener. In PR mode, the opener must have type Bot and the commit email must end in +<opener-login>@users.noreply.github.com (except for the conditional dco-bot-opener and dco-python-lock-refresh exemptions documented under Exemptions); membership in the sign-off exemption list is not required. In pre-push mode, the oldest outgoing non-merge author counts as opener only if human or its normalized email matches a BOT_LOGINS noreply suffix; other bots establish no opener and every bot-authored commit in that range is refused. Ownership compares normalized author names and emails. This preserves listed bots' branches after signed human updates. A human sign-off, release exemption, or grandfathered PR cannot bypass bot-author refusal: apart from the dco-landed-release-bot-coauthor and dco-python-lock-refresh cases documented below, a squash landing would add a bot Co-authored-by: trailer that the landed gate refuses. Re-author the refused commit with git commit --amend --reset-author --no-edit on that commit, retaining the required sign-off, or drop it; for an earlier commit, stop on it during an interactive rebase before amending. Landed mode keeps its existing rules. The same message-line rules reject Co-authored-by: lines with a banned token, generated or created attribution footers, and the robot emoji. Pull request mode applies those line rules to the body as well.

Before the line rules run, text is normalized with Unicode NFKC. The shared prefix scanner removes leading whitespace, format characters (category Cf), and Markdown quote, heading, comment, and list prefixes, including + and ordered-list markers. After prefix stripping, every remaining Cf character anywhere in the checked line is removed before both co-author and footer checks; examples include U+FEFF, U+200B through U+200D, and U+2060. Ordered markers use one to nine ASCII digits followed by . or ), then whitespace, a format character, or end of line. A ten-digit marker remains intact and its line is treated as prose. These rules apply to both commit-message and PR-body lines. Ordinary human co-authors remain permitted. Identity matching applies NFKC, removes every Cf character anywhere in the identity, then uses case-insensitive substring matching with the same tokens.

The checker refuses inputs above a named bound with exit 1 and the bound name; it never silently truncates. Limits apply to UTF-8 bytes and Unicode splitlines() line counts, with exact-limit input accepted:

Input Byte limit Line limit
Commit message MAX_COMMIT_MESSAGE_BYTES = 281,876 MAX_COMMIT_MESSAGE_LINES = 5,836
PR body MAX_PR_BODY_BYTES = 235,864 MAX_PR_BODY_LINES = 2,176

Commit limits use four times the measured maxima of the 6,290-commit master snapshot. PR limits use four times the measured maxima of the 300 PR bodies numbered 2906-3395; see the research digest for the corpus fingerprints and the reproduction command. File reads consume at most the byte limit plus one byte. Event JSON has an additional MAX_PR_EVENT_BYTES envelope: six times the body-byte limit plus 1 MiB for metadata and JSON escapes. Commit output is captured one commit at a time with MAX_COMMIT_LOG_BYTES (twice the message-byte limit plus 65,536 bytes for metadata), and per-commit changed-path queries use MAX_COMMIT_PATHS_BYTES (65,536 bytes); exceeding either capture bound also refuses the input. Git fields and records are NUL-delimited so embedded legacy separators cannot move identity text into another field.

For a commit refused only because of an attribution trailer or footer, edit the message with git commit --amend, which keeps the original author. If the author identity is refused, use --author="Name <email>" on the refused commit to correct that author, or --reset-author to assign authorship to the current committer. If only the committer identity is refused, correct user.name and user.email, then use git commit --amend --no-edit for the last commit: amend retains the author and message while recording the current committer identity. The git-commit(1) manual documents these options and the identity configuration; explicit author/committer settings or environment variables override user.name and user.email. For a series, git rebase --force-rebase <base> forces every rebased commit to be replayed, including unchanged commits, as documented in the git-rebase(1) manual. Plain rebase drops merge commits and makes the series linear. For a series containing merges, use git rebase --force-rebase --rebase-merges <base> to recreate them. Conflict resolutions and manual amendments inside those merge commits are not replayed and must be redone manually. For a refused pull request body, edit its text. None of the sign-off exemptions below waive attribution checks: bot, release, and pre-cutoff pull requests are all checked for commit and pull request body attribution.

Exemptions

Three narrow exemptions waive only the Signed-off-by: requirement; commit and pull request body attribution checks run on every pull request, release and pre-cutoff ones included:

  • A pull request created before the rollout cutoff, the UTC timestamp in scripts/ci/dco-cutoff.txt (the date is also in CONTRIBUTING.md). It is grandfathered for sign-off: its commits need no Signed-off-by: trailer, however often it is updated, while commit and body attribution are still checked. A pull request created at or after the cutoff requires sign-offs, and one for which GitHub gives no creation time requires them too.
  • A commit written by a listed bot, in a pull request that GitHub reports as opened by that bot. The list is BOT_LOGINS in scripts/ci/check-dco.py: renovate[bot], dependabot[bot] and github-actions[bot]. A commit a person pushes onto a bot branch, or a commit that only names a bot as its author inside a person's pull request, is not exempt.
  • The machine-generated release pull request, detected by scripts/ci/release-pr-exempt.sh.

Renovate also signs off its own commits (:gitSignOff in renovate.json), so the exemption is a second line, not the only one.

One conditional PR-mode exemption lifts only the bot-opener refusal (commit_attribution_reason, PR-body attribution, and the Signed-off-by: trailer check in judge still run, and --landed and pre-push --merge-base modes keep their existing rules unchanged) when all four conditions hold (ADR-3555):

  • Evaluation runs in pull request mode (neither --landed nor --merge-base).
  • GitHub reports the pull request opener as --author renovate[bot] with --author-type Bot.
  • The commit's author name and email, normalized with normalized_identity (NFKC normalization, Cf format-character removal, and lowercasing), equal vmafx-release-bot[bot] and 340976456+vmafx-release-bot[bot]@users.noreply.github.com (RELEASE_BOT_NAME and RELEASE_BOT_EMAIL in scripts/ci/check-dco.py).
  • The commit's changed path list from git diff-tree -z --root --no-commit-id --name-only -r --no-renames (refused rather than truncated past MAX_COMMIT_PATHS_BYTES = 65,536 bytes) is non-empty and every path is a live declared exception of rule dco-bot-opener in .config/lint-exceptions.d/dco-bot-opener.toml, checked with scripts/ci/lint_exceptions.py still_read("dco-bot-opener", paths, root) returning an empty list (--exceptions-root overrides root in fixture tests). The sole declared entry is dev/scripts/intel-neo-lock.json (Category D, entered 2026-11-16, expires 2027-03-16).

One conditional landed-mode (--landed) exemption strips a single exact release-bot Co-authored-by: trailer line (RELEASE_BOT_COAUTHOR in scripts/ci/check-dco.py) before the landed attribution scan when the commit author is renovate[bot] with lowercased email 29139614+renovate[bot]@users.noreply.github.com (RENOVATE_BOT_EMAIL), that stripped line appears once (case-sensitive after .strip()), and the commit's non-empty changed path list includes at least one live exception in .config/lint-exceptions.d/dco-landed-release-bot-coauthor.toml (dev/scripts/intel-neo-lock.json, Category D, entered 2026-11-17, expires 2027-03-17, ADR-3555):

Co-authored-by: vmafx-release-bot[bot] <340976456+vmafx-release-bot[bot]@users.noreply.github.com>

The Python lock refresh class (ADR-3560) permits a signed release-bot commit with the exact refresh subject when every changed path has a live entry among the 30 exact paths in .config/lint-exceptions.d/dco-python-lock-refresh.toml. Each entry is Category D, entered 2026-11-18 and expires 2027-03-18. An absent or expired entry refuses the path. A new lock output needs a new operator grant before an entry is added.

In landed mode, the same class strips the single release-bot co-author line only when the Renovate squash changes at least one live grant path. The remaining paths must be manifest inputs or requirements/locks/manifest.json itself. For the manifest path, the gate reads the parent and squash copies from local Git objects. Both must be valid manifests with unique JSON keys, and the only changed value must be the top-level uv_version, set to an exact release. Missing or unreadable Git objects, malformed manifests, and any other manifest change keep the co-author line.

Using GH_TOKEN and GITHUB_REPOSITORY, the gate requires a single associated pull request whose merge SHA matches the squash and whose merged_at parses as an ISO 8601 timestamp. The complete commit list must have fewer than 250 entries and include a release-bot commit, identified by normalized Git author name and email. Each release-bot commit must have a nonempty file list shorter than one API page (100 entries), with valid filenames and statuses added, removed, modified, renamed, copied, changed, or unchanged. Renames require a previous filename, and the gate checks any supplied previous filename. Every reported path must have a live grant among the 30 paths. Missing configuration, missing, ambiguous, malformed or incomplete forge evidence, and TierError, OSError, ValueError, RecursionError, KeyError, TypeError, or OverflowError from the forge read keep the line for the attribution check to refuse. The gate prints a dco: notice for verification errors.

Every other line of the message and the Signed-off-by: check in judge_landed still run unchanged; a second release-bot line or any other bot or tool trailer is still refused.

Verbatim upstream ports and merge commits are not special-cased: merge commits are not judged, and a port is committed by a person who signs it off like any other commit.

Agents and the merge train

Automation that commits for the project signs off like a person: commit with -s, and keep every Signed-off-by: trailer when a pull request is squashed.

The pull request check reads the pull request's commits, not master.

On master

On master, every squash commit is validated by the workflow .github/workflows/landed-commit-messages.yml using check-dco.py --landed (ADR-3389). This is not a required pull request check: it runs on push to master as an alarm after landing. A failure indicates an invalid squash body landed on master; published history is not rewritten.

The --landed mode disables all exemptions (bot logins, --release-pr, and the cutoff date), except for the conditional release-bot co-author exemptions below. It refuses any non-merge commit where:

  • A Co-authored-by: line names a bot or automated tool (such as Renovate or coding assistants).
  • A message line contains machine-generated attribution (generated by, created with, or the robot emoji).
  • The commit author or committer name/email contains a model or coding tool token.
  • The commit lacks a Signed-off-by: trailer matching either the commit author or the landing identity (--landing-identity). The committer address is not accepted because GitHub is the committer on every squash merge.

The landed exemption (ADR-3555) strips one exact RELEASE_BOT_COAUTHOR line before the attribution scan when the commit author is renovate[bot] (<29139614+renovate[bot]@users.noreply.github.com>), that exact line appears once, and the commit changes a live exception path in .config/lint-exceptions.d/dco-landed-release-bot-coauthor.toml (dev/scripts/intel-neo-lock.json, Category D, entered 2026-11-17, expires 2027-03-17):

Co-authored-by: vmafx-release-bot[bot] <340976456+vmafx-release-bot[bot]@users.noreply.github.com>

The Python lock refresh class (ADR-3560) also strips that exact line under the same author and single-line conditions when the squash paths and merged pull request satisfy the Python lock refresh conditions above.

The check examines non-merge commits in the range BASE_SHA..HEAD_SHA. If the base SHA is all zeros (initial push) or not an ancestor-reachable commit, it evaluates the head commit alone.

Run the check locally with:

python3 scripts/ci/check-dco.py --landed --landing-identity "Name <email>" --base <sha> --head <sha>