test: fail the build on a Co-Authored-By trailer - #14
Merged
Conversation
The trailer belongs to the tooling some contributors run, not to this repository, and it reached nine commits before anyone noticed. Discipline did not catch it, so a gate does now. - a regression test scans every authored commit and fails on the trailer, naming the offender rather than just going red; - the eight already-published commits are listed by full SHA, so nothing is grandfathered vaguely. That list is a ratchet: a separate assertion fails if it ever grows, because adding a SHA to excuse a new commit is the box-ticking this project refuses to accept from anyone else; - CLAUDE.md states the rule for automated contributors, alongside the other conventions learned the hard way — including verifying commit line lengths in a step of their own, since chaining the check to the commit means committing before reading the check; - CONTRIBUTING.md carries the same rule for humans. Proven red: a throwaway commit carrying the trailer failed the test with its own SHA in the output, then was removed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Co-Authored-Bytrailer belongs to the tooling some contributors run, not to this repository. It reached nine commits before anyone noticed. Discipline did not catch it, so a gate does.What lands
tests/regression/commit-trailer-guard.test.ts— scans every authored commit and fails on the trailer, naming the offending SHA rather than just going red.CLAUDE.md(new) — the rule for automated contributors, with the other conventions learned the hard way: run the full suite rather than the files you think you touched; verify commit line lengths in a step of their own, since chaining the check to the commit means committing before reading the check.CONTRIBUTING.md— the same rule for humans.Why the eight stay
Rewriting
masteranddevelopand breaking three release tags to delete one line is not a trade worth making. The decision is recorded in the test itself, next to the SHAs it covers.Verdict impact
None. No detector, law, threshold or default changes — this is a project-local convention gate.
Evidence
Received: ["b4fae96 test: probe the trailer guard"]), then was removed.Gate
npm run lint— 0 errorsnpx jest— 504 suites / 13866 tests, exit 0node dist/cli.js audit— passed 35, failed 0