ci: keep refresh-visual-baselines commit body under commitlint's 100-char limit - #2737
Conversation
…char limit The auto-generated commit body inlined the branch name on the same line as the workflow path, producing lines >100 chars for normal-length branch names (e.g. fix/bot-2703-wheels-middleware-cors-cannot-short-circuit-option ran 121 chars) and failing commitlint's body-max-line-length rule. Split "on branch <BRANCH>." onto its own line so the longest body line now caps at "on branch " + branch + ".", leaving ~89 chars of headroom for the branch name itself. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Peter Amiri <peter@alurium.com>
There was a problem hiding this comment.
Wheels Bot — Reviewer A
TL;DR: This is a targeted one-line CI fix that splits a too-long printf argument into two calls so auto-generated commit bodies stay under @commitlint/config-conventional's body-max-line-length: [2, 'always', 100] rule. The problem is real (documented with reproducible commit SHAs on #2728), the fix is correct and minimal, and the commit conforms to the repo's conventions. Verdict: approve.
Correctness
The fix is correct.
Before, a single printf call produced a body line exceeding 100 chars when BRANCH was long:
printf '%s\n\n' ".github/workflows/refresh-visual-baselines.yml on branch $BRANCH."With a 63-char branch name (e.g. fix/bot-2703-wheels-middleware-cors-cannot-short-circuit-option) this produces a 121-char body line — above the 100-char limit enforced by @commitlint/config-conventional v19. That rule is not overridden in the project's own commitlint.config.js, which only customises subject-empty, type-empty, header-max-length, and subject-case.
After the fix, the same content is split across two printf calls:
printf '%s\n' ".github/workflows/refresh-visual-baselines.yml"
printf '%s\n\n' "on branch $BRANCH."The longest possible body line is now on branch <BRANCH>. -- 10 + len(BRANCH) + 1 chars. All other hard-coded body lines in the commit template are at most 73 chars. Branch names would have to reach about 89 chars before the limit fires again, far beyond any realistic name in this repo.
The existing security invariant -- routing github.ref_name through env: rather than direct shell interpolation -- is preserved unchanged.
Commits
ci: keep refresh-visual-baselines commit body under commitlint's 100-char limit is 79 chars, uses type ci from the allowlist, omits scope (acceptable), is not ALL-CAPS, and the header is well under 100 chars. Conforms to commitlint.config.js.
Wheels Bot — Reviewer B (round 1)A's review checks out. The fix is minimal and correct — two SycophancyNone detected. A cited specific evidence (reproducible commit SHAs, char-count math, reference to the exact commitlint rule) before approving. False positivesNone detected. Every claim A made was verified against the diff. Missed issuesNone detected. This is a pure CI workflow edit with no CFML, no cross-engine concerns, no security surface, and no Verdict alignmentA's approve verdict is consistent with the findings. ConvergenceAligned. The fix is correct, the commit conforms, and there is nothing to request changes on. Joint recommendation: approve and merge. |
Summary
body-max-line-lengthrule on every auto-baseline-refresh.on branch <BRANCH>.onto its own line so the commit body now stays under 100 chars regardless of branch-name length.0e956bacand3123a386each produced a 121-char body line; both required manual amends. Repro is reliable on any branch with a name longer than ~37 chars.Before / after (using branch
fix/bot-2703-wheels-middleware-cors-cannot-short-circuit-option)Before:
.github/workflows/refresh-visual-baselines.yml on branch fix/bot-2703-...→ 121 chars (fails commitlint).After: workflow path on one line +
on branch <BRANCH>.on the next → max 74 chars in the entire body. Branch names can grow to ~89 chars before tripping the limit, far beyond any realistic branch name in this repo.Test plan
commitlint(exit 0).🤖 Generated with Claude Code