On 2026-12-05 we shipped a build that caps the page size of our catalog endpoint at 200 rows. The response kept its old shape: same keys, same count field, same ok:true. It just stopped putting more than 200 rows in the body, and added truncated:true to say so.
Six consumers of that endpoint β our own scripts and guards β read the body once, judged it, and printed a verdict. For most of a day they were judging one tenth of the catalog, and nothing in their output said the population had changed. One of them rewrote a public file with 200 rows over 1,983. This post is the measurement, the five different ways the loss stayed invisible, and the two-line check that catches all of them.
/health.json after one run of the health prober, while the catalog envelope still answered count: 1983One parameter. Every form of "give me everything" now answers 200 rows:
GET /api/services β 200 rows, 90,448 B, truncated:true
GET /api/services?limit=5000 β 200 rows, limitApplied:200, count:1983
GET /api/services?limit=0 β 200 rows
GET /api/services?limit=-1 β 200 rows
GET /api/services?limit=20 β 20 rows, 10,834 B
GET /api/services?limit=200&offset=200 β the next 200 rows
The envelope is honest: count is still the total (1,983), truncated is true, limitApplied is 200, and the note says to page with offset. A client that pages loses nothing. A client that reads once and believes the body loses 90% of the catalog.
| Consumer | What it does | How the loss stayed invisible |
|---|---|---|
probe-health | probes every service, rewrites /health.json | refusal floor was < 100 services β 200 clears it |
gen-services-index | renders the crawlable services index | refused correctly (count mismatch), so the page silently stopped updating |
refresh-agent-card | writes agents.json, ranked top 100 | same < 100 floor; top 100 ranked out of 200 rows |
fix-catalog-prices | re-syncs prices/descriptions from the live catalog | printed "already correct: 83" β true, for the first-page ids it could see |
service-availability | attaches catalog reliability scores | lookup is fail-open: except: scores = {} β 90% of rows lost their score and the file still said clean |
challenge-body-byte-parity | samples 402s to compare challenge bytes | sampled 48 endpoints from a first page of 200 and reported a sample verdict |
None of these printed a number that a human would notice as wrong. "200 probed" looks like a normal run if you do not remember that the catalog has 1,983 rows. "already correct: 83" is exactly what a healthy run prints. The one consumer that did the right thing β the index generator β did it by comparing the body to the envelope's own count, so it left the previous page untouched instead of publishing a tenth. Its failure mode was a stale page, not a wrong one. That is the better failure, and it happened by accident.
The envelope already carried the checksum. A consumer only had to compare it:
doc = fetch_all_pages(url) # follow offset until a short page
assert len(doc["services"]) == doc["count"], (
"catalog shipped %d of %d rows" % (len(doc["services"]), doc["count"]))
That is the entire fix for five of the six. The sixth (the fail-open score lookup) needed one more rule: a partial read is not a verdict, so it now refuses instead of answering with an empty dict.
Three things, and none of them is exotic:
ok:true. There was no error to handle, no exception to catch, no log line. The only signal was a number in the envelope that most consumers never read.< 100 services returned β refuse to write" was a sensible guard against an empty or broken response in a 326-endpoint world. At 1,983 rows it is a guard against nothing: the broken response is 200, which is above the floor and well below the truth.Every consumer now pages, and refuses to publish a short read. The pager is small enough to embed; the important half is the refusal:
def fetch_catalog(url, page=200):
rows, offset = [], 0
while True:
doc = get("%s?limit=%d&offset=%d" % (url, page, offset))
chunk = doc.get("services") or []
rows.extend(chunk)
if len(chunk) < page: # short page = last page
break
offset += page
doc["services"] = rows
return doc
def short_read(doc):
n, got = doc.get("count"), len(doc["services"])
if n is not None and got < n:
return "catalog shipped %d of count=%d" % (got, n)
And a static guard over the repository: any file whose source asks for /api/services?β¦limit=N with N β₯ 200 is claiming the whole catalog, so it must either import the pager or advance an offset in a loop. A search query with limit=20 is not a claim about the whole catalog and stays out of the population. The guard's eight self-tests include the failure and its reverse control: the same one-shot read, plus an offset loop, passes.
The same shape applies to any paginated registry you consume β x402 catalogues, MCP tool lists, package indexes:
truncated:true; if you consume, page.The measured state after the fix: /health.json carries all 1,983 endpoints again, the services index renders 1,983 rows, and the price and reliability refreshes cover the full catalog. The envelope's count is still the total; that part never broke.