Editor Comments: Sidebar Over-Counts Unresolved Threads
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 collaborative editor syncs comment threads from the server into local state. A sidebar badge shows how many threads are still unresolved so reviewers know when a document needs attention.
Incident Report
On some documents the unresolved badge sits one higher than the open comments a reviewer can see, and the first comment renders twice in the margin. It follows a sync that updates the top comment; updates to later comments merge cleanly. A reviewer held a document open believing an unresolved comment remained when it did not.
Read the codebase files, run the tests, and make the smallest fix in the merge function without changing its public signature.
Workload
Large documents may hold 10,000 existing threads and receive 1,000 updates in a sync. After verifying correctness, explain how your patch scales with both counts and whether a simpler repair would preserve that behavior.
What this round practices
Collaborative editors keep a local copy of server state and merge updates into it, and small merge mistakes show up as UI that is almost right. The round practices narrowing a bug that only appears for one kind of update while the others sync cleanly.
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.mdsrc/__init__.pyREADME.mdsrc/thread_projection.pysrc/comment_threads.pytests/test_comment_threads.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 40 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
Cache cleanup: reconcile the overnight report
The overnight cache report disagrees with the morning metrics in both directions. Trace a small Python service, reconcile the counts, and verify its replay checks before operations plans capacity.
Python · 45 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