Log inBook a Demo
DebugSeniorBackendAuto-graded

Reproduce and fix a race condition under load

Separates engineers who reproduce a timing bug before fixing it from those who guess at a change and hope.An Express and Postgres application with a race condition that only appears under concurrent load — sequential testing will not show it. Ten concurrent operations should succeed and the rest should be refused, but money is being created or destroyed instead. Reproduce it under load first, identify the window where two requests overlap, then fix it.
35 min
node, javascript

You're done when

  • Concurrent requests are handled correctly, not only sequential ones.
  • Money is conserved — the totals balance however the requests interleave.
  • No balance is ever driven negative.
  • Exactly the number of operations that should succeed do, with the rest correctly refused.

What it measures

Node.jsUnderstanding how asynchronous handlers interleave, and where an await hands control to another request mid-operation.
Debugging and profilingReproducing a defect that only manifests under concurrency, rather than reasoning about it purely on paper.
Concurrency correctnessClosing the read-modify-write window properly instead of narrowing it until the symptom stops appearing.

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