Repository navigation
Conversation
A default Git-for-Windows checkout (core.autocrlf=true) materializes every text file with CRLF, which breaks the tests that treat fixtures as bytes: tests/helpers/documented-skill-candidate.ts can no longer match the LF-anchored code fences of the documented harness, and the Luna example digest tests compare CRLF bytes against the committed LF digests. text=auto leaves the binary documentation assets untouched, and the index is already all-LF, so renormalizing reports no changes on POSIX.
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
The test suite hard-depends on LF bytes, but the repo has no
.gitattributes, so a default Windows checkout (core.autocrlf=true) rewrites the working tree to CRLF and breaks four assertions out of the box:tests/composition/target-skill-loader.spec.ts—tests/helpers/documented-skill-candidate.tsparsesskills/refine/references/dsh-target-harness.mdwith\n-anchored regexes, so it fails withmissing documented hook: ### `pre_action`:and returns no candidates;tests/unit/dsh-codex-luna-example.spec.ts— the two fixture digest assertions compare byte-exact artifacts and see 3155 bytes / a different sha256 instead of the expected 3109.The index is already all-LF (
git ls-files --eol), so Linux and macOS contributors never see this — the suite's byte-exactness currently depends on each contributor's local git config rather than on the repo.Change
Add a four-line
.gitattributesenforcing* text=auto eol=lf, with a comment explaining why.text=autoleaves the fourteen tracked binary assets indocs/(png/gif/zip/mp4) untouched — they are auto-detected as binary and stay byte-identical. Targeted rules (skills/examples/docs/tests only) would leavesrc/andscripts/CRLF on Windows and let the same class of failure recur, so the blanket rule is used.Validation
Run on Windows 11 with a default
autocrlf=truecheckout:dev(red): the composition target-skill-loader spec and the two digest assertions fail as described above..gitattributesand the working tree re-materialized (green): the same four assertions pass.git add --renormalize .on the full repo adds nothing but.gitattributesitself;git ls-files --eolshows 851i/lf, 14 binary, 2 n/a — the index is unchanged, so Linux/macOS CI sees zero difference.npm run typecheck: pass.Existing Windows checkouts need a one-time working-tree refresh to benefit (re-clone, or
git rm --cached -r . && git reset --hard); until thengit statusmay show phantom modifications from stale stat data.