Compute usage rollup bills one account too much
A practice debugging interview round in Python. Reproduce the failure in an unfamiliar codebase, narrow down the cause, ship a minimal fix, and explain your reasoning to an AI interviewer.
The incident
The FinOps on-call runs this rollup every night to bill each account for the compute-seconds it used. This morning they flagged that one account's total looks higher than the metering dashboard shows, and billing is paused until it is trusted.
rollup.py reads a usage feed and prints total compute-seconds per account.
Each account's usage is delivered on two replica streams for durability: primary and backup. The bus is at-least-once, so the SAME event (identified by its event_id) can arrive more than once, including once on each replica. Those are the same event, not two.
What this round practices
A Python usage-metering round where each account's events are delivered on two replica streams for durability. Billing is paused on one account, so the round practices reasoning about what makes two events the same event and reconciling a total against the metering dashboard.
Files you will work in
These 4 workspace files open in the in-browser editor when you start the round. Hidden tests also run when you submit.
task.mdsrc/rollup.pyfixtures/input.txttests/expected_output.txt
What you are assessed on
The scored report evaluates both your investigation steps and what you explain during the conversation, not only whether the final test run passes.
- Reproduction
- File navigation
- Evidence gathering
- Hypothesis
- Root-cause understanding
- Regression prevention
- Patch scope
- Verification
- Edit control
- Communication clarity
How the round works
You get 45 minutes in a Python workspace that runs in your browser, with no setup. Talk through your plan with the AI interviewer by voice or text, run the tests as often as you like, and submit when the visible checks pass. Hidden tests run on submit, and the scored report covers what you did and what you explained.
Ready to debug this codebase?
Open the workspace, run the failing check first, and walk the AI interviewer through your findings.
Related rounds
View all debugging rounds- MediumBug fix
Rate Limiter: Requests Slip Through During an Outage (Python)
The API gateway admits requests during a quota-store outage, while unexpected storage errors disappear from its caller.
Python · 30 min
- MediumBug fix
Cache cleanup: reconcile the overnight report
The overnight cache report disagrees with the morning metrics in both directions. Trace a small Python service, reconcile the counts, and verify its replay checks before operations plans capacity.
Python · 45 min
- MediumBug fix
Editor Comments: Sidebar Over-Counts Unresolved Threads
A collaborative editor's comment sidebar sometimes reports one more unresolved thread than the document actually has, and a reviewer held a doc open believing a comment was still unresolved.
Python · 40 min