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.mdsrc/cache_store.pysrc/cache_sweep.pysrc/log_reader.pysrc/reporting.pyfixtures/input.txtfixtures/regression_cases.jsonfixtures/regression_checks.pytests/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
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
- MediumBug fix
Analytics: One Account's Event Counts Are Inflated
A customer analytics report shows one account with far more delivery events than its raw log supports, after the ingestion queue moved to at-least-once delivery.
Python · 45 min