Code Room
Vibe codingHardvc-g592
Subject Ai verificationLevel Senior–Staff~25 minCommon in Concurrency interviewsIndustries Software development, Technology

Question

A coding agent refactored a hot Go service to add a sharded in-memory cache with per-shard mutexes and a background eviction goroutine, claiming a 3x throughput win. The benchmark it ran does show 3x. You don't fully trust the concurrency model — there's a lot of locking and channel signalling you didn't write. Before this ships to a service handling 50k req/s, how do you verify it's actually correct and that the speedup is real?

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.

Describe your solution

Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.

Run or narrate your approach, then ask the coach.