molecule-core/.gitattributes
Hongming Wang 9d7bb58374 chore(gitattributes): pin LF on snapshot golden files
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) <noreply@anthropic.com>
2026-04-28 21:01:44 -07:00

24 lines
1.1 KiB
Plaintext

# Shell scripts must stay LF so they execute inside Linux containers
# when cloned on Windows with core.autocrlf=true.
*.sh text eol=lf
workspace/entrypoint.sh text eol=lf
# Python hook files are invoked by .sh hooks with path substitution;
# CRLF in either the .sh OR the .py file breaks the hook dispatch.
# See #507 — SessionStart hook failed silently,
# agents returned "(no response generated)" on every A2A call.
*.py text eol=lf
# Dockerfiles and compose files are parsed by tools that tolerate CRLF,
# 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