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.jsis 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
- Reproduce the failing behavior by reading the docs and running the tests.
- Investigate the failures and make a focused fix in the reconciliation lookup.
- Run tests to verify your change.
- 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.mdREADME.mdsrc/reconciliation.jssrc/ledger.jstests/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.
Related rounds
View all debugging rounds- EasyBug fix
Peak latency report overstates one endpoint
The per-endpoint peak latency report shows one endpoint far slower than its own traces support, and a latency regression review is stuck on the discrepancy.
Python · 40 min
- EasyBug fix
Monitor board reads OK for a series whose exporter went silent
The monitor status board on-call watches during an incident reports OK for a series that sent no samples all window, so a blind monitor is indistinguishable from a healthy one and on-call stopped trusting the board.
Python · 40 min
- EasyBug fix
Reliability rollup over-reports one service's ERROR count
The nightly per-service ERROR-line rollup reports more errors for one service than the metering dashboard, so the on-call engineer cannot trust it.
Python · 30 min