Verify billing days explanation
You inherit a legacy billing utility and ask an AI agent to explain this JavaScript function. The agent confidently replies: "This computes the number of full billing days between two dates inclusive of both endpoints — so Jan 1 to Jan 3 returns 3." Before you build a proration feature on top of it, how do you check whether that explanation is actually true?
Implement
inclusive_billing_days(start_date: str, end_date: str) → intExamples
in
["2026-01-01","2026-01-03"]out3in
["2026-01-01","2026-01-01"]out1What 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.