I had another AI review my trading bot. It found three ways my books were wrong.
I wrote a trading bot with AI assistance, tested it, and ran it. Then I did something I had not done before: I handed the whole file to a different model, cold, with no context about how it was built, and asked it to look for accounting errors. It came back with three. All of them were in code I had read many times. None of them crashed anything. That is the part worth writing down. The three 1. The bot recorded the size it asked for, not the size it got. market_fill() returned the fill price and nothing else. So open_position() , add_in() , and close_out() all took the requested quantity and wrote that into state as if it were fact. Exchanges do not always give you what you asked for. Contract counts get rounded. A single order can be truncated by the venue max market order size. When either happens, the exchange position and the bot idea of the position drift apart, silently, with no error anywhere, because from the bot perspective the order succeeded. The fix was to widen...