Code RoomChannel close race condition
HardPrep Room Coding #4369

Channel close race condition

Vibe & agenticConcurrencySenior–Staff~20 min

You're a Go engineer with deep concurrency experience. An AI agent helping you build a worker pool insists that because Go channels are 'thread-safe,' you can freely have multiple goroutines close the same channel for clean shutdown, and it shows code that does exactly that with full confidence. This is squarely your area. Explain how you handle the advice and what it reveals about catching AI errors in your strongest domain.

Implement
find_channel_close_violations(op_lines: list[str]) → list[str]
Examples
in[["jobs|worker_1|close","jobs|worker_2|close","jobs|worker_3|recv"]]out["close_of_closed:jobs:worker_2"]
in[["jobs|producer|send","jobs|producer|close","jobs|worker_1|recv"]]out[]
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 20 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.