From e201662f6ffddb5bcd1eabe5792ef81ec9ecafe6 Mon Sep 17 00:00:00 2001 From: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Date: Fri, 17 Jul 2026 20:07:40 +0800 Subject: [PATCH] fix(repo): escape raw NUL bytes that hid six source files from grep 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: Claude Opus 4.8 --- packages/cli/src/utils/lint-view-refs.ts | Bin 9137 -> 9142 bytes packages/lint/src/build-access-matrix.ts | Bin 5162 -> 5167 bytes packages/metadata-protocol/src/protocol.ts | 2 +- .../src/suggested-audience-bindings.ts | Bin 17820 -> 17830 bytes .../objectql-strategy-boolean-filter.test.ts | Bin 5468 -> 5473 bytes .../src/attachment-access-hooks.ts | Bin 14884 -> 14889 bytes 6 files changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/utils/lint-view-refs.ts b/packages/cli/src/utils/lint-view-refs.ts index 9d48795b1f03e3b5de1b6cb2f4ac3d8d6c6918fb..ce70fcbe006092f3a52e5ff47fbb1cadf268d78c 100644 GIT binary patch delta 19 Zcmdn!zRi8ZEg80$QUf5^d|T!k8vs$k2e|+M delta 14 WcmdnyzR`WdEg43J%@1U*u>k-vYz8O* diff --git a/packages/lint/src/build-access-matrix.ts b/packages/lint/src/build-access-matrix.ts index 8c88d61ac477bda9d7841c956f1558f6f0b156c9..f41e3cdf5c3862bb307e29e35d0bd29c85a79e2a 100644 GIT binary patch delta 19 ZcmZ3bv0h_CIUie0sR0mduHf6m3IIfi24(;N delta 14 VcmZ3lu}Wh@IUgg#=32f@tNIjv6xZ=AW*3;PA&0E%uTI@@Hd|qJZlU90EG>c delta 27 jcmZ41%{ZrIj9tM@_;?xqq#N5&kBtg( diff --git a/packages/services/service-analytics/src/__tests__/objectql-strategy-boolean-filter.test.ts b/packages/services/service-analytics/src/__tests__/objectql-strategy-boolean-filter.test.ts index 0bd478a1c7c34532dc5f66c57025219996d7553f..2ab90e0700a974bdf1b8a75a59adb94932e5d76e 100644 GIT binary patch delta 19 Zcmcbk^-ya=Ef-r%sR0mduH(AL1prK42Lk{A delta 14 VcmaE;bw_JMEf*uh=4P&YTmUVn1#$oY diff --git a/packages/services/service-storage/src/attachment-access-hooks.ts b/packages/services/service-storage/src/attachment-access-hooks.ts index 226ead9d07e50984f7345f242c9260346dd0f418..ba3dc489de815b213360360412fc128f44a6fe17 100644 GIT binary patch delta 19 ZcmZ2dva)2uEm^jhQUf5^d|TF21^`s^2ZR6s delta 14 VcmZ2kvZQ3gEm=l}%@1TfWdJi-1@iy^