Code RoomFlaky test masked by sleep
MediumPrep Room Coding #4014

Flaky test masked by sleep

Vibe & agenticAlgorithms & data structuresMid–Senior~15 min

A test in your Go integration suite is flaky. You asked an agent to fix it and it 'fixed' it by inserting time.Sleep(500 * time.Millisecond) before the assertion. CI is green now. Walk through why you'd reject this, how you'd re-steer the agent toward the real fix, and when you'd stop prompting and dig in yourself.

Implement
poll_until_ready(state_log: list[bool], poll_interval_ms: int, timeout_ms: int) → int
Examples
in[[false,false,true],50,500]out100
in[[true],50,500]out0
in[[false,false,false],50,500]out-1
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 15 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.