Code Room
Vibe codingHardvc-g132
Subject Ai human in loopLevel Senior–Staff~24 minCommon in Algorithms & data structures interviewsIndustries Software development

Question

You're tasking an agent with a risky change: a backfill that rewrites a `users.region` column for 80 million rows in Postgres, derived from a new geo-lookup, while the table is in active use. The agent is capable of writing the whole migration, the backfill job, and the rollback. Where exactly do you insert human-in-the-loop checkpoints, and which steps do you refuse to let it run autonomously no matter how good the code looks?

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.