A Lint That Crashes Before It Asserts Is Worse Than No Lint
Lessons learned from a Python CI gate that reported green for weeks while silently failing before executing any checks.

Stock photo for illustration only, not from the actual event
- A Python CI gate failed silently due to a missing git binary in the test pod.
- The process crashed before any assertions ran, yet reported a successful status.
- This hidden failure is far more dangerous than having no testing mechanism at all.
- Proper fixes require validating both environment setup and assertion results.
A software development team recently uncovered a critical flaw in a CI gate that had been reporting a green status for weeks without actually verifying anything. The guard consisted of a small Python test designed to enumerate tracked files using git ls-files before executing a set of per-file assertions.
This mechanism operated flawlessly on every developer's workstation and across most standard CI pods—until it executed inside a stripped-down test pod lacking any installed git binary. Consequently, the subprocess.run(['git', ...]) command immediately raised a FileNotFoundError, causing the process to exit before a single assertion could be evaluated.
The real trap was how the caller handled the crash, treating it as "not applicable" and simply moving on. The total execution time was a mere 63 milliseconds, yet the gate officially reported success.

Stock photo for illustration only, not from the actual event
This incident highlights a classic blind spot in automated testing architecture where developers focus entirely on business logic assertions while overlooking environment dependencies and setup prerequisites. Fail-open behaviors like this are exceptionally dangerous because they cultivate a false sense of security, making teams dangerously complacent and allowing bugs to slip into production more easily than if no test existed at all.
That is the ultimate trap: a test that dies before asserting is strictly worse than having no test whatsoever. An absence of testing is an honest, visible gap in code coverage. Conversely, a test that crashes and then reports green is a vulnerability disguised as a guarantee—it destroys the very trust it is meant to build, going completely unnoticed until a preventable bug ships anyway.
Addressing the issue required a two-part fix, though only one aspect was immediately obvious. Implementing a fallback restores the happy path, while a non-empty guard is what ultimately stops future environment mismatches from showing a vacuously green result.
If you maintain a CI gate, ask yourself what happens when its setup step fails, not merely when its assertions fail. These represent two distinct failure modes, and typically only one of them receives proper testing.
Source: Dev.to
Found something wrong in this article? Report an issue with this article
Comments
Leave a Comment