Commit 2ec6e37
fix: close two audit-residual gaps — Python YAML byte-compare + LF .gitattributes
Two persistent gaps surfaced by the conformance-framework QA audit
(2026-05-26). Neither blocks current tests, but both are real
contract-violation footguns waiting to surface.
1. Python YAML conformance was comparing parsed JSON trees, not canonical
bytes. The canonical-serializer contract (spec/conformance-tests.md:54-84)
specifies 2-space indent, alphabetically-sorted @-attrs,
declaration-ordered children, and a trailing newline — ALL part of the
cross-port byte-exact contract. A tree compare would silently pass
regressions in any of these. TS does `expect(got).toBe(want)`; C# + Java
do trimmed-string compare. Python now matches: byte-compare with only
trailing-newline normalization.
2. Added a top-level .gitattributes forcing LF line endings on
fixtures/** and *.mustache files. Without this, a Windows clone with
default `core.autocrlf=true` silently converts these to CRLF on
checkout, then byte-equality assertions fail for filesystem reasons
rather than engine reasons. Render-conformance is particularly exposed:
its whole reason-for-being is byte-exact rendered output to defend
prompt-cache hits.
Verification:
- Python YAML conformance: 6/6 still green (assertion shape changed,
fixtures already correct under LF)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent bd0bcb8 commit 2ec6e37
2 files changed
Lines changed: 28 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
131 | 137 | | |
0 commit comments