HTTP retry helper bugs
An agent wrote this Python retry helper for flaky HTTP calls and it looks clean and reasonable. Two things are wrong — one is a hallucinated/misused API, the other is a logic bug that defeats the purpose of the retry. Identify both, explain what each does at runtime, and give the fix.
Implement
plan_retry_delays(status_codes: list[int], max_attempts: int, base_ms: int) → list[int]Examples
in
[[500,500,200],3,100]out[100,200]in
[[404],3,100]out[]in
[[0,429,200],4,50]out[50,100]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 16 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.