Gates: The Safety Net Made of Machine Checks
Why a red board is the cheapest place your problem can ever show up - and why the way past it runs through a note with a name and a date rather than through a switch.
The agent reports back: done. You look at the board, and it is red. Nothing moves - no button, no accept, just a message that was plainly written for somebody else. The first thought is nearly always the same one: something is standing in my way.
You already know the safety-net picture. In the previous step of this path it fell apart, because the one who ties the net is the one who falls into it. For the machines in this article it breaks a second time, in a different place: a net catches you once you have already fallen. These refuse to let you fall at all. They say no.
The previous article on this path took a test apart for you: a name that states a claim, and a line that states the value it wants back. But a claim nobody ever runs leaves the world exactly as it found it. This article is about the machinery that runs claims and then enforces the verdict. Which makes the question here not how to get past that red board, but three others: which machine spoke up, what does that particular red tell you, and what does a permitted route around it consist of?
What sits between finished and in
Between the moment the agent considers itself finished and the moment your change is genuinely part of the project, there is a row of machines. They work through a fixed list. They are set off by the change itself. They run somewhere you cannot reach. And they are able to refuse.
Their authority has nothing to do with strictness. It comes from who controls the place where the check runs, and from whether slipping past it leaves a trace. That is precisely why an exception to such a check is not a switch but a written entry.
Note
What you will be able to do
- Name the five questions that get checked before a change goes in - and say, for a red message, which of them was just answered with no.
- Say why a check counts as a warning in one location and as a closed door in another.
- Report the measured outcome of such checks correctly: as an observed relationship, not as a demonstrated cause.
- Hold a real request for an exception up against the two refusal grounds that settle most cases.
- Say what an exception changes and what it never changes.
Five questions, five kinds of red
Red is not a state your program is in. Red is the answer to a question. Which question that was is rarely in the message, and that is exactly why it reads like an insult. So we start with the questions and not with the tools.
Definition
Gate
In plain words
Technically
Five questions stand between a change and the project. One: can a running program be produced from this text in the first place? Two: do two places in the program agree about what a particular value actually is? Three: was a rule broken that somebody wrote down? Four: does the result match the appearance this project settled on? And five: does a claim about the behaviour still hold?
Five questions, not necessarily five programs. Depending on the language, a single run answers several of them at once: in a great many projects the type check sits inside the build and reports together with it - including in the portal you are reading right now. So the number of tools is not the interesting quantity. What is interesting is which of the five questions has just been answered with no.
The fifth question is the entire subject of the previous article on this path. The other four are new ground - and they are the reason a red board is nowhere near a statement that your program behaves wrongly.
The security check at the airport
Everybody walks through. Nobody is asked whether today happens to suit them. The machine works through a published list, not an assessment of you as a person. Your identity is invisible to it, a dangerous traveller and a harmless one look alike to it, and your intentions lie outside its reach entirely. Red there means: an item on the list registered. Red does not mean: there is something wrong with you.
That the traveller at the airport did not write the list, while here the same team owns both the program and the list of checks, you already know - the previous article showed exactly that. What is new is the consequence once the list is a machine: whoever goes around it has to write that down. Otherwise nobody on the outside can still tell whether a person decided something on purpose or whether something quietly broke.
A second and smaller breaking point: the check at the airport happens once per journey. These run on every single change, often several times a day.
An example: 09:14
The agent has changed three files. At 09:14 the change is handed over. Nobody decided to check anything just now; the handover itself sets the run going. The example is meant to make three properties visible at once - what sets it off, where it runs, and why the response time decides how much effect it has.
Note
What happens after the handover
- 1. 09:14: the change is handed over. No human being takes part in this step.
- 2. A fresh copy of the project lands on a machine that is not yours. Nothing from your computer travels along.
- 3. The checks run one after another. Format takes 0:05, the linter 0:20, the type check 0:50, the build 3:10 and the tests 5:30. Together that is 9:55.
- 4. 09:24: the verdict exists. It falls inside the ten minutes that count as a reasonable ceiling for most projects.
- 5. If red: repair it immediately or take the change back, so that everybody else can carry on working.
Now run the same arithmetic with a test suite that needs 25 minutes. The total climbs to 29:25 and the verdict arrives at 09:44, by which point you are already three steps into something else. Nobody reads a check that answers that late; they simply sit it out. Speed here is therefore not a comfort feature. It is the condition under which the check gets used at all.
Warning or door - the place decides
The same check can be installed in two places, and the two places have little in common.
It runs before you record your change, that is, before your commit. One extra switch skips it. Nobody else ever hears about it.
Result: a warning you can walk past.
It runs after you have handed the change over. It decides whether the change is accepted. A no from it turns the whole handover away, not merely the disputed part of it.
Result: a door that stays shut.
On the most widely used platform the same idea is built in as a setting: certain checks have to have finished successfully before a protected branch will accept a change at all; a check that was deliberately skipped counts as passed as well.
A check does not get its authority from being strict. It gets it from who controls the place where it runs - and from whether slipping past it leaves a trace. On your own computer that is you, alone and silently. On the accepting machine it is somebody else, and going around it there is an act that belongs to a person.
One more thing belongs here, because it will be needed later. Whether a red actually blocks the way or merely lands in a log is not a property of the check. It is something the project decides. That is why the format check stands hard in the way in one project and sits beside the work as a note in the next. And it is why cosmetic does not automatically mean harmless.
Caution
Common error: build, type check, linter, format and tests are all saying the same thing
Five questions, five reasons to fail, five different messages. A red build says there is no runnable program yet. A type error says two places disagree about a value. A linter finding says a rule that people set up was broken. A red format check says something looks different from what was agreed. Behaviour is the subject of the tests alone. So a red format carries other news than a red build, and lumping both together as error throws away exactly the information that would help.
Caution
Common error: it runs here, so the check must be broken
It runs elsewhere on purpose: on a fresh copy, on hardware that has never seen your desk. That it runs for you and fails there is therefore not a defect of the check but its most valuable output. As a rule it means something exists on your computer which is written down nowhere. The complaint that it works perfectly well at home is proverbial among developers for exactly this reason.
Test bench: which gate turns red?
Check
Quick self-check
Can you explain this in your own words? Tick what you've got.
0 of 3 done
Red is the cheap failure
A red board feels like a setback. It is the same defect you would have met later on, caught at the cheapest possible moment: no person has spent time on it yet, it has not entered the project, and nobody outside has run into it.
What matters is which claim is not being made here. Machine checks do not cause fewer defects to exist. The canonical text on the subject, Martin Fowler's "Continuous Integration", says so itself, and bluntly: they do not remove defects from the world, they make them far easier to track down. That text is no snapshot of the moment: its original version is dated 10 September 2000, and the practice behind it came out of the Extreme Programming movement of the nineties - not, as is often claimed, out of a textbook on object-oriented design, where the phrase merely falls in passing.
The claim that can actually be supported is a different one: such checks shift where and when defects are found. And for that there is a measurement.
An example: a hundred changes a month
Take an invented but proportionally faithful project without machine checks. Each month a hundred changes from the core team go into the project. The developers themselves file 25 defect reports. From people outside the core team come 30 reports. Onto that we now lay the values observed in a study of 246 projects after those projects had introduced machine checks. The example is meant to show what shifts and what does not.
First, throughput. The number of changes taken in was about a fifth higher; a hundred becomes roughly a hundred and twenty. Roughly is deliberate: the value is an average across many projects, and a decimal place would fake a precision that is not there. What can be held on to is that more went through, not less.
Second, the defects the developers reported themselves. That number, collected in the 42 projects with cleanly labelled bug reports, was 48 percent higher, which turns 25 into 37. Twelve further defects surfaced, and they surfaced in front of the people able to repair them.
Third, the reports from outside the core team - the closest approximation to what reached the users that this study has to offer. Here no measurable difference showed up. That sentence means exactly what it says: no measurable difference is not zero. It says the study did not find one. Turning that into the statement that not a single extra defect reached anybody says considerably more than the number supports. What was counted, moreover, was reports and not defects: whatever nobody files appears in neither figure.
Defects the developers reported themselves
+48 %
Observed in 42 of the 246 projects. Not proof of cause.
No measurable difference in reports from outside the core team
n.s.
The value did not reach statistical significance. That is a missing finding, not a zero.
More changes went through, twelve further defects landed in front of the people who can repair them, and outside the core team nothing measurable turned up. No defects were manufactured by the checks. Twelve more discoveries landed on the cheap side, without the expensive side growing measurably.
How solid is that? These are observed projects, 246 for throughput and only 42 for the defect counts, and not an experiment. The authors call their own work preliminary and point out that introducing such checks may itself change how a team behaves, which cannot be cleanly separated from any effect on the software. So the wording here is consistently: in the projects that were studied, this was observed. Never: machine checks cause.
The smoke alarm at three in the morning
Nobody is glad to hear it. The whole point of the thing is the timing of the noise it makes. And the single genuinely expensive move on offer is removing its battery. The fire is not the alarm's doing, and that is exactly how the measurement can be read: those defects existed already and merely surfaced sooner. Finding it irritating is therefore not an argument against it.
The breaking point matters more than the picture. A smoke alarm reacts to actual smoke. A check, by contrast, is capable of being plain wrong. The warning about that was printed in 1978 already, in the text of the earliest tool of this family: messages of the sort "something here might be off" are worth only as much as the share of real defects they uncover. If that share is too small, they lose their credibility and merely clog the output. Everybody knows what happens to an alarm that shrieks whenever you make toast: sooner or later a towel hangs over it. That is why checks have to be accurate - and why an exception to them has to be a written act rather than a quiet one.
And the other direction, so the picture does not promise more than it can deliver: a silent alarm proves only that no smoke reached it.
Caution
Common error: red throws us back, the agent was finished after all
A red board does not replace a state in which there is no problem. It replaces a state in which the same problem shows up later, in front of somebody outside. And the reflex that such checks slow everything down does not survive the measurement: throughput in the studied projects rose. Nor was the agent finished. It considered itself finished, and a machine can tell those two apart.
Caution
Common error: this checker never stops nagging, so get rid of it
Half of that is right, and the right half was written down 48 years ago: a checker that misfires too often really does lose its authority. Switching it off is not what follows. The rule can be corrected, and the exception can be written down. The difference is not convenience but visibility: nobody outside sees a switch-off, whereas a written exception is there to be seen. Which brings us to the third part of this article.
What no check can decide
Green means: nothing that was checked objected. That is a floor, not a ceiling. How far that floor carries, and why a coverage figure says less about it than it promises, is the subject of the previous article on this path. Here it stays at this one sentence.
What this article can add is a limit of a different kind. Form is all a check ever reads; intent is out of reach. Whether the thing that got built matches your order is not a question any machine can settle. It can test whether a claim about behaviour holds. Whether that was the right claim to make is another matter entirely, and no checker has an opinion on it.
The origin is well dated. On 26 July 1978, S. C. Johnson at Bell Laboratories described a separate checking program for the language C. The reason a second, separate tool was needed is an uncomfortable one: the translators of the day bought their speed by checking less thoroughly. So a slower, more careful reader was needed alongside them.
In a section he called a word about philosophy, Johnson set down two things this article still lives on. First: a tool like this needs facts that may be impossible to obtain. Take the question of whether some part of a program is ever reached at all; the answer can hinge on the input, and settling it for the general case amounts to a problem that has been proven impossible to settle. Second, and following from that: his procedures were a compromise. So the oldest tool in this family arrived in the world with the honest small print already attached.
The written exception
Nobody who has looked at this seriously demands checks that cannot be passed. What is demanded is something else: that the way past leaves a trace, names an owner and stays visible.
It starts with a grading, and it is exactly the decision that already came up in the first section. A safety-critical industry standard distinguishes three levels. There are rules that admit no exception at all. There are rules that may be departed from, but only with an entry naming restrictions, requirements and precautions. And there are rules whose violation is merely reported, without anybody having to fill anything in. Which check belongs at which level is not decided by the checker: the standard assigns every rule a level, and the project may grade rules more strictly but never relax the two upper levels.
The entry it takes
This is where attitude ends and a form begins. The same standard prescribes what has to appear on such an entry, and an agent toolkit from 2026 arrives at almost the same list - a safety standard from the automotive world and a toolbox for AI agents end up at the same piece of paper.
Which rule
By name, not the checker in general. Whoever reads this later has to be able to find the rule again.
When it is acceptable
The circumstances under which the departure is all right - and only those.
Why it is necessary
The reason. Being in a hurry is not one, and it cannot be turned into one either.
Background
What somebody needs to know who runs into this in six months without knowing the context.
Conditions
Under which conditions the exception holds - and when it gets looked at again.
Name
Who carries the decision. A name, not the team. The standard calls it the consent of a designated technical authority.
Two grounds for refusal settle most real cases. Inconvenience is never enough to earn an exception. And no exception counts until a designated technical authority has signed off on it - somebody named, in other words. Put briefly: the person who wants it is not the person who grants it.
And if you work alone? The separation is between roles, not necessarily between people. On your own it becomes a separation in time and in artefact: you write the entry, and the entry with its date for a fresh look is the second party. Because the version of you that reads it in six months is not the version that was in a hurry. That is exactly what the field is for. It is not bureaucracy but the only counterpart you get in that situation.
An example: three requests
The checker is red on one spot. Three different justifications are offered. Which one survives? The example is meant to show what that turns on.
The first request runs: I am in a hurry and the rule is a nuisance here. It fails on the first of the two grounds outright: convenience. And the standard names a further objection that applies here - a sensible alternative would make the departure unnecessary. So it is refused, and not out of strictness. The reason field would have to read: it was inconvenient. Nobody signs that.
The second request runs: the checker holds a place to be unreachable, but a callback it cannot see leads straight there. This is the kind of situation that earned the first tool of this kind its exception mechanism back in 1978 - the human is occasionally correct, and the checker occasionally blind. Granted by a named person, with an entry: a single line that names the rule, gives the reason, and points at where the genuine path runs.
And when the same false alarm turns up in thirty places, nobody writes thirty justifications. The recurring case is approved once, in advance, and the individual places refer to it. The standard has its own form for this, because many departures belong to known situations that occur widely.
The third request runs: delivery is at a standstill, the repair has to go out immediately, and of all things an unreliable check is reporting red. That is the emergency. Granted, and watched. Such emergency access is closely monitored, tightly restricted and rehearsed regularly so that it works when it is needed. And it is honest with itself: a named way past, not a quiet push by whoever happens to hold the rights. Worth knowing: on the most widely used platform an account with administrative rights is exempt from a protection rule, unless somebody deliberately turns that exemption off.
What separates the first request from the second is not how much work went into it, and not who made it. It is whether the fields can be filled in truthfully. And that is testable, by a machine too: an entry with a field missing is not a weaker exception, it is none at all.
An exception changes the consequence of a check, never its observation. The check keeps running, keeps reporting, and the decision stays visible.
The smaller picture is the note taped beside the switch. Back in 1978 an exception took the shape of a comment in the source text, put down at the spot where the next reader would be standing. Today it is a single line carrying a reason behind a separator. Two gestures, forty-eight years apart, doing the identical job: keeping the excuse in the same room as the thing excused. The emergency key behind glass holds up about as far - reaching it is deliberately possible, but the pane makes noise, leaves fragments, and invites a question afterwards. Where the picture stops holding: it makes every exception sound like a drama. Most are routine.
Caution
Common error: an exception means switching the check off
Nothing gets switched off. And the difference is not cosmetic: a switched-off check cannot be told from a broken one by anybody on the outside. A check moved to advisory with an entry beside it is a decision anyone can follow.
Caution
Common error: whoever needs an exception may grant it to themselves
Writing an exception and owning one are two separate roles. They stay apart not out of distrust, but because the check would otherwise be supervising itself. The same separation turns up again one level higher, in a moment, when agents come into it.
The recurring exception has its own form in the standard: a use case approved in advance, which later entries may refer to instead of arguing it out every time. So the answer to the question of whether you now have to write an essay for every false alarm is: no.
More interesting is that the exceptions themselves are watched. The widely used checking tool reports an exception nobody needs any more as a warning, and it does so by default; the note does not quietly vanish into the wall. A project can also close the self-service route altogether, so that comments in the source text lose their effect and permission to grant an exception turns from a private decision into a setting somebody configured.
Check
Quick self-check
Can you explain this in your own words? Tick what you've got.
0 of 3 done
Why this counts for more with agents
A research report on software development with AI assistance, published on 23 September 2025 and based on close to five thousand responses, finds a positive relationship between the use of AI and throughput - and at the same time a negative one between the use of AI and the stability of delivery. The report names the counterweights explicitly: automated testing, dependable version control and fast feedback.
Carelessness on the agent's part is not the problem. The problem is that changes pile up faster than the checking around them can keep up. How fast shows on the platform that comes up in a moment: by September 2026, more than two in five pull requests there started from an agent's first draft, up from 17 percent in March. And two of the three counterweights named are the subject of this article. What that looks like in practice was written down by a platform on 19 May 2025 for its own coding agent. Four points: the agent may only write to branches it created itself. Its workflows do not start without human approval. Existing protection rules apply to it exactly as they do to everybody else. And whoever asked the agent for a change may not approve that change themselves. The platform calls these defaults, and today a project can, for example, let the agent's workflows start without approval - which switches off exactly one of these brakes.
That answers the question of why the thing keeps blocking one's own agent: it is not the agent being blocked. The agent is a participant like any other, held to the same checks, and expressly barred from waving its own work through. Same separation as in the entry for an exception, one level up.
Back to the red board
What actually happened: one of five questions came back with a no, on hardware belonging to somebody else, triggered by nothing but your own change. Three questions follow, in this order. Which of the five spoke up? What does that particular red mean? And if the check really has it wrong: who puts that in writing, and who owns the decision? Nowhere on that list is the question of where the switch is.
An exception that is written down nowhere is indistinguishable, to anybody who runs into it later, from an accident.
Note
Takeaways
- Five questions stand between a change and the project: whether there is a runnable program at all, whether the parts agree, whether a written rule was broken, whether it looks the way it was agreed to look, and whether a claim about behaviour still holds. Facing a red board, the opening question is always the same one: which of them?
- A check gets its authority from who controls the place where it runs, and from whether slipping past it leaves a trace. Anything you can skip alone and silently is a warning.
- Red is the failure at its cheapest. Across the projects that were studied, developers turned up noticeably more defects themselves, no difference could be measured outside the core team, and throughput went up rather than down. The obvious reading: the defects moved; they were not created.
- Green means: nothing that was checked objected. No check can decide whether what was built is what was ordered, because it reads form and not intent.
- An exception is not a switch. What it alters is the consequence of the check, never the fact that the check runs, reports and stays in sight - and it calls for a named rule, the circumstances it holds under, a reason, the background, the conditions attached, and somebody willing to be named.
Check your understanding
The same check is installed in two places: once with you, before you record your change, and once where the change is accepted. What is the difference between them?
Select one answer
1. The same check is installed in two places: once with you, before you record your change, and once where the change is accepted. What is the difference between them?
2. The board is red. The message names a rule the project set up against a construction known to be risky. What does that tell you about the program itself?
3. After machine checks are introduced, the developers on a team report noticeably more defects three months later than before. Management reads this as a loss of quality. What can you hold against that, and what can you not?
4. Three requests to get past a red check. First: I am in a hurry and the rule is a nuisance here. Second: a place counts as never reachable to the checker, but in fact a callback leads there. Third: the matter is urgent, I let it through and add the justification once there is time. Which of them is a written exception?
5. A checker frequently reports the same thing; roughly every fourth message is a real problem and the rest are false alarms. What changes if that same rule is entered in the project not as advisory but as a blocking level?