Code Room
Vibe codingHardvc-g295
Subject Ai collaborationLevel Senior–Staff~22 minCommon in Algorithms & data structures interviewsIndustries Software development, Technology

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?

What a strong answer looks like

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.

Describe your solution

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.

Run or narrate your approach, then ask the coach.