Question
Over two quarters your team shipped a complex SQL-heavy reporting pipeline largely generated by AI agents — intricate window functions, recursive CTEs, and a few hand-tuned query hints. It works and is fast. But a production number comes out wrong, and during the incident nobody on the team can explain why a particular CTE filters the way it does or whether changing it is safe; the original author "prompted it and it passed the tests." How do you handle this incident, and what does it expose about keeping shared understanding when code is machine-written?
Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it — tests, edge cases, reading critically — and how you’d re-prompt or decompose to get it right.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.