The working loop
Verification and testing
Treat generated code as an untrusted draft.
Understand the problem
Read the diff, run a focused test, and inspect failure behavior. Test boundaries, retries, invalid input, and authorization. A passing happy-path test does not establish correctness.
Make it concrete
A generated cache can return another tenant’s data if tenant ID is omitted from its key.
Trade-offs and pitfalls
Too much testing of implementation details can lock in the wrong design.
Check your understanding
Name three adversarial tests for an AI-generated file upload endpoint.
Practice this topic