Code Room
Vibe codingHardvc-g282
Subject Ai refactor migrationLevel Senior–Staff~24 minCommon in Databases & SQL · Code quality & review interviewsIndustries Software development

Question

You're migrating a data-access layer from hand-written SQL to an ORM (e.g. raw psycopg queries to SQLAlchemy ORM) and an AI agent does most of the translation. Functionally the endpoints return identical JSON and all tests pass, but a week after rollout, p99 latency and DB load have crept up. What did the agent most likely do, and how should you have verified equivalence before shipping?

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.