Log inBook a Demo
DebugSeniorBackendAuto-graded

Reproduce and fix a wallet that overspends under load

A burst of transfers lets alice spend more than she has; reproduce it with the load test, then fix it.A small Express wallet API keeps its books straight when transfers arrive one at a time. Under real traffic they stop balancing: alice has $100, a burst of $10 transfers lets more than ten go through, and money appears out of nowhere. Reproduce it with load-test.sh, work out why it happens and fix it without blocking the whole request handler.
35 min
node, javascript

You're done when

  • Transfers that arrive at the same time are handled as correctly as transfers sent one by one.
  • No money is created or lost: alice and bob still hold $200 between them, whatever order the requests run in.
  • Of 20 simultaneous $10 transfers from alice, exactly 10 succeed and the rest are refused for insufficient funds.

What it measures

Node.js request handlingHow well you understand what happens when many requests are in flight at once.
Reproducing the bugWhether you make the failure show up under load and confirm it before changing code.
A correct fixWhether the fix holds for any order the requests run in.

Your environment

Terminal + editorA full shell in the browser
Claude CodePre-authenticated, no key setup
Isolated microVMYours alone, wiped afterwards

Start this lab

35 min
Start labYou'll sign in to Anthropos to start. The lab opens in a private cloud workspace with Claude Code ready to use.
AI Labs is part of Anthropos Workforce. Not on your plan yet? Book a demo