CLAUDE CODE AGENTS: FUNDAMENTALS - Chapter 7, Exercise 3 Why "All Green" Doesn't Mean No Remaining Bugs ==================================================================================== QUESTION: A developer sees a fully passing test suite and concludes the code has no remaining bugs. Using this chapter's own warning box, explain what's wrong with that conclusion. SOLUTION / EXPLANATION: This chapter's warning box is explicit that a passing test suite proves the code matches what the tests actually check for - it says nothing about behavior that nobody thought to write a test for in the first place. "All green" is a statement about the specific cases the test suite happens to cover, not a general claim about the code's correctness across every possible input or condition. The developer's conclusion treats test coverage as though it were exhaustive - as if every possible way the code could behave incorrectly has already been anticipated and checked. In reality, a test suite only verifies exactly the scenarios someone wrote a test for. A genuinely subtle bug - one triggered by an edge case, an unusual combination of inputs, or a condition nobody happened to think of when writing the tests - can sit completely undetected behind a fully passing suite indefinitely. This isn't a failure of the testing process; it's simply outside what that particular set of tests was ever designed to check. The accurate conclusion isn't "this code has no bugs" - it's "this code correctly handles every case the current tests describe." Whether that set of cases is actually comprehensive enough to catch every realistic failure is a separate, ongoing question, not something a passing suite alone answers. -------------------------------------------------------------------------- WHY THIS WORKS AS AN ANSWER: It reframes "all green" accurately as "matches the tests that exist," not "proven free of bugs," and explains concretely why an untested edge case can hide behind a passing suite without that being a flaw in the testing process itself - directly following the chapter's own stated distinction.