Timezone mismatch in renewal calculation
An AI assistant generated this Python to compute how many whole days until a subscription renews, given a UTC renewal timestamp string:
It returns sensible numbers in your local dev environment. List the bugs and the inputs that expose them.
Implement
days_until_renewal(renewal_utc: str, now_utc: str) → intExamples
in
["2026-02-05T08:30:00Z","2026-01-31T08:30:00Z"]out5in
["2026-01-31T13:30:00Z","2026-01-31T08:30:00Z"]out0in
["2026-01-31T03:30:00Z","2026-01-31T08:30:00Z"]out0What 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.