Blog
Posts tagged #debugging
of 11 - 11 NUL bytes in generated code: source files that compile, lint, and run — but are invisible to grep, VS Code search, and code review A raw NUL byte inside a string literal leaves a TypeScript file valid to tsc, node, ESLint and Prettier, and invisible to ripgrep, VS Code search, and git diff — measured on each. The key-format bug that hid behind it, how a JSON tool call writes the byte, and the two fixes that need no vigilance. Aug 22, 2026 · 10 min
SELECT country, region, hex(region) FROM wa_geo_daily WHERE region LIKE '%exas%';
-- US | Texas | 5465786173
SELECT country, region, hex(region) FROM wa_events WHERE region LIKE '%exas%';
-- US | Texas | 5465786173 SELECT country, region, hex(region) FROM wa_geo_daily WHERE region LIKE '%exas%';
-- US | Texas | 5465786173
SELECT country, region, hex(region) FROM wa_events WHERE region LIKE '%exas%';
-- US | Texas | 5465786173 - 10 Manifest V3 notes: service worker races, dropped registrations, and other quiet failures Six Manifest V3 behaviors that produce no error where anyone is looking: a startup reconcile racing itself into Duplicate script ID, content script registrations dropped on reload, an offscreen document that resolves before it can receive messages, an invalidated context, a test harness that loads nothing, and a runtime that blocks its host thread. Aug 19, 2026 · 4 min
Duplicate script ID Duplicate script ID - 05 [Emdash] How an Unchecked Empty Submit and a Falsy-ID Guard in convertPTBlock Created a Permanent Autosave-Erasure Loop for YouTube Embeds An unchecked form submission in EmDash's PluginBlockModal inserts YouTube blocks with empty IDs, which a falsy check in convertPTBlock converts to placeholder text on reload — and autosave permanently overwrites the original data two seconds later. The patch removes the falsy guard from the serializer and adds a form validation check to the modal. May 25, 2026 · 2 min
{ "_type": "youtube", "_key": "abc123", "id": "https://youtube.com/watch?v=..." } { "_type": "youtube", "_key": "abc123", "id": "https://youtube.com/watch?v=..." } - 03 [EmDash] Why @atproto/api Caused exports is not defined in workerd and How pnpm Hoisting + ssr.optimizeDeps.include Fixes It @atproto/api is CJS and lives only in pnpm's content-addressable store, so Vite's SSR optimizer can't find or convert it — meaning raw CJS reaches Cloudflare workerd, which has no exports global, and crashes. The fix requires both hoisting the package via publicHoistPattern and listing it in ssr.optimizeDeps.include. May 25, 2026 · 2 min
Error: exports is not defined
at runInRunnerObject (workers/runner-worker/index.js:107:3) Error: exports is not defined
at runInRunnerObject (workers/runner-worker/index.js:107:3) - 02 [EmDash] Note `ssr.optimizeDeps.include` Fixes Vite 7's SSR Dep Optimizer Race Condition and Stale Chunk Crashes on Cloudflare Workers Vite 7 separates SSR and client dep optimization, and packages discovered lazily at request time trigger re-optimization rounds that invalidate shared chunks mid-request. The fix is `ssr.optimizeDeps.include` to pre-bundle all CMS sub-paths at startup before any request arrives.
May 25, 2026 · 1 min
[vite] ✨ new dependencies optimized: emdash/middleware, emdash/middleware/redirect,
emdash/middleware/setup, emdash/middleware/auth, emdash/middleware/request-context
[vite] ✨ optimized dependencies changed. reloa… [vite] ✨ new dependencies optimized: emdash/middleware, emdash/middleware/redirect,
emdash/middleware/setup, emdash/middleware/auth, emdash/middleware/request-context
[vite] ✨ optimized dependencies changed. reloa…