tests/scripts/design_tokens.test.mjs and its neighbours enumerate sources with git ls-files and then readFileSync each path with no guard. git ls-files reads the index, so a rename that is on disk but not staged leaves a tracked path with no file behind it, and the gate dies:
Error: ENOENT: no such file or directory, open '.../frontend/ui-core/src/screens/ingestScale.test.ts'
at readFileSync (node:fs:439:20)
at design_tokens.test.mjs:42:29
Three tests in that file fail at once, and the failure reads as a design-token violation rather than as a working-tree state. Reading the index deliberately is right - that is what catches a merely staged binary in the size guard - but a path it names may legitimately not be on disk yet.
Direction: skip (or report) a tracked path with no file, rather than throwing an error that names the wrong problem.
tests/scripts/design_tokens.test.mjsand its neighbours enumerate sources withgit ls-filesand thenreadFileSynceach path with no guard.git ls-filesreads the index, so a rename that is on disk but not staged leaves a tracked path with no file behind it, and the gate dies:Three tests in that file fail at once, and the failure reads as a design-token violation rather than as a working-tree state. Reading the index deliberately is right - that is what catches a merely staged binary in the size guard - but a path it names may legitimately not be on disk yet.
Direction: skip (or report) a tracked path with no file, rather than throwing an error that names the wrong problem.