Code RoomRetry swallows final exception
HardPrep Room Coding #4614

Retry swallows final exception

Vibe & agenticNetworking & APIsSenior–Staff~19 min

An AI assistant wrote this Java retry wrapper around an idempotent remote call, using exponential backoff:

It retries and eventually succeeds in a flaky test. What are the contract and correctness problems a staff reviewer flags?

Implement
retry_sleep_schedule(outcomes: list[str], max_attempts: int, base_delay_ms: int, cap_delay_ms: int) → list[int]
Examples
in[["retryable","retryable","ok"],5,1000,8000]out[1000,2000]
in[["retryable","terminal"],5,1000,8000]out[1000]
in[["retryable","retryable","retryable"],3,100,10000]out[100,200]
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 19 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.