Skip to content

Commit 4d099df

Browse files
committed
fix: refresh chart benchmark baseline digest
1 parent 49ee874 commit 4d099df

4 files changed

Lines changed: 39 additions & 3 deletions

File tree

‎API-FRICTION.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5978,6 +5978,19 @@ Each entry records:
59785978
content drift, malformed metadata, and workspace version-only changes. The
59795979
schema-4 baseline records both commit attribution and the input digest, and
59805980
the full validation graph passes after the squash merge.
5981+
- Windows follow-up evidence: refreshing pull request 155 after merging
5982+
upstream produced a different digest locally from Linux CI for the same
5983+
final tree. The Windows checkout used `core.autocrlf=true`, so raw CRLF bytes
5984+
were treated as source drift even though all 284 measured inputs were the
5985+
same tracked TypeScript files.
5986+
- Windows follow-up decision: normalize CRLF to LF while hashing these
5987+
text-only inputs. Preserve the existing path, byte-length, and content
5988+
boundaries after normalization so semantic changes still stale the
5989+
baseline.
5990+
- Windows follow-up verification: a focused regression hashes equivalent LF
5991+
and CRLF inputs identically. The Windows checkout now reproduces Linux CI's
5992+
`sha256:a9d8ed497ea90501b0fe906bb6d567fe71049a62a40bd5a475e9449afbac019c`
5993+
digest for merge commit `49ee874`.
59815994

59825995
### F-198 — Union-valued axes rejected configured D3 scales
59835996

‎benchmarks/comparison/bundle-baseline.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"sources": {
1212
"tanstack": {
1313
"kind": "workspace",
14-
"revision": "4bbe1c5690789064f2c525226321baa5817af39a",
15-
"inputDigest": "sha256:b07d6531a6ef39c0c4e9295f2b3d5335e67a38f9255517426f757a3efedecaad"
14+
"revision": "49ee87451a506cf573d8857dad9c2abf845b1642",
15+
"inputDigest": "sha256:a9d8ed497ea90501b0fe906bb6d567fe71049a62a40bd5a475e9449afbac019c"
1616
},
1717
"chartjs": {
1818
"kind": "package",

‎scripts/comparison-source-revision.mjs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ export function tanstackComparisonInputDigest(
4141

4242
for (const file of files) {
4343
const path = relative(repositoryRoot, file).split(sep).join('/')
44-
const contents = readFileSync(file)
44+
const contents = Buffer.from(
45+
readFileSync(file, 'utf8').replaceAll('\r\n', '\n'),
46+
)
4547
hash.update(path)
4648
hash.update('\0')
4749
hash.update(String(contents.byteLength))

‎scripts/comparison-source-revision.test.mjs‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,27 @@ describe('TanStack comparison source provenance', () => {
7575
)
7676
})
7777

78+
it('normalizes platform checkout line endings in the input digest', async () => {
79+
const repository = await mkdtemp(
80+
resolve(tmpdir(), 'charts-comparison-line-endings-'),
81+
)
82+
temporaryRepositories.push(repository)
83+
const inputPath = tanstackComparisonInputPaths[1]
84+
const coreInput = resolve(repository, inputPath, 'index.ts')
85+
await mkdir(dirname(coreInput), { recursive: true })
86+
await writeFile(coreInput, 'export const first = 1\nexport const second = 2\n')
87+
88+
const inputDigest = tanstackComparisonInputDigest(repository, [inputPath])
89+
await writeFile(
90+
coreInput,
91+
'export const first = 1\r\nexport const second = 2\r\n',
92+
)
93+
94+
expect(tanstackComparisonInputDigest(repository, [inputPath])).toBe(
95+
inputDigest,
96+
)
97+
})
98+
7899
it('rejects a well-formed digest from different inputs', () => {
79100
const expectedRevision = 'a'.repeat(40)
80101
const recordedRevision = 'b'.repeat(40)

0 commit comments

Comments
 (0)