I relaxed a rule in my test suite, then wrote a short article to exercise the path it opened up. It shipped a page that quietly ignored three quarters of the files the build had made for it.
The rule was about image budget. Every article visual on this site is composed in code as a 1600 × 900 landscape master, and until last week each one also required a 900 × 1200 portrait master. That pairing was enforced by a test: a landscape file without its portrait counterpart failed the suite.
The requirement was too strong. A portrait recomposition earns its place when a landscape diagram stops being readable on a phone. A diagram with four short labels survives the width reduction intact, and building a second composition for it is production work with no reader on the other end. So I removed the pairing rule and replaced it with two narrower ones: the hero always ships both orientations, and a portrait master with no landscape parent is an error.
Nothing in the archive used the new case
That change created a permitted case that no article on this site had ever produced. Every existing diagram had a portrait counterpart, because until then the tests had demanded one. The newly legal path, a body diagram shipping landscape only, had never once been built.
I could have waited for the next real article to use it. That would have been the cheap choice, and it would have meant discovering whatever was wrong while trying to publish something I actually cared about.
Instead I wrote a throwaway. A real slug, a real Markdown body, a real generator with three compositions, a real entry in the image registry. Three paragraphs of honest prose about what the run was for, because a page of placeholder text would not have exercised the same code. Then I built it.
The mechanical part was as cheap as intended. Generating the masters and running the full static build took under a second combined. The parameterized image test picked the new article up from the registry with no test edit at all, moving the suite from 143 tests to 144. That much of the claim held.
The build made four files the page never mentioned
The landscape-only diagram was broken.
The build had done its job. It produced a full-size WebP and three width variants at 480, 960, and 1440 pixels. All four files sat on disk. The published markup referenced none of them, and served the 114 KB PNG instead of the 31 KB WebP sitting beside it.

Nothing was broken in the way tests usually mean. The image appeared. The file existed. The link resolved. The page was merely heavier than it needed to be, for a reason no page inspection would surface without checking the markup against the directory listing.
The cause was a guard I had written on purpose. Art-directed images need hand-written <picture> markup, and the responsive image pass must not rewrite those and clobber their media queries. So the enhancement step skips any <picture> block it finds. I had wrapped the throwaway's single diagram in <picture> out of habit, with no media query on it, and the build correctly identified it as markup to leave alone.
Why every test passed
This is the part worth separating from a point I made in the article about generating these images. That one was about aesthetic judgment: a test can confirm a file is 1600 pixels wide, but not that the composition is balanced, so a human has to look.
This failure is different, and less forgiving. Nothing here required taste. The correct behaviour was fully mechanical and completely checkable. Every image test I had was simply pointed at the wrong question.
does the file exist? asked, and answered yes
is the file referenced? never asked
The broken-image test walks the generated HTML and confirms every src and srcset points at a real file. It passes trivially on a page that mentions one asset and ignores four. The WebP tests verify that conversion works, which it did. Coverage was measured against the assets the page named, and the page named the wrong ones.
What I changed
The fix was markup, not build code. A single composition does not need a <picture> element at all. Written as a plain <img>, it flows through the normal path and the build wraps it into a complete <picture> with WebP sources, width candidates, a sizes attribute, lazy loading, and intrinsic dimensions.
The guard is a new test that reads the Markdown sources directly and fails on any <picture> without a media query, with an error message naming the file and saying what to write instead. I confirmed it failed on the bad markup before confirming it passed on the good.
Then I deleted the throwaway article, its generator, its images, and its registry entry.
What a smoke article does not do
It does not find defects you did not think to exercise. This one worked because I knew exactly which path had become reachable and deliberately took it. A throwaway written without that intent would have used the same well-trodden markup as every other article and passed cleanly.
The throwaway found one defect, in one small repository, once. The general claim I would defend is narrower than "write throwaway content": when you relax a constraint, the code path you just made legal has zero coverage by definition, and the cheapest thing to write next is the content that uses it. The tests you already have will not tell you, because they were written against the constraint you just removed.
The full-size WebP is the file the page skips
The throwaway's 114 KB PNG and 31 KB WebP are gone with that article. I am not quoting those two sizes as if the files were still here. What is here is this post's diagram of the failure, editorial-test-gap-image-pipeline-served.png.
On 16 November 2026 I ran generateStaticPages into a temp directory at f46b909, and I read the committed dist/posts/test-gap-image-pipeline/index.html from the same commit. Both wrap that diagram in one picture element with no media query. The WebP source is only the width candidates, and the fallback is the PNG:
srcset="/images/posts/test-gap-image-pipeline/editorial-test-gap-image-pipeline-served-480w.webp 480w, /images/posts/test-gap-image-pipeline/editorial-test-gap-image-pipeline-served-960w.webp 960w, /images/posts/test-gap-image-pipeline/editorial-test-gap-image-pipeline-served-1440w.webp 1440w"
sizes="100vw"
src="/images/posts/test-gap-image-pipeline/editorial-test-gap-image-pipeline-served.png"
The PNG fallback is 140,039 bytes, and the page names it. The width WebPs are 9,986, 26,768, and 45,244 bytes, and the page names those. The full-size sibling, editorial-test-gap-image-pipeline-served.webp, is 49,856 bytes, and neither HTML names it. addResponsiveSrcset replaces the full WebP source with the 480, 960, and 1440 candidates. It does not leave the full file in the srcset. A browser is offered WebP. The file written at the master's own width is the leftover.
That is a narrower miss than the one this article opened on. Then the markup named zero of the four WebPs and the download was the PNG. Now a download can be WebP, and the unused file is a committed sibling, 49,856 bytes against the 45,244-byte 1440w candidate. For a viewport that takes 1440w, the waste is in the repository, not on the wire. I am not calling that the same defect.
I then set every /images/posts/ URL in the committed dist/ HTML against the files on disk. The match covered src, srcset, srcSet, and absolute og:image URLs. I left out claude-watermark-without-detector, which has a directory and no ALL_POSTS entry. The published directories hold 125 PNG masters, 125 full WebPs, 271 width WebPs, and 22 og.jpg files. Every og.jpg is named.
| What the HTML does with the full WebP | Files | Bytes |
|---|---|---|
| Names it | 104 | 3,266,762 |
| Omits it, and names a width variant of the same master | 16 | 648,936 |
| Omits it, and the PNG is unnamed too | 5 | 631,696 |
The 16 are this diagram's case, repeated. Their width variants are in the HTML. Their full WebP is not. This article's 49,856-byte file is one of the 16. The other fifteen are body figures that shipped as a plain image, which is the markup the fix asks for. The path works, and it drops the full-size WebP. The image test does not ask about that file, because it walks URLs the HTML already named.
The five unnamed PNGs are a separate pile. The HTML names neither the PNG, the full WebP, nor their 15 width variants (564,664 bytes). Two of the five are thumbcraft sources that bodyImageOverrides rewrites to newer drawings: thumbcraft-ed79e6a57c.png and thumbcraft-f243d196f5.png. I did not trace the other three, fitbyte-fa779b8e14, recordy-8c055ed082, and thumbcraft-8463dae2c6. Unused files are not the srcset replacement.
The picture guard is doing the job it was added for. content/posts/*.md has 31 <picture> blocks, and all 31 carry a media query. Fifteen other body images sit outside any <picture>. None of them is a <picture> with no media query, which was the accident that skipped WebP entirely. The leftover is inside the pass that runs.
