Skip to main content
MediumBug fixPython40 min

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.md
  • src/__init__.py
  • README.md
  • src/thread_projection.py
  • src/comment_threads.py
  • tests/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.