CLAUDE CODE AGENTS: FUNDAMENTALS - Chapter 7, Exercise 2 Why Not Re-Running the Full Suite Is a Genuine Gap ==================================================================================== QUESTION: A testing agent writes and runs new tests for a bug fix, and reports all new tests pass. It did not re-run the rest of the existing test suite. Explain why this is a genuine gap, using this chapter's own tip box. SOLUTION / EXPLANATION: This chapter's tip box is direct that a fix making new tests pass can still silently break something unrelated elsewhere in the codebase - and running only the newly written tests provides no way to detect that at all. The new tests were specifically designed to check the bug fix itself; they say nothing about whether the change accidentally affected some other, entirely different part of the code that the new tests were never written to check. Code changes frequently have effects outside the exact area being modified - a shared function used by multiple callers, a changed return type, a side effect on some piece of shared state. The only way to catch a regression in one of those unrelated areas is to actually run the tests that already exist for them - which is precisely why this chapter's tip box insists on running the FULL existing suite after any change, not merely the tests related to the current fix. By skipping the rest of the suite, the testing agent's report ("all new tests pass") is accurate as far as it goes, but it creates a false sense of completeness - it looks like verification happened, when in fact an entire category of possible regression (breaking something elsewhere) was never checked at all. The gap isn't that the new tests are wrong; it's that a whole category of possible failure was left completely unexamined. -------------------------------------------------------------------------- WHY THIS WORKS AS AN ANSWER: It explains specifically what running only the new tests fails to catch (regressions in unrelated areas the new tests were never designed to check) and why that creates a false sense of completeness, directly matching the chapter's own stated reasoning for insisting on the full suite.