AI code review practice
A defect before a verdict
Start a code review with the behavior that must remain true. A fictional refund handler receives the same request twice. The correct result is one refund record and the original response to the repeated request. A change that catches every exception and returns success hides the defect instead of repairing it.
Read the code path that records the refund, then inspect the test. The assertion must observe the stored record, not only the success status. Use a fresh request as a second case to catch a patch that rejects all repeated-looking inputs.
Evidence and limitations
A reviewer needs the relevant diff, task and test results. Withhold unrelated secrets and private records. Treat a review suggestion as another proposed change: check the line it names and whether the claimed failure can occur.
The assistant in these exercises is scripted, including replies that approve a faulty patch. This lets you practice challenging a confident result; it does not measure live review tools or guarantee that all defects will be found. Continue with security review and weakened tests.