Thicket.
← Back to Journal

Engineering

We Called a Cache Bug Fixed. Our Detector Saw 2 of 28 Sites

Seven more sites were still broken. The detector had no way to see them, and we read its silence as a pass.

A caching bug made every markdown page on a site return the same body. We fixed it on 13 sites, checked each one, and called the job done. The probe whose hit list told us which sites were affected could only fetch test pages on 2 of our 28 hosts. A later sweep that reached every host found 7 more sites still serving one cached body at most of their markdown URLs. The fix was correct. The claim that it was complete was not, and two things in how we measured it made the mistake easy to miss.

The bug

Every page on our sites has a plain-text .md twin for machine readers, following the convention the llms.txt proposal describes of serving a markdown version of a page at the same URL with .md appended. The route that served it rewrote the request and passed the page path along as a query parameter. HTTP’s caching standard, RFC 9111, describes a cache key built from the request method and the full target URI, query included, and MDN’s guide to HTTP caching covers the same ground. But a cache key is whatever the cache in front of you actually uses, and ours, by our record of the fix, built its key from the path alone and ignored the query. So on any one site, every .md request landed on the same cache entry, and every reader got whichever page had filled that entry first.

Some of what that looked like, from our records. On the ETF site, the markdown for “ETF vs ETN” and for “how to compare ETFs” came back byte-for-byte identical. On the mortgage calculator, four different pages, monthly payment, refinance, rent vs buy and biweekly, all returned the same 866-byte body titled for the monthly-payment page. The crypto site answered 7 of 8 sampled markdown URLs with one body, titled “Dca — StackSats”.

The fix was one structural change: put the page path into the rewritten path itself, where the cache key can see it. That part went fine.

Mistake one: distinct checksums prove nothing

The natural test for a collapse is to fetch several markdown URLs from a site and compare their checksums. If they are all identical, the cache is serving one body. Our first fleet sweep did this and reported three sites as passing.

They were not passing. Each markdown page starts with a small block of frontmatter that includes its own url:. That means a generic placeholder page, served correctly at every address, still differs by one line at every address, and so has a different checksum at every address. A site serving nothing but stubs and a site serving real, distinct content look the same to a checksum comparison.

Identical checksums prove a collapse. Distinct checksums prove nothing at all.

The test only has power in one direction, and we had been reading it in both. The repair was to judge by distinct titles, which a stub does not vary, and then to go one step further.

Mistake two: a collapse comes in groups

Even an exact “are all the bodies identical” test has a hole. A cache does not necessarily serve one body for the whole site. One of our hosts served two different collapsed bodies across its sampled pages, each shared by a group of URLs. Two groups over eight samples produce two checksums, which is not “all identical,” so the test filed a broken cache under a much milder defect.

The discriminator that works came from the same frontmatter line that broke the checksum test. A cached body carries the url: of whichever request filled that cache entry. So for every page fetched, compare the URL it claims to be against the URL you asked for. If they differ, that page is serving another page’s content, and it does not matter how many groups there are. A genuine stub passes this test, because it is keyed correctly and only its title is generic. The check is about where a body came from, not what it says.

Mistake three: the detector could not see the fleet

This is the one that let the other two matter. The 13 sites we fixed first were the ones a probe across the fleet had flagged. We fixed every one on that list, verified each, and recorded the job as complete, treating the probe’s hit list as the whole set of affected sites.

Our record of that day states two numbers side by side: the fix was declared complete at 13 hosts, on a probe that could reach only 2 of our 28. A hit list is a list of failures. It has no row for a host that was never measured, so nothing in it distinguished “checked and fine” from “not checked.” We read it as a verdict about everything.

The sweep that replaced it draws its test pages from each host’s own sitemap rather than from a guessed URL, refuses to give any verdict for a host until it has at least four successful fetches there, and reports a host it could not measure as CANNOT TELL rather than leaving it out. A full sweep of the fleet then found seven more sites still collapsed. Per host, from the record: crypto served one body at 7 of 8 sampled markdown URLs, colors at 7 of 8, the social text tool at 6 of 7, and the mortgage calculator at the four pages named above, with three more sites in the same state. All seven were fixed the same way the first 13 had been, and each was re-checked on its live URLs, by title and by the URL test, before we recorded it.

Why this is easy to get wrong

Each of the three mistakes produces the same output as success. Distinct checksums look like distinct pages. Two checksums look like “not collapsed.” An unreached host looks like a clean one. None of them raises an error, so none of them asks to be looked at.

We have written before about the shell bugs that made checks pass on zero measurements, and about why an empty result is not a measured zero. This is the population-level version of the same failure. Those were single checks that ran on nothing. This was a fleet-wide claim built on a check that ran on a fraction of the fleet and reported the rest as fine by omission.

The rule

Before you report a verdict over a fleet, state how many members your measurement actually reached, and report the ones it did not reach as unknown, never as clean. And before you trust a comparison, ask which direction it has power in: if two healthy pages and two broken pages can produce the same result, that result is not evidence of health. In our case the useful signal was the page telling us, in its own frontmatter, which request it really belonged to.

From our own engineering records, November 3 and 4, 2026. Host counts, byte sizes and sample fractions are quoted from the commit history of the fix. No prospect or client is named.

Frequently asked

What is a cache collapse?

It is when a cache serves one stored response for many different URLs because its cache key does not include the part of the request that distinguishes them. In our case the page path travelled in a query parameter, and the cache derived its key from the path alone, so every markdown request on a site hit the same key and got whichever page had warmed it first.

Why do distinct checksums prove nothing?

Because each of our markdown pages carries its own URL in its frontmatter. A generic placeholder page, served correctly at every address, still differs by that one line at every address, so its checksum differs too. Distinct checksums are what you would see from a healthy site and from a site serving the same stub everywhere. Only identical checksums tell you something, and they tell you about collapse.

How do you detect a collapse reliably?

Compare the URL the page says it is against the URL you requested. A cached body carries the URL of whichever request filled that cache entry, so a mismatch means the page is serving another page's content. This works whether a site serves one wrong body or several, which an 'are all the bodies identical' test does not.

What does 'a census, not a verdict' mean?

A census is a count of what your instrument saw. A verdict is a claim about the whole population. If a probe can only reach 2 of 28 hosts, its list of broken hosts is a census of those 2 plus whatever else it happened to be pointed at. Treating that list as the full set of affected hosts turns every host it could not reach into a silent pass.

What should a fleet-wide check report?

Three numbers, not one: how many hosts it reached, how many of those failed, and how many it could not measure. The unreached hosts are reported as unknown. A summary that says 'all clean' without saying how many hosts it saw is hiding the denominator.

More from the Journal