The formatter that never checked its own scripts folder
This site’s Cloudflare deploy gate runs three checks before anything ships: a type check, a format check, then the build itself. I assumed that meant every file in the repo that matters to a build was covered. It wasn’t.
While wrapping up an unrelated issue, I ran npx prettier --write against scripts/generate-og-images.mjs by hand, just to tidy up a file I’d edited. Prettier rewrote the whole thing, not just my new lines. That’s the tell that a file has been drifting unformatted for a while - if it were already in the format-check rotation, there’d be nothing left to rewrite.
What the glob actually covered
I went and read the prettier command in package.json. Both format and format:check glob src/**/*.{js,ts,jsx,tsx,astro,css} plus a short list of named root config files. scripts/ isn’t in either pattern. It never has been, since the script itself was added a few weeks back.
Every deploy since then ran the format-check step, reported success, and never once looked at the one directory holding a script that runs before the build even starts - the same script that generates every OG card on the site.
The fix was one line added to each glob: "scripts/**/*.mjs". Small change, but it closes a real gap. A deploy gate that silently skips part of the repo isn’t gating that part. It just looks like it is until someone notices the file has gone stale.
Lesson
I’ve hit the opposite version of this before: a check that runs but fails silently. This one was quieter and, I think, easier to miss - a check that runs, passes, and never touches the file in question at all. Green checkmarks don’t tell you what they didn’t look at.
Related reading
Closing the loop on the Open Source section, and the 404 that couldn't run server code
Localizing an error page with no server involved at all, a path check that would have broken on /estimates, and infrastructure I shipped knowing it does nothing yet.
An issue whose scope had already shipped, and a 404 that wasn't really about Portuguese
A type system that had quietly done most of the work months earlier, and four failed fixes proving the remaining item was a routing decision wearing a translation costume.
The CSP error that wasn't mine to fix
A launch-day checklist, a Content Security Policy violation naming the exact script I'd just edited, and a comment in the repo that would have saved me the whole detour.