Blog
- 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. artificial-intelligence · debugging · 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 - 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. browser-extension · manifest-v3 · 4 min
Duplicate script ID - 09 Why captured subtitles don't line up: X-TIMESTAMP-MAP, stitched timelines, and four other causes Six reasons a correctly parsed subtitle track still lands in the wrong place in a browser video player, each with the symptom that identifies it: absolute MPEG-TS baselines, content versus presentation time, presentation time offsets, lazy fetching, per-URL clobbering, and arrival order. captions · video-streaming · 6 min
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:93900000 - 08 How far synthesized speech overruns subtitle timing: 150 measured cues A measured distribution of the compression synthesized speech needs to fit real caption timing, why the budget is the next cue's onset rather than the cue's own window, and audio of three overlap policies. artificial-intelligence · text-to-speech · 7 min
- 07 Kokoro's 24 English voices, measured: pitch, brightness, and pace Measured fundamental frequency, spectral centroid and speaking rate for every English voice in Kokoro-82M, a circulating description that does not match the audio, and where the model's speed parameter stops delivering. artificial-intelligence · text-to-speech · 5 min
- 06 Kokoro-82M in the browser on an M1 Max: WebGPU, the WASM fallback, and what each costs Measured real-time factor, cold load time, and footprint for on-device TTS in Chrome, including a WASM fallback that runs slower than real time, a quantized model that is slower than full precision, and audio samples from every engine evaluated. artificial-intelligence · text-to-speech · 11 min
- 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. emdash · cms · 2 min
{ "_type": "youtube", "_key": "abc123", "id": "https://youtube.com/watch?v=..." } - 04 [EmDash] A Vitest Regression Guard for publicHoistPattern and ssr.optimizeDeps.include on Cloudflare Workers A Vitest test that verifies every package in ssr.optimizeDeps.include is both hoisted to node_modules/ and resolvable — so a missing publicHoistPattern entry surfaces as a named, actionable test failure instead of exports is not defined deep inside a workerd stack trace. vite · astro · 2 min
// src/lib/ssr-deps.test.ts import { existsSync } from "node:fs"; import { createRequire } from "node:module"; import { join } from "node:path"; import { describe, expect, it } from "vitest"; - 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. vite · astro · 2 min
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.
vite · astro · 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… - 01 Getting Started With Wagtail CMS Wagtail is a powerful, flexible, open-source content management system for the Django web framework. However, it might not be the off-the-shelf solution you're looking for. wagtail · 2 min