Code changes
python
def process_payment(amount):
result = stripe.charge(amount)
return result
Verification
1 Correctness No error handling on stripe.charge()
2 Architecture Direct Stripe call — use PaymentService
3 Safety No input validation on amount
4 Tests Missing negative amount test case
5 Code review Iterative review until pass
  Iteration 1... Iteration 2... APPROVED
Production-ready
Approved
def process_payment(amt: float):
if amt <= 0:
raise ValueError(...)
try:
result = svc.charge(amt)
except StripeError as e:
logger.error(...)
3 critical bugs caught
2 improvements suggested
1 iteration to fix