From 9d7bb58374ee2f3b543637ca6df691a455557d4f Mon Sep 17 00:00:00 2001 From: Hongming Wang Date: Tue, 28 Apr 2026 21:01:44 -0700 Subject: [PATCH] chore(gitattributes): pin LF on snapshot golden files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Self-review follow-up on #2258 (registry snapshot tests, just merged). The byte-exact snapshot comparisons in test_platform_tools.py would fail mysteriously on a Windows contributor's machine with core.autocrlf=true: checkout would convert LF → CRLF, the test would fail locally with no useful diagnostic, and the regen instructions in the test-file header would produce LF files that disagree with the working copy. Pin workspace/tests/snapshots/*.txt to text eol=lf so this can't happen. All three current snapshots are already LF; the attribute ensures it stays that way. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitattributes | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitattributes b/.gitattributes index 52f9f1f5..b22c1e66 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13,3 +13,11 @@ workspace/entrypoint.sh text eol=lf # but keep LF for consistency across platforms. Dockerfile text eol=lf *.dockerfile text eol=lf + +# Snapshot golden files — workspace/tests/snapshots/*.txt is consumed by +# byte-exact comparisons in test_platform_tools.py. A Windows contributor +# with auto-CRLF=true would otherwise convert \n → \r\n on checkout, the +# snapshot tests would fail mysteriously locally / pass in CI (or vice +# versa), and the regen instructions in the test-file header would +# produce LF files that disagree with the working-copy CRLF versions. +workspace/tests/snapshots/*.txt text eol=lf