"Sanity-check any ranking against a fact you already know."
Two kinds of check, and only one of them works here
Validation asks whether the data is well-formed: right types, right ranges, no nulls where nulls are forbidden, counts that are plausible. It is internal — everything it needs is inside the response.
Verification asks whether the data is right, and it is necessarily external. It requires a fact from outside the system to compare against.
Almost every codebase has a lot of the first and almost none of the second, because validation is cheap and generic and can be generated from a schema, while verification requires knowing something about the domain and writing it down. And the truncation bug is precisely a defect that only verification can see: 1,083 alphabetically-ordered tickers is a perfectly valid response, and the roster it produced is wrong in a way no schema can express.
The cheapest verification: a known member
You do not need a comprehensive oracle. For a ranking, one known member is usually enough, and the criterion for choosing it is stability: something that must be in the set for reasons that will not change month to month.
For a list of the largest US companies, a handful of megacaps qualify — not because their exact rank is predictable, but because their presence is. Any list of the top ten American companies by market value that omits several of the most valuable companies in the world is broken, and it is broken regardless of what happened in the market that week.
Choose the fact so it fails for the right reason
The craft is in picking a fact that is stable enough not to fire spuriously, but specific enough to catch a real defect.
Too specific — asserting an exact rank, or an exact market value — and the check fails every time the world moves, which trains everyone to ignore it. An assertion people have learned to skip is worse than no assertion, because it occupies the slot where a real one would go.
Too loose — asserting only that the list is non-empty, or that it has ten entries — and it passes happily on the truncated data, which is exactly what happened.
The middle is membership without ordering: these particular names must appear somewhere in the result. Stable across market moves, and violated immediately by any truncation, filter error, or universe misconfiguration.