My own tooling rejected me 4 times in one day
A software developer shares valuable lessons after a custom codebase guard rejected their work repeatedly, highlighting how to write reliable tests.

Stock photo for illustration only, not from the actual event
- A software developer had their custom code tooling reject their work four times in one day.
- Every mistake stemmed from treating tool outputs as evidence for entirely different questions.
- Reliable guards must prove they can say no before proving they can say yes.
Most developers are familiar with running tests, watching them pass, and shipping the code. However, trying the reverse approach—building a check that must refuse and proving you have witnessed it say no—is a completely different challenge. For one software developer, a single working day turned this perspective upside down when their self-built tooling blocked them four times consecutively, prompting them to document the recurring pattern.
All four failures wore different disguises while sharing the exact same root cause: taking an output produced by a tool and treating it as evidence for a different question. First, a network scan found an active service and concluded the target lived there, overlooking that it was merely a leftover process from an older model. Second, an error message read from a stored record almost led to rewriting a fix that had already been resolved three days prior.

Stock photo for illustration only, not from the actual event
In the third instance, a verification loop flagged two passing test files as failing because it searched the output text for the word red, and a German word happened to contain those exact three letters. Finally, adding a file to a build without including it in the manifest resulted in a successful report build that immediately crashed upon executing the first command. These occurrences exposed the dangerous gap between the narrow question in a developer's mind and what the tooling actually reported.
The hardest part to accept was realizing that for every guard ever written, developers can confirm it passes, but most cannot recall ever watching it fail. A guard that has only ever remained green is merely a decoration that happens to match the correct color, and it will continue displaying that color even after it stops functioning. Therefore, validating a guard requires two specific cases in strict order: first, prove it says no when it should, and second, prove it says yes when it should.
"A guard that has only ever been green is not a guard. It is decoration that happens to be the right colour"
Heinrich Neb
From a modern software engineering perspective, the concept of defensive coding and robust test guards is vital for maintaining high code quality. Writing tests that only verify the happy path (Green Tests) is insufficient because it fails to validate whether the test framework can actually catch regressions. Enforcing negative test cases first ensures that automated tooling possesses genuine detection capabilities rather than providing a false sense of security.
Ultimately, being rejected by your own tooling four times in a single day is not a bad outcome; it is the day the tooling finally earns its keep. By redesigning checks to actively verify responses rather than passive file lists, development pipelines become significantly more resilient against silent failures and human oversight.
Source: Dev.to
Found something wrong in this article? Report an issue with this article
Comments
Leave a Comment