The agent added validation after the write instead of before it
The agent added a guard to reject negative quantity, but placed it after the order was already saved. The standalone guard test went green while invalid rows kept landing in the table. A check that runs after the side effect protects nobody.
Read article