Code RoomIsolate flaky test cause
HardPrep Room Coding #4184

Isolate flaky test cause

Vibe & agenticAlgorithms & data structuresSenior–Staff~22 min

Overnight, an AI agent landed a stack of 6 commits in your Go monorepo (renamed a package, extracted an interface, updated ~40 call sites, bumped a dep, reformatted, added a feature). This morning one flaky-looking integration test, `TestPaymentRetry_HonorsBackoff`, fails ~30% of the time on CI but passed in every commit's own check. You suspect one of the agent's changes introduced it. How do you isolate which change is responsible without just eyeballing 6 commits?

Implement
first_failing_commit(run_logs: list[str], runs_per_step: int) → int
Examples
in[["PPPP","PPPP","PPPP","FPPP","FFPP"],4]out3
in[["PPPP","PPPP","PPPP"],4]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 22 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.