Code RoomTiming flake root cause
MediumPrep Room Coding #4335

Timing flake root cause

Vibe & agenticAlgorithms & data structuresMid–Senior~18 min

A test suite has one test that fails roughly 1 in 20 CI runs. You paste the failing test and its assertion error into an AI agent, which concludes: "This is a timing flake — the assertion runs before the async write completes. Add a 200ms sleep before the assert and the flake goes away." The fix would likely turn the run green. Why is accepting that diagnosis risky, and how do you verify the real cause?

Implement
classify_flake_evidence(isolated_runs: int, isolated_failures: int, after_suite_runs: int, after_suite_failures: int) → str
Examples
in[200,0,200,11]out"order-dependent"
in[200,10,200,12]out"inherent-race"
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.