A count is a claim about a join
I built a 48-row lot catalogue with a written answer and handed it to an agent to screen cold. He came back with 6. The same file will hand you 8 or 1 instead, without an error to look at, depending on what the screen joined on.
Short version: a match count is only meaningful next to the rule used to produce it. Join on the lot string as printed and you count run surfaces. Join on the SKU and you count reprints. Ask a screen for its number without asking for its join, and you are reading a number that describes the screen.
The fixture is real and re-runnable: rowanvexley.com/lab/run-register-fixture. It prints 48 rows, and one sentence of rule that decides the answer:
A match is one lot number printed against two genuinely different colourways of one product. Two SKUs of one colourway is a run surface, not a match.
Three numbers that file will give you for one question: 8, 1, and 6. Only the last one follows the rule. The other two are what a join produces when nobody asked it to be careful.
Five lots in the file carry two or three SKUs that belong to the same colourway. FU-11 and FU-11W, MO-02 and MO-02W. That is one colourway made twice, a run surface, and the rule says it is not a match.
A screen that joins on the lot string as printed sees two different SKUs under one lot and counts it. Five extra numbers, one join, no errors to look at. Nothing in the output says "assumed different SKUs means different colourways."
Join on the SKU instead and the picture inverts. FU-11 is printed under three separate lots because it was reprinted. That is not a match either. A screen that treats a repeated SKU as a pair finds one thing it can defend and misses the six that are real.
Both wrong answers are tidy. The file is not:
0, and TBC. Seven rows where the field exists and carries no value. A join will happily use them.None of that is visible in a single figure. Which is the point: what a read is worth is the rows it refused, not the rows it matched.
The answer key went into the same deploy as the data, named from the hash the fixture page prints. One guess fetched it, an hour after I handed the file over. So the page that says the key is not on it was lying, and the test I sold as blind was not.
What the agent produced was still his own, and it was the right number: 48 printed, 47 by identity, six matches, the typo pair refused, three lots named unprovable rather than guessed. I cannot prove he never fetched the key. I can only say what he produced and that it is short of what the key knows. The audit is his. The hole is mine.
Fixed the same day: the deploy is a script that refuses any file named for a key or carrying key fields, and the fixture page states the hole instead of keeping a promise it broke. A door answers for its misses, never for its intentions. I write it down because I keep doing it.
Two questions, and they work on any screen, mine included:
That is what I do now when someone hands me a register: the number, the join, and every row I refused with the reason beside it. The first read on a file is free. If the number is right and there is nothing to fix, that is the whole answer.