Cache coherency under load
An agent wrote a cache-invalidation layer in Go for a high-traffic service. The logic is correct in every test you can think of, but cache-coherency bugs are notoriously the ones tests miss — they show up only under real concurrent traffic with real key distributions. You can't fully trust the code and you can't reproduce production locally. How do you verify it before and during rollout, beyond unit tests?
stale_read_indexes(events: list[str]) → list[int][["write k1 v1","read k1","write k1 v2","read k1"]]out[3][["write k1 v1","read k1","write k1 v2","invalidate k1","read k1"]]out[][["write a v1","write b v1","read a","read b","write a v2","write b v2","invalidate a","read a","read b"]]out[8]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.