Skip to content

fix(plugins): restore space separators corrupted to NUL bytes in PluginHost#198

Open
rotecodefraktion wants to merge 1 commit into
ipapakonstantinou:devfrom
rotecodefraktion:fix/plugins-strip-nul-bytes
Open

fix(plugins): restore space separators corrupted to NUL bytes in PluginHost#198
rotecodefraktion wants to merge 1 commit into
ipapakonstantinou:devfrom
rotecodefraktion:fix/plugins-strip-nul-bytes

Conversation

@rotecodefraktion

Copy link
Copy Markdown

What changed

Two byte positions in src/plugins/PluginHost.ts held a NUL (0x00)
where an ASCII space was intended:

  • the coalescing-buffer key template — `${event} ${target}` (code, ~line 520)
  • its matching doc comment (~line 201)

Both NULs are replaced with the intended space. That is the only
change — verified: dev's file with NUL→space applied is byte-identical
to this branch's file.

Why

The stray NUL bytes make git classify the whole file as binary, so
any PR touching PluginHost.ts renders as "Binary file not shown" and
becomes unreviewable. (This PR itself shows as a binary diff for exactly
that reason — the old side is the binary one.) Removing them restores
normal text diffs and fixes the buffer key separator to the intended space.

How it was tested

  • npm run lint
  • npm run typecheck (clean)
  • npm testplugins/permissions, pluginHost: 23 pass
  • npm run build (verified on sibling branch off same dev base)
  • Sync change? n/a
  • UI change? n/a

Notes

No behavioral change: the coalescing key separator is now a space instead
of a NUL. A follow-up PR (fix(plugins): seed permission revocations before worker boot) builds on this so its PluginHost.ts diff is
reviewable as text.

…inHost

Two byte positions in PluginHost.ts held a NUL (0x00) where a space was
intended — the coalescing-buffer key template `${event} ${target}` and its
matching doc comment. The stray NULs made git treat the whole file as
binary, so any diff touching it renders as "Binary file" and is
unreviewable. Replace both with the intended ASCII space; no behavioral
change (the key separator is now a space instead of NUL).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rotecodefraktion

Copy link
Copy Markdown
Author

Merge-order note: please merge this PR (#198) before #199.

#198 strips two stray NUL bytes that make PluginHost.ts render as a binary diff. #199 (seed permission revocations before worker boot) is stacked on top — once #198 lands in dev I'll rebase #199 so its PluginHost.ts diff becomes a clean ~6-line text change instead of binary.

(Heads-up: CI shows action_required — GitHub holds Actions on fork PRs until you click "Approve and run workflows". Verified locally on Node 22.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant