Code Room
Vibe codingHardvc-g463
Subject Ai decompositionLevel Senior–Staff~24 minCommon in Algorithms & data structures interviewsIndustries Software development, Technology

Question

You're using an AI agent to backfill a new denormalized `last_active_at` column across a 50M-row users table in a live SQL database, then keep it updated going forward. Decompose this into steps with checkpoints, and specify where a human must verify before letting the agent run the next step against production data. The system is read-heavy and can't take downtime.

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.