Skip to content

Pin byte identity on checkout with .gitattributes - #12

Merged
JakeTOpenSource merged 1 commit into
mainfrom
fix/gitattributes-byte-identity
Aug 14, 2026
Merged

Pin byte identity on checkout with .gitattributes#12
JakeTOpenSource merged 1 commit into
mainfrom
fix/gitattributes-byte-identity

Conversation

@JakeTOpenSource

Copy link
Copy Markdown
Owner

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.js then fails with global header baseline missing before 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:

Checkout _headers opens verify-atlas-runtime.js run-all.js
origin/main, core.autocrlf=true / * \r \n FAIL FAIL
this branch, core.autocrlf=true / * \n PASS PASS

Fix

* -text disables 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=lf

That 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

  • Only one path differs from origin/main: .gitattributes is added. No stored blob is rewritten.
  • All four externally pinned digests recompute unchanged: atlas-data-sync.contract.v2.json, atlas-runtime-contract.v1.json, 000002-public-explanation-production-observed.json, research/stp-v1.2/release-manifest.json.
  • On a core.autocrlf=true checkout of this branch, all 222 tracked files byte-match their committed blobs. Zero mismatches.
  • Full run-all.js suite passes: 34 numbered holds across 12 suites, plus 4 named surface checks.

🤖 Generated with Claude Code

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>
@JakeTOpenSource
JakeTOpenSource merged commit ecbaa75 into main Aug 14, 2026
3 checks passed
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