Code Room
Vibe codingMediumvc-g480
Subject Ai verificationLevel Mid–Senior~16 minCommon in Algorithms & data structures interviewsIndustries Software development, Telecom

Question

An AI agent wrote a TypeScript function `parseRetryAfter(header: string): number` that turns an HTTP `Retry-After` header into a delay in milliseconds. The header can be either a number of seconds or an HTTP-date. You want to expose a bug with as few test inputs as possible. Which 2-3 inputs do you pick, and what bug is each one hunting for?

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.

Describe your solution

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.

Run or narrate your approach, then ask the coach.