Skip to content
ManualMode guides

Verification playbook

AI code review checklist: verify generated code before it ships

A practical checklist for reviewing AI-generated code: contracts, edge cases, state ownership, tests, failure paths, and the smallest safe fix.

6 min read · Updated August 2026

Start with the contract, not the syntax

Generated code is often locally plausible and globally wrong. Write down what the function must accept, reject, preserve, and return before editing it.

  • Which inputs are valid but unusual?
  • Which values are intentionally empty, zero, false, or null?
  • Which caller assumptions must remain stable?

Run the original code once

Do not fix on sight. Run the current tests first so the failure becomes evidence, not a guess. Record the first failing case, expected value, and received value.

A strong review distinguishes the observed failure from the suspected cause.

Check the AI-era failure modes

  1. Truthiness: valid values such as 0, false, or an empty string are rejected.
  2. Async ownership: an older response overwrites newer state.
  3. Silent defaults: value || fallback replaces an explicit value.
  4. Partial validation: the happy path is checked while malformed or missing fields pass through.
  5. Scope expansion: the patch changes more behavior than the request required.

Prove the smallest safe correction

Add or identify a test that fails for the bug and passes after the correction. Then make the narrowest change that restores the stated contract without rewriting unrelated code.

Re-run the full public suite. A passing new test is useful only if existing behavior still passes.

Start with evidence

Calibrate with three Gym reps, then verify one real Project task.

Start free