Commit 4cba5a5
fix(repo): escape raw NUL bytes that hid six source files from grep (#3127)
Six source files embedded a literal U+0000 byte as a composite-key
separator instead of the `\u0000` escape. grep/ripgrep scan the whole
buffer, classify such a file as binary, and silently return no matches:
`grep -n saveMetaItem protocol.ts` reported nothing despite 16 hits,
making a core protocol file invisible to code search and to any
grep-based lint tooling.
This survived review because git only scans the first 8000 bytes for a
NUL, and protocol.ts carried its NUL at offset 147230 - so the file kept
diffing as ordinary text while grep had already given up on it.
Replace each raw NUL with `\u0000`, matching the existing convention in
rest-server.ts. That form is chosen over `\0`, which becomes a legacy
octal escape error if it is ever followed by a digit.
The resulting strings are byte-identical, so behaviour is unchanged:
getMetaItemCached still emits the same per-locale ETags as before
(en-US 68f978ed / zh-CN 50289f3b / no-locale 75dad1ef), still returns
304 on a same-locale match, and still declines 304 across locales
(issue #1319). No changeset: pure fix, no user-facing change.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 774f8a2 commit 4cba5a5
6 files changed
Lines changed: 1 addition & 1 deletion
File tree
- packages
- cli/src/utils
- lint/src
- metadata-protocol/src
- plugins/plugin-security/src
- services
- service-analytics/src/__tests__
- service-storage/src
Binary file not shown.
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3051 | 3051 | | |
3052 | 3052 | | |
3053 | 3053 | | |
3054 | | - | |
| 3054 | + | |
3055 | 3055 | | |
3056 | 3056 | | |
3057 | 3057 | | |
| |||
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 commit comments