Skip to main content
EasyBug fixJavaScript15 min

Warm-up: the adjustment matcher pairs money that's already settled

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

Welcome to the CodeSparring bugfix workspace.

Incident Report

Finance support approves a manual invoice adjustment when the review queue shows two ledger rows that explain it. On Tuesday the queue explained adjustment adj_88213 with a row that had already been consumed by last week's adjustment. Support approved it, and that account's ledger now double-counts the row. A second case was caught in review the same day. Most adjustments in the queue still reconcile normally.

Artifacts

  • The reconciliation contract and ledger row shape are in README.md.
  • The editable lookup logic is in src/reconciliation.js.
  • src/ledger.js is a shared helper used by the tests and should be treated as read-only.
  • Visible regression coverage is in tests/reconciliation.test.js.

Your Task

  1. Reproduce the failing behavior by reading the docs and running the tests.
  2. Investigate the failures and make a focused fix in the reconciliation lookup.
  3. Run tests to verify your change.
  4. Explain what caused the bug and how you would prevent it in the conversation.

What this round practices

A short warm-up built on a finance review queue, where a wrong match costs real money. It is a good first round if you have never debugged with an interviewer listening: the code is small, so the round is about narrating what you check and why before you touch anything.

Files you will work in

These 5 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/reconciliation.js
  • src/ledger.js
  • tests/reconciliation.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 15 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.