Concurrent cache correctness
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?
simulate_sharded_cache(keys: list[str], shard_count: int, shard_capacity: int) → list[bool][["a","b","a"],2,2]out[false,false,true][["a","b","a","c","b"],1,2]out[false,false,true,false,false][["ab","ba","cd","dc","ab"],4,2]out[false,false,false,false,false]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.
Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.