Fix Line Endings Report
Fix Line Endings Report
Section titled “Fix Line Endings Report”Date: 2026-04-22
Summary
Section titled “Summary”- Added
.gitattributeswith repository-wideLFnormalization and explicitCRLFexceptions for Windows scripts. - Patched
scripts/generate_frontend_api_types.pyso--checkcompares raw bytes and normal writes always usenewline="\n". git add --renormalize .did not stage mass text churn on thisHEAD: the tracked blob forapp/frontend/src/lib/generated/api-contract.tswas alreadyLF; only the local Windows working tree copy wasCRLF.- Rewriting
app/frontend/src/lib/generated/api-contract.tswith the generator converted the working tree file back toLFwithout a content diff.
Staged Diff Stat Before Commit
Section titled “Staged Diff Stat Before Commit” .gitattributes | 23 ++++ docs/plans/2026-04-22-fix-line-endings-report.md | 50 +++++++ .../codex-tasks/2026-04-22-cx-fix-line-endings.md | 144 +++++++++++++++++++++ scripts/generate_frontend_api_types.py | 5 +- 4 files changed, 220 insertions(+), 2 deletions(-)file Output
Section titled “file Output”Before:
D:\AB_TEST\app\frontend\src\lib\generated\api-contract.ts: ASCII text, with CRLF line terminatorsAfter:
D:\AB_TEST\app\frontend\src\lib\generated\api-contract.ts: ASCII textVerify
Section titled “Verify”python scripts/generate_frontend_api_types.py --check:- before the rewrite, after the byte-compare patch: exit
1,api-contract.ts is out of date - after
python scripts/generate_frontend_api_types.py: exit0,api-contract.ts is up to date
- before the rewrite, after the byte-compare patch: exit
scripts/verify_all.cmd --with-e2e: exit0
CI Reference
Section titled “CI Reference”- Failing GitHub Actions run kept for history:
https://github.com/brownjuly2003-code/ab-test-research-designer/actions/runs/24785461941
- After push to
main, the next CI run should stay green on both Ubuntu and Windows because checkout normalization is now explicit and the generator no longer depends on platform newline defaults.