Skip to content

Force LF on the mapping TSVs whose hashes tests check - #24

Open
s28ale-maker wants to merge 1 commit into
mainfrom
fix-lf-hashed-inputs
Open

s28ale-maker wants to merge 1 commit into
mainfrom
fix-lf-hashed-inputs

Conversation

@s28ale-maker

Copy link
Copy Markdown
Collaborator

Standalone PR, not part of the stacked series (#15–#23). It can merge independently in any order.

Summary

Adds a .gitattributes that pins two files to LF line endings:

mappings/soulcap_entities.tsv  text eol=lf
mappings/curated_mappings.tsv  text eol=lf

tests/test_benchmark_reserve.py checks the SHA-256 of both files against the values frozen in mappings/benchmark_reserve.json. On Windows with core.autocrlf=true, Git checks them out with CRLF line endings, which changes the bytes, so the test fails locally even though the committed content is correct and CI (Linux, LF) passes.

The committed file content doesn't change. Only how Windows checkouts write the files changes. mappings/ arrives with part 6 of the stack (#20); a rule for a path that doesn't exist yet is harmless.

After merging: refresh your local copies once

Git doesn't rewrite files already checked out, so re-check-out the two files once.

Bash / Git Bash:

rm mappings/soulcap_entities.tsv mappings/curated_mappings.tsv && git checkout -- mappings/

PowerShell:

Remove-Item mappings/soulcap_entities.tsv, mappings/curated_mappings.tsv; git checkout -- mappings/

Test plan

  • Verified on the tip of the stack (pr-09-species-pilot) on Windows with core.autocrlf=true: both files check out LF and tests/test_benchmark_reserve.py passes. Without this file, it fails with a hash mismatch.
  • On this branch (off main): uv run pytest passes with UTF-8 mode (121 passed, 94.5% coverage), and uv run ruff check . passes. Two tests on main fail locally on Windows because of a missing encoding="utf-8", which Add soulcap-lookup, soulcap-tokens, type checking, and CI improvements #15 fixes; they're unrelated to this change.
  • CI passes on this PR

🤖 Generated with Claude Code

tests/test_benchmark_reserve.py compares the SHA-256 of
mappings/soulcap_entities.tsv and mappings/curated_mappings.tsv against the
values frozen in mappings/benchmark_reserve.json. On Windows with
core.autocrlf=true those files check out with CRLF, the bytes change, and the
test fails locally even though CI (LF) passes. Pin them to eol=lf.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
s28ale-maker added a commit that referenced this pull request Oct 10, 2026
pr-01 to pr-09 (#15 to #23), diehl-2026-10-05-nk-species (#25) and
fix-lf-hashed-inputs (#24) are open PRs waiting for approval into main,
mostly stacked. Record the order and that they must not be touched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant