Pin byte identity on checkout with .gitattributes - #12
Merged
Conversation
Most checks here compare a working-tree file against a digest recorded from the committed bytes: the data-sync baselines, the release manifests, the ledger event hashes, and the header baseline in verify-atlas-runtime.js. On a default Windows clone (core.autocrlf=true) Git rewrites line endings on checkout, so those bytes no longer match. verify-atlas-runtime.js then fails with "global header baseline missing" before it reaches any real defect. That reads as a repository defect and is not one. Unsetting text on every path disables end-of-line conversion in both directions, so a checkout reproduces the committed bytes on every platform. No stored blob is rewritten, so every digest already published against this history stays valid. text=auto eol=lf was deliberately not used: it normalizes on check-in, which can rewrite a stored blob and invalidate a published digest. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Problem
Most checks in this repository compare a working-tree file against a digest recorded from the committed bytes: the data-sync baselines, the release manifests, the ledger event hashes, and the header baseline in
verify-atlas-runtime.js.On a default Windows clone (
core.autocrlf=true) Git rewrites line endings on checkout, so those bytes stop matching.verify-atlas-runtime.jsthen fails withglobal header baseline missingbefore it reaches any real defect. That reads as a repository defect and is not one.Reproduced on this branch's base, and on the same checkout method with the fix applied:
_headersopensverify-atlas-runtime.jsrun-all.jsorigin/main,core.autocrlf=true/ * \r \ncore.autocrlf=true/ * \nFix
* -textdisables end-of-line conversion in both directions. A checkout reproduces the committed bytes on every platform, and a commit stores what the working tree holds.Why not
text=auto eol=lfThat normalizes on check-in, which can rewrite a stored blob and invalidate a digest already published against this history. Byte identity is the floor here, so the conversion is switched off rather than redirected. The rationale is recorded in the file itself.
Verification
origin/main:.gitattributesis added. No stored blob is rewritten.atlas-data-sync.contract.v2.json,atlas-runtime-contract.v1.json,000002-public-explanation-production-observed.json,research/stp-v1.2/release-manifest.json.core.autocrlf=truecheckout of this branch, all 222 tracked files byte-match their committed blobs. Zero mismatches.run-all.jssuite passes: 34 numbered holds across 12 suites, plus 4 named surface checks.🤖 Generated with Claude Code