Skip to main content
MediumBug fixPython45 min

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.md
  • src/rollup.py
  • fixtures/input.txt
  • tests/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.