Code RoomVerify refactored billing logic unchanged
HardPrep Room Coding #4012

Verify refactored billing logic unchanged

Vibe & agenticCode quality & reviewSenior–Staff~20 min

An AI agent refactored a 600-line Python billing module (proration, tax rounding, currency conversion) into smaller functions. Your existing unit suite still passes green, and a diff review looks like a faithful structural rewrite. But you didn't write the original line-by-line and proration math is subtle. Before merging, how do you actually verify behavior is unchanged — not just that the tests you happen to have still pass?

Implement
proration_rounding_divergences(monthly_cents: list[int], days_used: list[int], days_in_period: list[int]) → list[int]
Examples
in[[101],[15],[30]]out[0]
in[[103],[15],[30]]out[]
in[[1000,101],[30,15],[30,30]]out[1]
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 20 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.