Question
An AI agent tested a retry wrapper around an HTTP client (Java) — it should retry on 5xx and network errors with backoff, but NOT retry on 4xx, and give up after maxAttempts. The agent mocked the client and wrote:
@Test void retriesOnFailure() { when(client.send(any())).thenThrow(new IOException()) .thenReturn(resp(200)); Response r = retrier.execute(req); assertEquals(200, r.status()); verify(client, times(2)).send(any());}This is the only retry test and it passes. What does it fail to verify about the retry contract, and how would you close the gaps?
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 coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.