fix(ci): escape the Bun contract's NUL map-key separators - #17959
Conversation
Follow-up to the post-merge review on elizaOS#17599. The jobId/stepIndex map key used a raw U+0000 as its separator, typed as a literal control byte rather than its six-character escape, so git classified the whole file as binary and stopped producing text diffs for it. Behaviour-identical by construction -- the escape and the raw byte are the same character, so the composed keys are indistinguishable and collide in one Map slot: escaped === raw: true codepoint: 0 one map key: true Verified against develop@648dddc2: contract exits 0 (369 sites), 60/60 in ci-bun-version-contract.test.ts, Biome clean, and the file diffs as text again. Worth recording why this reached develop at all. The separator predates last week's review work -- it is present at 22ebc4ec, the head before that round of fixes -- so every reviewer since has been reading a file git refused to show them. That is precisely the cost of this byte: it disables the two instruments, diff and grep, most likely to catch its neighbours. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011gZy3feiGVKs61PDUzx1Cd
|
Correct fix, and the bug class is worth naming:
Gate is red for the queue-wide reason rather than anything here: the fork workflow runs were unapproved (GitHub reports those as |
|
Thanks for approving and re-triggering — One correction to the record, and it makes your argument stronger rather than weaker. The shipped separator was already
And the reason it read as a space in your comment is precisely the defect. A raw NUL renders as whitespace or vanishes in every surface that displays it — GitHub's comment box included — so the byte misrepresented itself in the very message describing it. That is the same mechanism that made You're right that the write in Separately, your parenthetical is the most useful thing in this thread for us:
We hit that independently a few hours ago and it cost us a false page. Our triage filtered holds on AI provider/model: Anthropic / claude-opus-5 |
Closes the follow-up @lalalune raised in the post-merge verification of #17599.
Contribution provenance
What this PR does
packages/scripts/ci-bun-version-contract.mjsbuilt its jobId/stepIndex map key with a raw U+0000 separator typed as a literal control byte instead of its six-character escape. Git classifies any file containing a NUL as binary, so the whole module stopped producing text diffs.Replaced both with the escape. Behaviour-identical by construction -- the escape and the raw byte are the same character, so the composed keys are indistinguishable and collide in a single Map slot:
Why it matters more than a formatting nit
The byte disables exactly the two instruments most likely to catch its neighbours:
git diffrenders "Binary files differ", and ripgrep skips the file silently. The separator predates the review round on #17599 -- it is present at22ebc4ec, the head before those fixes -- so every reviewer of that PR was handed no content for this file while reviewing changes to it.Testing
node packages/scripts/ci-bun-version-contract.mjs-- PASS, exit 0, 369 sites scanned, canonical 1.3.14bun test packages/scripts/__tests__/ci-bun-version-contract.test.ts-- 60 pass / 0 failgit diff --numstaton the file now reports line counts rather than-, confirming git treats it as text againVerified against
develop@648dddc2in a worktree branched from it, Bun 1.3.14 / Node 24.15.0.Evidence gate
verification transcript (verbatim)
AI provider/model: Anthropic / claude-opus-5
Client / agent tooling: Claude Code
Contribution skill revision: SlopDotCash/slopdotcash@04a50cb:skills/contribute-to-eliza
Attribution status: self-reported
-- [claude-code-ss251]