Repository navigation
Replace literal NUL bytes in sources with escapes; add NUL guard (refs #347) - #351
Merged
Merged
Conversation
…nst them (refs #347) Git treated src/site.ts, src/policies/security.ts, src/scaffold.ts and packages/ui/test/theme.test.ts as binary. Also escapes the adjacent literal U+001F/U+007F in the same character classes. Adds a NUL scan to check.ts. Co-Authored-By: Claude Sonnet 5 <[email protected]>
jimhoyd
force-pushed
the
fix/nul-bytes-347
branch
from
September 21, 2026 00:10
e684fa0 to
4752743
Compare
jimhoyd
added a commit
that referenced
this pull request
Sep 21, 2026
… in the checks (#363) The candidate container mounts the source under another owner, so git refuses it as dubious ownership. #351 and #284 added git calls that had never run there; the 0.4.3 candidate failed on the first. Co-authored-by: Claude Sonnet 5 <[email protected]>
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.
Refs #347 (does not close it).
Fixes 4 tracked files that Git classified as binary because of literal U+0000: src/site.ts (4 occurrences), src/policies/security.ts, src/scaffold.ts, packages/ui/test/theme.test.ts. Each NUL is now the escape
\x00, and the adjacent literal U+001F/U+007F in the same character classes are escaped too. The adversarial tests keep their intent.Equivalence: every changed regex was compiled old vs new and compared over all 63488 non-surrogate UTF-16 code units, identical. The changed test string is identical via eval.
Guard: scripts/nul-scan.ts, called from scripts/check.ts (so
npm run checkandverifycover it). It only inspects text extensions, so binary assets are untouched. Test: test/nul-scan.test.ts.The diff for these four files shows as Bin in this PR because the old side is binary; later diffs are text.
npm run verifypasses locally. No docs changed.🤖 Generated with Claude Code