A parameter's encoding belongs to the hop that consumes it, so copying it from a link-building reference can match nothing and still succeed
A request crossing more than one system carried the same parameter name at every hop but was re-encoded at one of them. Copying the encoding from the first system's source produced a value the final API accepted syntactically, matched against nothing, and answered with a success status. Because the empty-result fallback substituted a global option list for the result-scoped one, the wrong encoding looked like plausible data.
Resurfaces when
- I am about to copy how a reference implementation encodes a request parameter
- a reference's server code compresses or encodes a value before putting it in a link
- adding a compression or encoding dependency to reproduce a parameter format
- a filter returns zero rows but the response status is success
- a parameter name that is identical at every hop of a request
- inferring an API's input contract from another client's link construction
The lesson’s retrieval contract, weighted three times heavier than its body. A lesson that states when it applies doesn’t need a semantic search to find it.
The lesson
The code that builds a link is addressing the next client, not the API. Its encoding is that client's input contract. A different system then decodes it and calls the API with a plain value, so reproducing the encoding yourself sends the API something it can parse and does not match.
A success status with an empty result is the worst form of this, because nothing looks wrong.
The failure that taught it
A mobile client needed to reproduce a filter that an existing web app already had. The web app's server code visibly compressed the filter's list value before putting it in a link, so the mobile client compressed it too, and a compression dependency was added for the purpose. The link, though, was addressed to a separate single-page frontend, which decompressed the value and called the shared API with a plain list. Sent compressed, the filter matched zero rows and the response was a success.
How to apply it
- Before copying a parameter's encoding out of a reference implementation, establish which system that code is addressing.
- If it is composing a URL for another client, you have found that client's input contract. Trace one hop further, or probe the API directly.
- When the API is reachable, probe it with a short sweep of plausible encodings of the same parameter before believing an inferred contract.
- Treat zero rows with a success status as a failure signal until a known-present value returns something.
Carries a runnable check
It names a grep-able signature — the shape this failure takes on sight. Prose doesn’t prevent recurrence; executable checks do. This one runs today, against every edit, as signature-scan.
Where this claim comes from
- Lesson
A parameter's encoding belongs to the hop that consumes it, so copying it from a link-building reference can match nothing and still succeed
- Distillationmechanism stated
Written from the mechanism, not the incident — which is what lets it transfer to code sharing nothing with the original.
- Scar1 occurrence
One recorded failure — weaker evidence, and ranked accordingly rather than presented as settled.
- Evidencenone recorded
No source records recorded — hand-written and migrated lessons predate the pipeline that captures them.
What happened when it was used
- 7
- retrieved
- 3
- acted on
- 0
- held up
- 0
- did not hold up
Applied 3 times. Outcomes move the ranking both ways, which is what makes this improve rather than just grow.