- 3tokens spent at startup to settle the question
- 2runs of the same micro-batch, one per convention
- 64output values checksummed per sequence
The mining engine takes an input that tells it which token's hidden state to gather for each sequence. The vendor's documentation leaves its convention open.
The engine steps back one and gathers the second-to-last token.
The engine reaches one past the end and gathers the next sequence's first token.
Why guessing was not acceptable
Those hidden states feed a corpus of hundreds of millions of vectors that my research clusters and measures.
A systematic off-by-one would corrupt every vector in the same way, and the corruption would look like a slightly different model rather than a bug.
The silent kind of error, which the detector in A detector for a silent corruption exists to catch after the fact, is the kind worth refusing to risk at all.
The test at startup
So the runtime asks the engine, during warm-up. The output is decoded in software for the checksum, so no assumption about the output format leaks into the test.
- Run with the exclusive valueschecksum per sequence
- Run with the inclusive valueschecksum per sequence
- Both runs non-zerorequired
- Which sequence's output changed between the runsnames the convention
What this demonstrates
Treating a vendor's under-specified interface as a hypothesis to test rather than a fact to assume, and making the runtime refuse to run rather than run wrong.
The decision to detect rather than assume was mine; the detection was implemented by AI coding agents, a mix of frontier and open-source models, under my governance system.