You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
filter-bar.test.ts has 4 raw NUL bytes, so rg and git treat it as binary #435
tests/unit/filter-bar.test.ts contains 4 raw NUL bytes (committed in c9f6505, #412).
They are the time-range group-key delimiter, written as a literal 0x00 byte inside
string literals rather than as a JavaScript unicode escape for code point zero — which is
what production uses: src/core/time-range.ts:183 builds the group key by joining fromFilter.id and toFilter.id with that escaped code point.
Byte offsets in the committed file: 31689, 35196, 36936, 38846 — e.g. the fixture's key: 'from<NUL>to' and const key = 'group:from<NUL>to'.
Why it matters
The string VALUES are correct, so the tests pass and assert the right thing. But the raw
byte makes tooling treat the whole 39 KB spec as binary: rg refuses to search it
("binary file matches"), git diff can flag it, and editors may mangle it on save. It
cost real time while shipping #425 — a routine rg for buildFilterBar in that file
returned only "binary file matches" instead of the call sites.
Why deferred
Purely cosmetic and unrelated to #425's scope; touching it would have added unrelated
churn to that PR's diff. (#425 preserved the bytes exactly rather than rewriting them
silently.)
Fix
Replace each literal NUL byte with the escape sequence, so the file is plain text while
every string's VALUE stays identical. npm test should be green with no other edit.
Closing as already resolved — no code change was needed, and none was made.
The file this issue names no longer exists. tests/unit/filter-bar.test.ts was renamed to tests/unit/variable-bar.test.ts by the #459 terminology rename, which also replaced the four raw 0x00 bytes with a single escaped GROUP_KEY constant — the same escape production uses when building the time-range group key.
Verified independently against origin/main rather than trusting the rename: scanning every blob in the tree, no file under src/ or tests/ contains a NUL byte. The only files that do are PNGs under docs/assets/img/ and docs/ui-snapshots/, which is expected.
So both halves of the fix this issue asked for are in place — the string values are unchanged and the spec is plain text, searchable by rg and diffable by git.
Found while sweeping the bug+low backlog alongside #455 and #498 (PR #554). Filed here rather than in that PR because nothing in the PR fixes this — it was already fixed elsewhere.
Activity
BorisTyshkevich commentedon Jul 29, 2026
Closing as already resolved — no code change was needed, and none was made.
The file this issue names no longer exists.
tests/unit/filter-bar.test.tswas renamed totests/unit/variable-bar.test.tsby the #459 terminology rename, which also replaced the four raw0x00bytes with a single escapedGROUP_KEYconstant — the same escape production uses when building the time-range group key.Verified independently against
origin/mainrather than trusting the rename: scanning every blob in the tree, no file undersrc/ortests/contains a NUL byte. The only files that do are PNGs underdocs/assets/img/anddocs/ui-snapshots/, which is expected.So both halves of the fix this issue asked for are in place — the string values are unchanged and the spec is plain text, searchable by
rgand diffable bygit.Found while sweeping the
bug+lowbacklog alongside #455 and #498 (PR #554). Filed here rather than in that PR because nothing in the PR fixes this — it was already fixed elsewhere.chore(Altinity#455,Altinity#498,Altinity#435): enforce src/core bound…