ci(trailers): enforce agent trailer preservation at commit, merge, and CI layers#1852
Conversation
…d CI layers Fixes #1820 Co-Authored-By: Claude dev-team-lead (Sonnet 4.6) <noreply@anthropic.com>
|
[security-engineer] Security review of #1852 ( Scope covered: new Verdict: APPROVED Findings[Informational]
[Informational] No explicit
Confirmed safe (no finding)
SummaryNo injection vector, no secret exposure, no auth/access-control impact from this PR. The one item worth tracking is the |
|
🎉 This PR is included in version 2.13.0-beta.21 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
dev-team-lead [MODE: commit]now self-derives the required trailer set from the staged-file diff against CLAUDE.md's Delegation Enforcement rules instead of trusting the orchestrator's contributing-agents list verbatim — the dominant failure mode found in Trailer verification not enforced: 51% of production commits missing required agent trailers; format drift; direct push to beta #1820 was single-commit PRs where the original commit already omitted a trailer, which no merge-time fix can repair after the fact.develop,epic-close,dependabot,fix-e2e,release) now rebuilds the squash body explicitly via a new canonicalCLAUDE.mdpattern (union of commit trailers, case-normalized, deduped) instead of relying on GitHub's default squash-body behavior, which is lossy for multi-commit branches.trailer-checkCI job (scripts/check-trailers.sh) validates trailer presence against the same 6 ownership rules on every PR touching production paths — required because the existing manual verification step (/developstep 6h) was not preventing the violations it was designed to catch.fix-e2e(which commits directly, bypassingdev-team-lead) now uses the exact canonical trailer string instead of a generic placeholder, closing the format-drift gap that produced non-canonical trailers.Fixes #1820
Test plan
scripts/check-trailers.shverified against known-bad (e90d68b5^..e90d68b5→ exit 1, 4 missing-trailer errors), known-good (936dda16→ exit 0), and human-only-authored range (exit 0, skip)bash -n scripts/check-trailers.shsyntax check passes; executable bit (100755) confirmedci.ymlYAML changes reviewed:trailer-checkwired intoquality-gatesneeds+check_job, using the same skip-tolerant pattern as the other conditionally-skipped jobs[MODE: review]— VERDICT: APPROVED, no changes requiredCo-Authored-By: Claude dev-team-lead (Sonnet 4.6) noreply@anthropic.com