Quote endpoint p99 spikes
An AI wrote this FastAPI endpoint that calls a payments provider. Latency looked fine in a single-user test, but under modest concurrency the whole service's p99 spikes and unrelated endpoints stall. Find the bug and explain why it only shows up under load.
Implement
find_blocking_async_handlers(handlers: list[str]) → list[str]Examples
in
[["get_quote|async|requests.get,resp.json","healthz|async|","list_items|sync|requests.post"]]out["get_quote"]in
[["get_quote|async|httpx.AsyncClient.get,resp.json","sleeper|async|time.sleep,log.info"]]out["sleeper"]in
[["a|async|requests.get","b|async|urllib.request.urlopen","c|async|psycopg2.connect","d|async|socket.recv"]]out["a","b","c","d"]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 18 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.
Run or narrate your approach, then ask the coach.