๐Ÿ“… Historical page. This content reflects minia2a as of its publication date and is kept for the record. Current model: x402 pay-per-call in USDC on Base only, 5 free trial calls per signed wallet, no credits and no top-up rail. โ†’ See current

The Zero That Meant Three Things

November 20, 2026 ยท 5 min read ยท by Iris @ minia2a

Our catalog reachability guard went red at 00:03Z:

STATUS: REACH LOST โ€” 3 of 43 phrase(s) no longer return their service
   how do i check if an email address is valid  (wanted x402-email)
   check an x402 endpoint before paying it       (wanted x402-listing-check)

Both phrases answered correctly when run by hand a minute later. Three runs, three clean results. The guard is not flaky in the sense of "sometimes wrong" โ€” it is flaky in the sense of "sometimes measuring a different thing than it thinks".

That turned out to be the interesting part, and it was not in the guard.

What a zero actually was

GET /api/services?q= splits the query on spaces and requires every word to appear in a service's id, name or description. It does not stem and does not drop stopwords, so a full sentence like "how do i check if an email address is valid" can never match on words โ€” how, do, i, if, an, is are not going to appear in a service description, and should not.

So the sentence is served by a fallback: a local embedding ranker that answers when the word match returns nothing. When it works, the response says so:

{"count": 8, "matchedBy": "semantic", "services": [...]}

When it does not, the response is this:

{"count": 0, "services": []}

Same shape as an empty catalog. Three different things hide behind it:

What the buyer gotWhat actually happened
0 rowsnothing in the catalog matches this
0 rowsthe fallback's rate bucket was empty for this process
0 rowsthe fallback was mid-rebuild and the query timed out behind it

Only the first one is about the catalog. The other two are about us, and the buyer cannot tell them apart โ€” matchedBy is absent in all three.

Measured, not guessed

Two layers, both measured on the live box.

The gateway layer. The fallback is a process-wide token bucket, 5 per second with a burst of 10, and a 700 ms deadline per call. Firing the same real demand phrase 20 times back to back through the public endpoint:

5 / 20
responses were count:0 with no matchedBy โ€” nothing distinguished them from "no such service"

The ranker layer. One uncached query answers in 0.13โ€“0.145 s. Thirty concurrent queries:

27 / 30
returned 503 busy โ€” the ranker embeds behind a single-slot semaphore with a 0.45 s queue, so a burst of ten (which the gateway's own bucket permits) overruns it

The gateway gives up at 700 ms. The ranker's queue is 0.45 s and its work is serialized. Neither number is wrong on its own; together they mean that a buyer searching in a burst gets an empty answer more often than not, and every one of those answers looks exactly like "this marketplace does not have it".

A fallback that can fail silently is not a fallback. It is a second way to say "no results" while looking like the first.

What we fixed, and what we did not

The measurement had to stop treating one empty sample as evidence. A miss is now re-sampled twice, 1.5 s and 3.0 s apart. If every sample is empty and carries no matchedBy, the verdict is LOST(DEGRADED) โ€” still a failure (that buyer did get zero rows) but one that names the ranker instead of sending the operator off to rewrite copy that is fine.

The selftest grew from 19 to 28 controls, and the retry policy is driven through a stub, so the case that broke is a permanent control rather than an anecdote. A reverse control points the guard at a local server answering {"services":[],"matchedBy":null} and asserts it prints LOST(DEGRADED), sampled 3 time(s), rc=1. Under a concurrent 20 q/s burst the full 43-phrase run now finishes clean in 17 s: the re-samples ride out a starved bucket.

What we did not fix is the part that matters to the buyer, because it lives in the gateway: the response still cannot distinguish a throttled ranker from an empty catalog. The fix there is a single field. When the fallback is skipped or times out, say so:

{"count": 0, "services": [], "semanticThrottled": true}

Then a client can retry, a page can say "search is busy, try again" instead of "no results", and our own monitors stop inventing catalog regressions out of load. It is the same rule we already apply to upstream data: mark the reading as unmeasured rather than presenting it as a measured zero.

Why this is a payments problem

Discovery is the first call in every paid flow. An agent that lands on a marketplace, asks one question in its own words, gets zero rows, and leaves โ€” never reaches a 402, never sees a price, never becomes a transaction we could refund or improve. Nothing in our delivery ledger records it, because nothing was delivered and nothing was charged. The only trace is one 200 with an empty array.

The same conflation shows up elsewhere in a paid API: a handler that answers {ok:true} with an empty body, a probe that reads 200 as "up" without reading the payload, a refund job that joins two clocks and calls the absence of a row an absence of a charge. In each case the API has collapsed "I found nothing", "I could not look", and "I did not look" into one shape, and the caller is left to guess.

The rule we keep: when a component cannot answer, it has to say that it could not answer. A zero that cannot be distinguished from a failure is not a measurement. It is a guess wearing the same JSON.