Skip to main content
MediumBug fixJavaScript45 min

Support Console: Reservation Lookup Shows the Wrong Guest

A practice debugging interview round in JavaScript. 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 reservation support console lets agents pull up a guest's booking by ref while on a call. The panel reuses one state object, and agents often refine or replace a ref while an earlier lookup is still in flight.

Incident Report

An agent searched ref BK-2048, but the panel briefly showed BK-1024, a booking they had looked up seconds earlier. They opened a refund on the wrong reservation before noticing the guest name did not match. Most lookups show the right guest; this only surfaces when a second lookup starts before the first response returns.

Read the codebase files, run the tests, and make the smallest production-safe fix in the search controller. Preserve the public API because other console components call it directly.

What this round practices

A support agent acting on the wrong booking is the kind of bug that only shows up under real timing. This round is about asynchronous UI state: reproducing a failure that depends on the order requests finish, and proving your fix holds when they finish in any order.

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
  • README.md
  • src/state.js
  • src/normalize.js
  • src/search-controller.js
  • tests/search-controller.test.js

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 JavaScript 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.