Repository navigation
buildcheck tests: write fixtures with newline="" so the suite passes on a CRLF checkout (4-repo sync) - #491
Merged
Conversation
…on a CRLF checkout
On a Windows checkout with core.autocrlf, one test of the shared
buildcheck suite has failed since the suite exists:
test_sharedfiles.RepoEntryTest.test_the_repository_name_is_replaced_by_a_placeholder
AssertionError: b'...{repo}/issues\r\n' != b'...{repo}/issues\n'
The checker is not at fault: sharedfiles.content() reads bytes and
write_manifest() writes with newline="\n", both byte-exact on purpose,
because a CRLF difference between repositories is exactly what the
checksum must find. It is the fixture writers in the tests that omit
newline=, so Python translates \n to \r\n on Windows while the
assertions compare LF bytes. Every text-mode writer in the tests now
passes newline="" (the three in test_sharedfiles.py, and the one in
test_nativedeps.py in java-llama.cpp); normalising inside content()
would hide the real difference instead.
test_sharedfiles.py is a shared file, so the same change lands in
java-llama.cpp, BitcoinAddressFinder, srcmorph and streambuffer, each
with its manifest rewritten by check-shared-files.py --write. Until all
four are merged the shared-files job warns about the siblings' default
branches, as documented; it does not fail.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AytmJF9faEiQEVt6eetQS2
bernardladenthin
had a problem deploying
to
maven-central
October 9, 2026 10:48 — with
GitHub Actions
Failure
bernardladenthin
had a problem deploying
to
maven-central
October 9, 2026 10:48 — with
GitHub Actions
Failure
This was referenced Oct 9, 2026
|
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
core.autocrlfsince the suite exists:test_sharedfiles.RepoEntryTest.test_the_repository_name_is_replaced_by_a_placeholdercomparesb'...{repo}/issues\r\n'againstb'...\n'. Linux (CI) is green, so this is developer experience, not release safety -- but a permanently red suite behind a documented command (python3 -m unittest discover -s .github/buildcheck/tests -t .githubinCLAUDE.md) teaches people to ignore failures, the opposite of what every other guard here is for.sharedfiles.content()reads with"rb"andwrite_manifest()writes withnewline="\n", both byte-exact on purpose: a CRLF difference between repositories is exactly what the checksum must find, and normalising line endings incontent()would hide it. The fixture writers in the tests omitnewline=, so Python translates\nto\r\non Windows while the assertions compare LF bytes. Every text-mode writer in the tests now passesnewline="": the three intest_sharedfiles.py(lines 40, 117, 160) and, in this repository only, the one intest_nativedeps.py(line 210). They are the only four text-mode writers in the suite (checked with a grep overtests/*.py); every other fixture is written"wb".test_sharedfiles.pyis line 22 of.github/shared-files.sha256, so the change goes to all four repositories with the manifest rewritten bycheck-shared-files.py --writein each -- which is how this was found: a change in one repository alone failstest_this_repository_matches_its_manifestand reds theshared-filesjob, i.e. the gate worked. Sibling PRs on the same branch name: bernardladenthin/BitcoinAddressFinder#381, bernardladenthin/srcmorph#218, bernardladenthin/streambuffer#174. Until all four are merged, theshared-filesjob of each warns that a sibling's default branch lists the file with a different hash; that is the documented behaviour of a sync landing in four steps, not a failure.Test plan
python3 -m unittest discover -s .github/buildcheck/tests -t .githubgreen in all four repositories (here 103, the CRLF-sensitive test included; it is the Linux half -- the Windows half is the reporter's checkout, where the suite went 102/103 before).python3 .github/check-shared-files.pyreports nothing in each repository against the local siblings, and the four copies oftest_sharedfiles.pyare byte-identical (sha256 fe36042f…).shared-filesjob may warn about the siblings until they land).Related issues / PRs
Sibling PRs with the same change: bernardladenthin/BitcoinAddressFinder#381, bernardladenthin/srcmorph#218, bernardladenthin/streambuffer#174.
Checklist
CONTRIBUTING.mdandCODE_OF_CONDUCT.md🤖 Generated with Claude Code
https://claude.ai/code/session_01AytmJF9faEiQEVt6eetQS2