Skip to main content
MediumBug fixPython45 min

Analytics: One Account's Event Counts Are Inflated

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

A customer analytics report turns raw delivery events into per-account totals. Since the ingestion queue moved to at-least-once delivery, one account's totals are inflated versus its raw log.

Incident Report

The dashboard overstates one account's send volume by about 40% while other accounts match their logs. The queue can hand the aggregator the same event more than once and can deliver batches out of order.

Read the codebase files, run the tests, and make the smallest fix so an account's totals reflect its real events. Keep the public function signature.

What this round practices

Moving a queue to at-least-once delivery changes what every consumer has to assume. One account's analytics are inflated while the rest match, so the round is about finding what is different about that account's events and checking your fix against out-of-order batches too.

Files you will work in

These 6 workspace files open in the in-browser editor when you start the round. Hidden tests also run when you submit.

  • task.md
  • src/__init__.py
  • README.md
  • src/reporting.py
  • src/event_aggregation.py
  • tests/test_event_aggregation.py

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.