Skip to main content
MediumBug fixPython45 min

Entity resolution merges two tenants' entities into one link count

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

The registry team runs this reconciliation report every morning after the overnight resolver finishes. For each entity it lists how many distinct links resolved to it, and the team uses that count to confirm the run did not drop or double-assign links. This morning one entity name shows far more resolved links than the registry dashboard reports for it, so the team paused downstream publishing until the report is trusted again.

resolve_entities.py reads the resolver's link feed and prints, per entity, how many links resolved to it.

An entity lives in a namespace (the owning tenant) and has a name. The resolver merges duplicate records of the same entity, then counts the distinct links that resolved to each entity. The same name can belong to a different entity in a different tenant, so an entity is the pair of its namespace and its name.

What this round practices

Entity resolution groups records that refer to the same real-world thing, and the hard part is deciding when two records only look alike. The round practices checking which records were grouped together and whether they should have been before you trust a count.

Files you will work in

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

  • task.md
  • src/resolve_entities.py
  • fixtures/input.txt
  • 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.