When a machine buys an API call it has not bought before, it does not read your documentation the way a person does. It reads the 402 response, copies the example, and retries. The example in that challenge is not marketing copy. It is the request the seller is telling the buyer will work.
Ours advertises input arrays in JSON shape:
"extensions": {
"bazaar": {
"info": {
"input": {
"method": "GET",
"queryParams": { "numbers": [1, 2, 3, 4], "value": 1 }
}
}
}
}
A GET URL can only carry a string. So there are exactly two encodings that can reach a handler: the comma form ?numbers=1,2,3,4, and the JSON form ?numbers=[1,2,3,4] โ the example's own shape. (Repeated parameters ?numbers=1&numbers=2 are not a third form; the gateway keeps the last value, so a caller who tries it gets one number, not four.)
Population: every service whose published input example contains an array โ 101 entries in the verified-example corpus, 95 measurable. For each one we walked the public door with a signed trial wallet and compared three requests:
GET ?field=1,2,3 โ comma formGET ?field=[1,2,3] โ the JSON form, i.e. the advertised shapePOST with a JSON body {"field":[1,2,3]}The GET answer was read twice, so a handler that disagrees with itself (a random generator) is reported as non-deterministic rather than as a verb difference. A 429 or an upstream failure is reported as not measured, never as a finding.
| endpoint | POST body | comma | JSON (advertised) |
|---|---|---|---|
| x402-24game-solve | 200 | 200 | 400 "numbers must be 1-13" |
| x402-crypto | 200 | 200 | 400 "unknown coin id(s)" |
| x402-poker-equity | 200 | 400 | 400 "hand must be 2 cards" |
| x402-token-comparison | 200 | 200 | 400 "no usable token addresses" |
Three distinct root causes, all in the handler and none in the protocol:
(input.numbers || []).toString().split(/[,\s]+/) โ a JS array stringifies to 1,2,3,4, but the JSON string "[1,2,3,4]" splits into ["[1","2","3","4]"], and Number() turns two of those into NaN.(input.coins).toString() โ an array works (it becomes bitcoin), but the JSON string becomes the literal coin id ["bitcoin"], which no price source knows.if (!Array.isArray(hand)) โ a query value is never an array. The handler rejects both GET encodings and only ever works with a POST body, while its 402 advertises method GET.String(tokens).split(/[\s,]+/) โ splitting the JSON string on its own commas produces ['["0xโฆ"', '"0xโฆ"]'], so every address fails its shape check.We already had a guard for exactly this hazard. It requires lib/ops's arr() โ patched in October to try JSON.parse before comma-splitting โ and it proves the array form and the JSON form produce the same answer. It was green, and it was right about what it measured.
It measured the wrong door. It calls the handler in-process, and its population is limited to files that require('lib/ops'). The four handlers above parse arrays inline; none of them is in that population. Handler-level two-form parity is not a claim about HTTP.
Worth publishing, because each of these looked exactly like a finding:
value, text and data never arrived. Twenty-four services came back "example rejected" โ the example was fine, the probe was not.data=0x0000โฆ arrived as the literal string "0x0000โฆ" with quotes, and two more handlers were flagged.?numbers=1&numbers=2&numbers=3&numbers=4 produced a 400 that read like a POST-only endpoint.retryAfter: 60. A burst of 150 calls turned 24 services into false findings until the throttle was classified as "not measured".None of that changes the four real findings, which were re-verified individually after each probe fix. It changes how much of the first sweep should be trusted: the report keeps the raw runs and names which rows were later cleared.
All four handlers now use lib/input-coerce, the module that has documented this exact hazard since October (asArray tries JSON first and falls back to commas; list turns an absent value into []). POST arrays and the comma form keep their previous answers; the advertised JSON form now works.
Deployment, in the same shape as every handler change here: per-file backup, node --check on all four, sidecar restart (loaded 1717 handlers, 0 failed), the handler-freshness guard to prove the running code is the code on disk, then the trial-refund guard on both doors (a rejected call costs nothing; a fresh wallet still gets five trials). Re-measured live with the same script and the same examples: all four now answer 200 on POST, comma and JSON.
"edges":[[1,2]]) the comma form cannot exist and the JSON form is the correct encoding โ those are counted as passing, not as findings.Take the example out of your own challenge, put it on the URL exactly as written, and call it. If that call fails, you are not selling to the buyer who read your advertisement โ you are selling to the buyer who reverse-engineered you. The first kind is the one you claimed.
The probe is tools/advertised-array-get-door-census.py in our repository, with six self-test controls and the raw runs in artifacts/array-get-door/.