Building
A Green Build Is Not a Rendered Page
Paul Henderson,
Today I shipped a website whose only article was a 404 in production. The type checks passed. The linter passed. The build passed. Every gate I had set said the job was done, and the one page that mattered did not exist.
The cause was almost too small to be embarrassing. Each article carries a date in a header block written in YAML, and the date had no quotation marks round it. YAML, trying to be helpful, reads an unquoted date as a date rather than as text, so the parsing library handed the code a date object, and the code checked that the date was a string, found it was not, said nothing to anybody and dropped the article on the floor. A route with zero articles still builds. It still reports success. I only found out because I typed the live address into a browser and got nothing back.
So what went wrong? Not the bug. Bugs are normal. I write plenty of them.
What did the green actually prove?
What went wrong was that I read three passing checks as proof the site worked. They proved something much narrower: the code compiled, it followed its style rules, and it could be bundled. None of the three asked whether a single word of content had reached a screen.
Every automated check proves exactly what it measures and nothing else. The trouble is that a pass feels like a much bigger statement than it is. Green is a colour. The brain reads it as "fine".
Every automated check proves exactly what it measures and nothing else.
Once you look for this shape you see it everywhere, and nowhere more than in building with automated agents, which will run checks all day without tiring and have no instinct at all for what the checks leave out.
A layout check measures whether any page is wider than a phone screen, finds nothing, and passes, while the navigation bar has wrapped onto two lines and looks broken to every mobile visitor. It measured overflow. The failure was reflow. One screenshot would have caught it.
A health check calls a service every morning, gets a 200 back and stays green, while failing at the one thing it exists for, because the condition it guards is defined by somebody else and the check was written against a guess at it. That monitor is worse than none. People trust the green.
A performance score taken on a laptop starved of memory gets written up as a defect in the site, when what it measured was the laptop. A number without its instrument is an anecdote.
And the diagnosis can fail the same way. Earlier today I spent three attempts blaming a remote service for a checkout page that would not load, before I noticed the machine I was testing on was at ninety-five per cent of its memory with every core flat out. A starved browser, not a blocked request. I had evidence of a slow page and read it as evidence of a broken service, which is exactly the mistake I would have been sharp about if a junior analyst had made it.
Each time, the measurement was real. Each time, it got promoted to a conclusion it could not carry.
The rules I close projects with now
Where a build reads content from disk, the job is not done until a real route on the deployed site returns the expected text. Not a status code. The words.
For anything visual, take the screenshot. Instrumentation catches the failure you expected. Your eyes catch the rest.
Any filter that drops input must say what it dropped. Today's article vanished without a sound. A parser that logs the file name and the failing field turns an afternoon of confusion into a one-line fix.
Write the machine down next to the number. A metric that depends on where it was taken means nothing without that, and it does not go into a brief as a defect until somebody has reproduced it on a machine fit to take it.
Check the local state before theorising about a remote one. If the laptop is on its knees, nothing it tells you about anything else can be trusted.
Passed at what?
None of this is new. In due diligence you learn early that a management account is a signal and a bank statement is evidence, and the gap between the two is where the money goes missing. A green build is a management account. The rendered page is the bank statement.
Agents make the gap wider, not narrower. They will run a thousand checks an hour and report every one as passed. Somebody still has to ask the one question no check can ask of itself: passed at what?
A thousand green ticks over an empty page is still an empty page.