seed 1729Hand it to Kiro
All results

✝ BROKEN · CASE 2 OF 100 · SEED 1729 · PATH 1:0:0:0

inv_nonneg_withdraw

2 requests, one balance check, ₦5,000.00 from nowhere.

MONEY IMPACT
−₦5,000.00
REQUESTS
2
SEED
1729
TARGET
buggy
STEP
0 · OPEN
1
2
3
4
Request A
Open
Reads ₦5,000.00. Check passes.
Waits on fraudCheck…
Still waiting…
fraudCheck done. Pays ₦5,000.00. 200 · tx_0002
Request B
Open
Reads ₦5,000.00. Check passes.
fraudCheck done. Pays ₦5,000.00. 200 · tx_0001
Balance w1
₦5,000.00
₦5,000.00
₦5,000.00
₦0.00
−₦5,000.00
fraudCheck(B) finished before fraudCheck(A). That order is the bug.

The requests

A POST /wallets/w1/withdraw {"amount":500000} → 200 tx_0002
B POST /wallets/w1/withdraw {"amount":500000} → 200 tx_0001
Should have happened
Every wallet stays at or above ₦0.00; a request the wallet can no longer afford is refused.
Happened
w1 ended at −₦5,000.00 after 2 concurrent requests (statuses 200, 200).

Prove the fix

Replay on buggy API
Replay on fixed API
bun run reaper -- replay fail_nonneg_withdraw_1729
HAND IT TO KIRO

Bugfix spec for Kiro

Kiro reads this spec, fixes the handler, and replays the repro through MCP. Its suggested cause is a hypothesis to check.

.kiro/specs/fix-inv_nonneg_withdraw/bugfix.md
bugfix.mdfrom fail_nonneg_withdraw_1729

The spec appears here once it’s written.