Check AI Code: Tests, Reviews and Red Flags

Check AI Code: Tests, Reviews and Red Flags 1
⏱ 2 min readUpdated 13 October 2026

📘 Vibe Coding Course · Lesson 5 of 6

In this article
  1. 1. Expected-output tests
  2. 2. A 10-point review checklist
  3. 3. Second opinion
  4. Red flags — stop and ask a developer

AI assistants write plausible code. Plausible is not the same as correct. Here is how to check without being a programmer.

Advertisement

1. Expected-output tests

Ask the assistant to turn your sample files into automatic tests:

Write tests/test_clean.py using pytest. For each file in sample/, run the cleaner
and compare with the matching file in expected/. Also add tests for: an empty file,
a file with only headers, and a row with an amount of "0.00".
pip install pytest
pytest -q

Run the tests after every change. If something that used to pass now fails, the last change broke it.

2. A 10-point review checklist

  1. Does it ever delete or overwrite input files? (It shouldn’t.)
  2. Are totals checked against something independent?
  3. What happens with blank cells, extra spaces, and text in number columns?
  4. Are dates parsed day-first (Indian format)?
  5. Are rounding rules explicit (₹ to 2 decimals)?
  6. Does it print a summary (rows in, rows out, rows rejected)?
  7. Are rejected rows saved somewhere you can see them?
  8. Are there any passwords, keys or file paths with your name in the code?
  9. Does it call the internet? Why?
  10. Could you explain each step in one sentence?

3. Second opinion

Paste the code into a fresh AI chat and ask: “Review this for bugs, data loss and wrong edge-case handling. List problems by severity.” A fresh conversation doesn’t share the first one’s assumptions.

Red flags — stop and ask a developer

  • It needs admin rights or wants to change system settings.
  • It sends data to a website or API you didn’t ask for.
  • It touches a production database or your company’s ERP directly.
  • The fix for one bug keeps breaking something else, three times in a row.
✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong