ci: add gate-line-endings — block new CRLF from entering the repo - #66
Merged
Conversation
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.
Rolls out the org-wide
gate-line-endingsCI gate, added to the FuzeSDLC standard workflow stack in FuzeSDLC#73. Adds one workflow file; changes nothing else.What it does
Blocks new CRLF from entering the repo.
pull_requestpushto defaultSo it needs no cleanup before merging: an existing CRLF backlog stays warning-only, and only newly introduced CRLF fails. Clean up whenever convenient with
git add --renormalize .; the gate keeps it clean afterwards.Why
A CRLF check-in has broken production in this org more than once:
awkanchors on line content; a CRLFvalues-prod.yamlmade every$-anchored match miss, the count guard hit 0, and every release died until someone restored the endings by hand.Unexpected }on balanced braces..sh— breaks at runtime on a\rthat never appears in a diff..gitattributesdoes not close this: it only covers paths someone thought to list, and commits made through the GitHub Contents API (bots, agent runs, web edits) bypass it entirely. The gate inspects the index side ofgit ls-files --eol— the bytes actually stored in git — so it sees both.Verification
The gate's bash was extracted verbatim from the workflow and exercised against a purpose-built repo: a PR adding a CRLF file fails and names it; a PR touching only clean files passes even with legacy CRLF present; push to default warns and exits 0; CRLF
.bat(allowlisted) is not flagged.Opened as part of propagating the standard stack —
governance_synccannot push.github/workflows/**itself (the defaultGITHUB_TOKENlacks the scope), so standard-stack workflows arrive by PR.🤖 Generated with Claude Code