Silodisa AI · Weekly log · Issue 10
1,238
1,238 of 1,238: the auditor that never reads our code
By Miguel Marengo Canales · Silodisa ·
In 30 seconds
- Every number the app shows is calculated again by an independent auditor, on its own, and the two have to match one by one. If they don't match, it doesn't get deployed.
- The auditor never reads the app's code. What it does read is the definition.
- On October 1 they didn't match: 629 vs 367. Neither the app nor the auditor was wrong; the comparator was. After the fix: 6,871 figures matched and 1 differed, and we didn't hide it.
- 1,238 of 1,238matched in Cronos
- 151 of 151matched in the Verifier
- 21 of 21auditors with no differences
- 6,871 and 1matched and differed, in plain sight
How do you know a number on your dashboard is true? Not that it looks good, or that it matches what you expected. That it's true.
In almost every system I know, the answer is: “the person who built it checked it.” And that’s the problem. If the developer misunderstood the rule, their test misunderstands it too. The code and its test are wrong together, and both come out green.
At Silodisa AI we answered that question with a rule that takes work, but that we don’t negotiate: every number the app shows is calculated again by an independent auditor, on its own, and the two have to match one by one. If they don’t match, it doesn’t get deployed.
This week I want to explain how it works, because of all the pieces we’ve built, it’s the one that lets me sleep best.
01Two programs, one question
The auditor isn’t a person checking screens. It’s another program, with one rule that makes it valuable: it never reads the app’s code.
What it does read is the definition. For example, something like: “warehouse time for an inbound truck = from when it becomes the warehouse’s turn until unloading ends.” With that sentence, and only that sentence, the auditor runs its own queries on the same data and gets its own number. Then a third program, the comparator, puts the two side by side, figure by figure.
If both reach the same number by different paths, it’s very unlikely they’re both wrong in the same way. If they don’t, there’s something to understand before that number is shown to anyone.
02What it has counted so far
Every piece I’ve described in this log went through it before going out:
- Cronos, the agent that splits each truck’s stay into five times: 1,238 of 1,238 numbers matched, with 30 days of real data.
- The Verifier, which checks every morning whether what was recommended got done: 151 of 151 cases matched.
- The six no-AI buttons: 15 matched, 0 differed. That auditor only read the design.
- The seal on version 1.6.3, on October 5: 21 independent auditors, 21 of 21 with no differences.
- The Scorecard, which grades the warehouse with six numbers, was validated with hundreds of matching figures before anyone saw it.
None of those numbers say the warehouse is doing well. Several of the ones they report are still in the red. What they say is something else: that the red is real.
03The day they didn’t match
The story I’m proudest of isn’t one of the ones that matched.
On October 1, the auditor said 629 lots had pallets in rack and the app said 367. A gap like that is scary: 262 lots. The natural reaction is to assume the app is wrong and start changing code.
When we looked into it, neither the app nor the auditor was wrong. Both counted 629. The one failing was the comparator: from the app’s figure it subtracted, a second time, the lots that have no pallets in rack, the ones in damages or in staging. It was removing the same thing twice.
It was fixed there, in the comparator, not in the app. And the definition was written with a real example, so no program would read it differently again.
After the fix: 6,871 figures matched and 1 differed.
Even the system that watches the system needs someone watching it.
04The difference we didn’t hide
That one difference is seven lots in the remainders count: the app counts them and the auditor doesn’t. It would have been easy to tweak the auditor’s rule until it matched, or to round off and say “everything matches.”
We didn’t. It stayed in the plan with its name, as an open item someone has to resolve. A 6,871-to-0 table looks better in a presentation. A 6,871-to-1 table, with the explanation next to it, is the one you can believe.
05Why the usual tests aren’t enough
We also have automated tests, like any project. But those tests are written by the same team that writes the code, and they share its assumptions. If someone understood that “on time” starts at the appointment and not at arrival, the test will happily confirm it.
The auditor breaks that chain because it shares only one thing with the app: the written definition. That’s why, when they don’t match, the lesson is almost never “there was a typo.” The lesson is usually: the definition wasn’t clear. Two programs read it and understood different things. Two people would too.
So the auditor forces us into something worth more than the number: writing every definition with an example, so there’s only one way to read it.
06Three rules that make it hard to fool
- If they don’t match, it doesn’t get deployed. There’s no “almost everything matches.” An unexplained difference stops the release.
- An explained difference doesn’t get erased. It stays in the plan, with its name, until someone closes it.
- The auditor doesn’t learn from the code. If making it match means copying the app’s way of calculating, it’s no longer an auditor: it’s a second copy of the same mistake.
07What we don’t know
- That the definition is the right one. The auditor confirms the app does what the definition says. It doesn’t confirm the definition is good for the floor. That’s what the “I disagree” button and the Verifier are for; the Verifier checks in the WMS what actually happened.
- That the source data is good. If a time was entered wrong in the warehouse system, the app and the auditor read it equally wrong. In Cronos, for example, 7 of 604 trucks had times that didn’t add up. Those aren’t graded; the auditor wouldn’t have caught them on its own.
- How much it costs to maintain. Every new agent needs its own auditor and comparator. Today we’re glad to pay for it; we’ll have to measure whether it scales.
08What comes next
Every time we add an agent, the order is the same: first the definition is written with its example, then the app, then the auditor on its own, and finally the comparator. If there’s a difference at the end, it gets explained before anyone sees the number.
AI recommends; people decide. But to decide with a number, you first have to be able to believe it. BIEN y a Tiempo (done right and on time) also means the number is right before it arrives on time.