Concurrent rate limiter
You need a client-side rate limiter in Go that throttles outbound calls to a third-party API to its published quota (e.g. 100 requests/second) from across many goroutines. You'll have an AI agent implement it. Write the prompt/spec — constraints, edge cases, acceptance criteria — so it's correct first try under concurrency. What does a naive prompt ("throttle the API calls to 100 per second") get wrong?
token_bucket_admit(capacity: int, refill_per_sec: int, arrival_ms: list[int]) → list[bool][2,2,[0,0,0]]out[true,true,false][1,1,[0,500,1000]]out[true,false,true][2,2,[900,950,1000,1050]]out[true,true,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.