main is red on the agent-record job, at the step "Protocol prose matches the checkers that enforce it". The failing command is scripts/check-commit-trailers.py --range "$before..$head".
It is not flaky, and it is not an authoring mistake. The trailer gate fails on how commits LAND, not on how they are written.
Root cause
check-commit-trailers.py reads trailers through git interpret-trailers --parse, which by design treats only the final paragraph of a message as the trailer block. Every way GitHub composes a merge commit breaks that assumption:
$ git show -s --format=%B dbd0d51c | git interpret-trailers --parse
Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
The protocol trailers are present in that message. Git cannot see them, because GitHub appended Co-authored-by: as a separate trailing paragraph, which displaced the real block. The checker therefore counts zero and reports "must appear exactly once".
Three distinct artifacts, all confirmed by inspection:
| Commit |
What git parses |
Cause |
b8293c88 |
every trailer twice |
squash of a multi-commit PR concatenated both trailer blocks |
dbd0d51c, 87308dea, f64f2b71 |
zero |
GitHub appended Co-authored-by: in a new paragraph |
b580452d |
zero |
"Merge pull request #386" — GitHub-authored message, no trailers at all |
13 of the last 30 commits on main fail this check. They did not red CI at the time only because those runs were cancelled — which is the second half of #274. The cancellation policy hid the defect; it did not cause it.
Why this is a checker change and not just a process rule
The obvious answer is "always land with a hand-written message". That is already the practice recorded in the project's own history, and 13/30 says relying on it has failed. It also forbids the GitHub merge button permanently, and regresses silently the first time anyone uses it.
More importantly, Co-authored-by: is legitimate. AGENTS.md forbids AI tools from adding Co-Authored-By; it does not forbid GitHub from recording a real human co-author. The gate is rejecting a correct commit because of paragraph placement, which is not what it exists to police.
Proposed change, and its limit
Two narrow relaxations, neither of which weakens the actual guarantee:
- Join consecutive trailing trailer-shaped paragraphs before parsing. A prose paragraph still terminates the block, so a message with trailers buried mid-body still fails. This fixes the
Co-authored-by case.
- Collapse identical duplicate trailer lines, while still failing on the same key with conflicting values. This fixes the squash-concatenation case without letting
AI-Assisted: true and AI-Assisted: false coexist — which is the ambiguity the "exactly once" rule actually exists to catch.
What stays red, deliberately: a GitHub-authored "Merge pull request #N" message with no trailers at all (b580452d). That is a genuine violation and must keep failing.
Note this does not retroactively green b8293c88's own run — that commit is on main and main is never rewritten. The next push's range starts after it, so the failure does not recur.
Requires a spec, red-before tests per case, and mutation evidence in tests/scripts/test_check_commit_trailers.py, per AGENTS.md §"Changing the rules or a checker".
mainis red on theagent-recordjob, at the step "Protocol prose matches the checkers that enforce it". The failing command isscripts/check-commit-trailers.py --range "$before..$head".It is not flaky, and it is not an authoring mistake. The trailer gate fails on how commits LAND, not on how they are written.
Root cause
check-commit-trailers.pyreads trailers throughgit interpret-trailers --parse, which by design treats only the final paragraph of a message as the trailer block. Every way GitHub composes a merge commit breaks that assumption:The protocol trailers are present in that message. Git cannot see them, because GitHub appended
Co-authored-by:as a separate trailing paragraph, which displaced the real block. The checker therefore counts zero and reports "must appear exactly once".Three distinct artifacts, all confirmed by inspection:
b8293c88dbd0d51c,87308dea,f64f2b71Co-authored-by:in a new paragraphb580452d13 of the last 30 commits on
mainfail this check. They did not red CI at the time only because those runs were cancelled — which is the second half of #274. The cancellation policy hid the defect; it did not cause it.Why this is a checker change and not just a process rule
The obvious answer is "always land with a hand-written message". That is already the practice recorded in the project's own history, and 13/30 says relying on it has failed. It also forbids the GitHub merge button permanently, and regresses silently the first time anyone uses it.
More importantly,
Co-authored-by:is legitimate.AGENTS.mdforbids AI tools from addingCo-Authored-By; it does not forbid GitHub from recording a real human co-author. The gate is rejecting a correct commit because of paragraph placement, which is not what it exists to police.Proposed change, and its limit
Two narrow relaxations, neither of which weakens the actual guarantee:
Co-authored-bycase.AI-Assisted: trueandAI-Assisted: falsecoexist — which is the ambiguity the "exactly once" rule actually exists to catch.What stays red, deliberately: a GitHub-authored "Merge pull request #N" message with no trailers at all (
b580452d). That is a genuine violation and must keep failing.Note this does not retroactively green
b8293c88's own run — that commit is onmainandmainis never rewritten. The next push's range starts after it, so the failure does not recur.Requires a spec, red-before tests per case, and mutation evidence in
tests/scripts/test_check_commit_trailers.py, perAGENTS.md§"Changing the rules or a checker".