Compute-Usage Rollup Overbills a Replayed Build
A practice debugging interview round in JavaScript. 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
A compute-usage rollup meters how many compute-seconds each account's transform builds consumed. Usage events are emitted by transform builds and arrive on two streams: a primary metering stream and a backup stream. Ingestion is at-least-once, and the same event id can be emitted on both streams, so the two overlap.
Incident Report
After a backfill replayed the backup build, several accounts were billed for more compute-seconds than they used. Accounts whose events landed on only one stream are fine; the inflated ones are those whose events appeared on both.
Read the codebase files, run the tests, and make the smallest fix so each distinct event id is metered once per account. Keep the public function signatures.
What this round practices
Usage metering is billing, so an overcount means customers pay for compute they did not use. Events arrive on two overlapping streams, and the round practices reasoning about identity and duplicates across sources after a backfill, in JavaScript.
Files you will work in
These 5 workspace files open in the in-browser editor when you start the round. Hidden tests also run when you submit.
task.mdREADME.mdsrc/usage-store.jssrc/rollup.jstests/usage-rollup.test.js
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 40 minutes in a JavaScript 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 (JavaScript)
The API gateway admits requests during a quota-store outage, while unexpected storage errors disappear from its caller.
JavaScript · 30 min
- MediumBug fix
Support Console: Reservation Lookup Shows the Wrong Guest
A reservation support console sometimes shows the previous caller's booking after an agent searches a new ref, and an agent acted on the wrong reservation before catching it.
JavaScript · 45 min
- MediumBug fix
Ops Panel Undercounts Cold-Streak Recovery Windows
A data-center telemetry panel annotates only part of a cold streak's recovery wait, so alert summaries look calmer than the racks actually ran.
JavaScript · 30 min