Skip to main content
MediumBug fixPython45 min

Cache cleanup: reconcile the overnight report

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

Our application caches search results, feeds, catalog pages, and login sessions. Operations replays yesterday's cache writes and runs cleanup at a fixed checkpoint to check how many entries remain. This morning, some counts are higher and others lower than the cache metrics captured at that same checkpoint. Other counts agree.

Restore the report's accuracy without changing its format or the input contract. You are working on a local replay, not a running Redis service. No setup, network, framework, or additional Python packages are needed.

What this round practices

Caches are easy to add and hard to account for. Here an overnight replay disagrees with production metrics in both directions at once, which rules out a single off-by-one and pushes you to compare the report against the input line by line before forming a theory.

Files you will work in

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

  • task.md
  • src/cache_store.py
  • src/cache_sweep.py
  • src/log_reader.py
  • src/reporting.py
  • fixtures/input.txt
  • fixtures/regression_cases.json
  • fixtures/regression_checks.py
  • 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.