Code Room
Vibe codingHardvc-g490
Subject Ai verificationLevel Senior–Staff~18 minCommon in Algorithms & data structures interviewsIndustries Software development

Question

You found a bug, then asked an AI agent to both fix it AND write a regression test for it. It returned a one-line fix and a passing test. The natural worry: an AI writing the test for its own fix may write a test that passes regardless of whether the fix is correct. How do you judge whether the regression test genuinely guards the bug?

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.