Learn from the line-ending gate failure
Status: Ready
Article ID: 113
Truth label: Historical
Audience: Contributor and QA engineer
Reader outcome: Understand how repository hygiene can make every QA run fail.
Related articles: 085, 088, 110
Target week: 45
Last verified: 2026-09-13
Technical reviewer: Codex incident evidence audit
Editorial reviewer: Codex editorial audit
Problem
Mixed LF and CRLF content made a normal editor rewrite whole files. The stage gate interpreted carriage returns as trailing whitespace, creating large phantom diffs and blocking otherwise bounded changes.
Misleading success signal
The visible feature worked and focused tests passed. A small semantic edit still appeared as hundreds of changed lines, while repeated agents could not satisfy the unchanged hygiene gate.
Evidence
Repository history records mixed line counts, repeated failed pipeline attempts,
an LF-only control file, and git diff --ignore-all-space evidence that isolated
the actual content change.
Correction
The repository normalized affected files and established line-ending policy. Review separated semantic changes from mechanical normalization rather than calling the full diff feature work.
Mechanical prevention
Commit .gitattributes, scan tracked files for mixed endings, and run
git diff --check before and after edits. Make normalization a separate reviewed
change so it cannot hide product modifications.
Current status
The recorded incident is historical. Line-ending checks remain part of delivery because new tools, copied files, or platform defaults can reintroduce churn.
Current limits
Ignoring whitespace can hide a meaningful change and must only diagnose the shape of a diff. A clean hygiene check does not prove behavior or acceptance.
Next lesson
Continue with The five-dollar pipeline lesson.
Derivative map
- Weekly package: WEEK-45
- Long video: VIDEO-W45-LONG
- Shorts: SHORT-W45-PROBLEM, SHORT-W45-MECHANISM, SHORT-W45-WARNING
- Email: EMAIL-W45
- LinkedIn: LI-W45-A, LI-W45-B
- X: X-W45-A, X-W45-B
- Visual: VISUAL-W45
Review record
- Historical repository evidence and current prevention remain distinct.
- Feature success and hygiene failure are both preserved.
- Normalization is separated from semantic product work.
- Whitespace-ignore and clean-check limits remain explicit.
Review completed: 2026-08-27
Re-audited against the running product: 2026-09-13