Code RoomFlaky test diagnosis
MediumPrep Room Coding #4501

Flaky test diagnosis

Vibe & agenticAlgorithms & data structuresMid–Senior~18 min

You asked an agent to fix a flaky integration test. Its first attempt added a `sleep(2)`; you rejected that and asked for a real fix; its second attempt wrapped the assertion in a retry loop, which is the same smell. It's clearly pattern-matching 'flaky test' to 'add waiting.' How do you diagnose why it keeps missing and re-steer it — and at what point do you stop prompting and take over?

Implement
decide_agent_next_step(attempts: list[str]) → str
Examples
in[["add_sleep_2s"]]out"resteer"
in[["add_sleep_2s","wrap_assertion_in_retry_loop"]]out"take_over"
in[["await_ready_signal"]]out"accept"
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.

0:00 of about 18 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.