fix(diagrams): keep diagram sources LF so the receipt check passes on Windows - #167
Merged
Merged
Conversation
… Windows The Windows CI job failed "the repository's diagrams match their receipts" after #166 merged: with core.autocrlf, Git checked docs/diagrams/src/*.json out with CRLF line endings, so each source's sha256 differed from the receipt in docs/diagrams/diagrams.json and all thirteen diagrams read as changed. The receipts hash exact bytes, so the sources must be byte-stable across platforms: .gitattributes now pins docs/diagrams/** and the docs-site SVG copies to LF. A new test asks git which eol applies to those paths. Reproduced with a core.autocrlf=true clone (check fails before, passes after). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GVVG2VDETWsDxMu6MBWPz2
CodeWithJuber
marked this pull request as ready for review
September 26, 2026 23:10
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.
What & why
Test (Windows / Git Bash) failed on #166's head after the merge, because the job was still running when #166 merged. So
masteris red on Windows.The failing test is
the repository's diagrams match their receipts and are embedded where the manifest says. On the Windows runner,core.autocrlfchecksdocs/diagrams/src/*.jsonout with CRLF line endings. Each receipt indocs/diagrams/diagrams.jsonrecords the sha256 of the source's exact bytes, so all thirteen diagrams read as "changed since its last verified render". A Windows contributor runningnode scripts/diagrams.mjs checkwould see the same failure.Fix:
.gitattributespinsdocs/diagrams/**andmintlify/images/diagrams/*.svgto LF on every platform. Content-addressed files have to be byte-stable, the same way the repo already pins*.sh.eolapplies to a source, the manifest, an SVG and a docs-site copy.### Fixedentry under[Unreleased], and the docs-site changelog page is re-rendered.Reproduced and verified with a
core.autocrlf=trueclone:061f361)b1263e9)git check-attr eolon a sourceunspecifiedlfcore-loop.workflow.jsonnode scripts/diagrams.mjs checkok: 13 diagrams match their receiptstest/diagrams.test.jsChecklist
npm testpasses: 1,701 tests, 1,697 pass, 0 fail, 4 platform-gated skips (Node 22)npm run checkpasses (Biome lint + format)feat:/fix:/docs:…)CHANGELOG.mdupdated under## [Unreleased]forge substrate,forge impact, router/gate, or MCP substrate tools (n/a)Risk & rollback
.gitattributesrule for files that are already LF in the repository, plus one test. Nothing changes on Linux or macOS checkouts.git add --renormalize .or a fresh checkout.Extra checks (tick if applicable)
npm run typecheckpasses🤖 Generated with Claude Code
https://claude.ai/code/session_01GVVG2VDETWsDxMu6MBWPz2
Generated by Claude Code