Chapter C62 · Interactive Course
Check the work an agent returns
Diffs, matching a check to the risk, regression tests, failure output and shared blind spots.
Core Learning Concept
Review code patches against stated requirements and reproducer tests. Inspect the raw diff, verify check coverage, and diagnose failure causes. Never let an assistant summary replace verifying actual modified code lines.
What You’ll Learn in This Chapter
-
Review the actual diff
Inspect changed behavior in context.
Inspect the actual patch directly, examining added lines, removals, and context. Verify how edits satisfy requirements without introducing side effects. Never accept an assistant summary without cross-checking the real git diff.
-
Choose checks for the risk
Match a check to the behavior that changed.
Choose checks based on what could fail. A calculation may need unit cases; a form may need interaction checks; a deployment setting needs environment-specific validation. More checks are not automatically better if they miss the changed behavior. Explain what each important check establishes and where its coverage ends.
-
A regression test protects an earlier failure
Identify a test that fails before the fix and passes after.
A regression test captures a behavior that failed so the same problem is detected if it returns. For a bug fix, it should meaningfully fail under the old faulty behavior and pass with the repair. Test the requirement rather than merely duplicating the implementation’s internal steps.
-
Read failures before changing code
Use a failure report to select a hypothesis.
Read the error output and relevant context before changing code in response to a failed check. The cause may be the patch, a missing dependency, a test assumption, or an unrelated existing failure. Reproduce and classify it, then make the smallest justified repair and rerun the affected check.
-
Generated tests can share blind spots
Inspect test expectations independently of generated implementation.
Generated implementation and generated tests can share the same mistaken assumption. A test passing proves only what its assertions actually check. Compare the cases with independent requirements, a known result, or the original reproducer. Include important boundaries the implementation might otherwise overlook.
-
Human review closes the evidence gap
Identify what needs actual interaction or specialist judgment.
Human review can assess requirement fit, usability, domain meaning, and risks that automated checks omit. Give the reviewer a concrete artifact and evidence they can inspect. Review is another source of judgment, not a guarantee; combine it with appropriate tests and runtime observations.
-
Accept or return the patch
Review a supplied diff, test run and screenshot, then request one precise correction supported by the evidence.