Commit graph hyperhive/scripts/check-attribution-trailers.sh
Author SHA1 Message Date
atlas
9e618b3b90 ops: anchor attribution trailer lint to actual git trailer lines
The previous regex matched any line containing both 'co-authored-by'
and 'claude'/'anthropic' anywhere on the line, which flagged prose
*about* the trailer, not just the trailer itself. This caught the
commit that introduced the lint (subject: "ops: add CI lint for
Co-Authored-By/Claude/Anthropic trailers") as a false positive.

Anchor the match to `^[[:space:]]*co-authored-by:` so it only fires
on an actual trailer line (Key: value at line start), not a mention
in a commit subject or body. Add a --self-test mode with fixtures
covering three genuine-trailer spellings, an ordinary message, and
the PR's own subject line as the prose-mention regression case.

Refs #4432
2026-09-16 00:07:02 +02:00
atlas
f45cecf08c ops: address argus review findings on PR #4433
Add attribution-trailer lint row to the ci.md checks table (modeled
on the vale-errors row: not yet a required check) so the doc doesn't
assert stale completeness once attribution-trailers merges. Delete
the dead CI_COMMIT_REF_NAME elif in check-attribution-trailers.sh —
byte-identical to the else arm, never exercised, and its comment
overclaimed GitLab/Forgejo support nothing here can test.

Refs #4432
2026-09-16 00:07:02 +02:00
atlas
5bd68f9b8a ops: reduce comment density in PR #4433
Cut commentary from 104 to 24 lines across the new lint script, CI
config, and pre-push hook. Kept only: policy reference, why pattern is
loose, why scope is PR commits not history, and non-obvious CI behavior
notes. No logic lines changed.

Refs #4432
2026-09-16 00:07:02 +02:00
atlas
bf8e309b19 ops: add CI lint for Co-Authored-By/Claude/Anthropic trailers
Three builder runs tonight carried a Co-Authored-By: Claude trailer
despite bold instructions forbidding it. A rule in a prompt is not a
control — this gate is. Flags commits in a PR's range carrying
co-authored-by + (claude OR anthropic OR noreply@anthropic.com),
case-insensitive, covering all observed spellings.

Wired into CI (new attribution-trailer job) and pre-push hook. Mirrors
existing lint scripts in structure and exit conventions. Pattern tested
against all three variants plus a normal commit.
2026-09-16 00:07:02 +02:00