Two checks that passed and measured nothing
A benchmark gate that preferred slow runs, and a CI check that would have gone green on zero tests.
18 Sept 2026 · Updated 2 Oct 2026 · 5 min · Ernest
Measurement, CorrectnessThe gate that preferred slow runs
Proteus's benchmark harness has a quiet gate. It checks the machine is idle enough for a run to count, so a number taken while something else was hogging the box gets thrown out. The first version keyed on load average. That's the obvious variable, and it was wrong in both directions, which I found out on the same day.
A script replayed the old gate over the committed run logs and lined its verdicts up against the times. On the Metal lane it had admitted the two slowest runs of the session and rejected the fastest. It had the ranking exactly backwards.
On an 88-CPU x64 box, the same rule would have rejected 57 of 58 runs, while real outside load never went above 0.83 of a CPU.
The replacement looks at outside CPU use right now, the host's busy cores minus our own, and answers ok, violated or unknown. It also says outright that it can't see the GPU.
My notes for that day are headed "RUN-LEVEL FLOOR STRUCK … The instrument was wrong and the floor was TOO GENEROUS." The fix was cheap. I only found the bug because the harness had been writing a log for every round, whether or not anyone expected to read it.
The check that ran nothing
The second is CI for an iOS app, a private client for a commercial product. One day a CI machine picked up a new iOS runtime, and the UI test bundle reported "Executed 0 tests, with 0 failures." Nothing in the repo had changed. The job did go red, but only because xcodebuild itself fell over when the UI runner never attached.
The step that was supposed to catch this checked that the total test count was above zero and that each bundle's name showed up in the results. The total is across the whole run, so 58 unit tests with the UI bundle at zero sail straight through, and a name in the results means a bundle was collected, not that it ran. By those assertions it was green before and green after, and the second green tested nothing. Now it asks whether each bundle executed at least one test, which is what anyone reading the step already thought it did.
The cause was how the job picked a simulator: the first iPhone in the list, across every installed runtime. That's stable with one runtime and undefined with two.
The fix wasn't a version pin. A small script now takes its candidates from the destinations xcodebuild itself says it will accept, caps them at the newest simulator the selected Xcode ships, and prints what it chose. "Newest available" would have been the obvious rule, and it would have been wrong: 27.0 was the newest, and 27.0 was the broken one.