What happened
It's not a bug. These are two decisions nobody made: what happens when two people want the same thing, and what happens when half an action succeeded. The system decided for you, silently, and you found out the answer at a customer's.
The AI built exactly what you described: a calendar, a booking, a payment, a confirmation. About what you didn't describe, it didn't ask. And nobody describes concurrency, because in the demo there's one customer.
The decision. Three answers, three prices.
First one wins
A lock on the slot at the moment of the click. Whoever arrived second sees "taken" before paying.
The price. Simple and clear. But whoever started filling in details and lost the slot midway gets annoyed. You need to decide what they see, and when.
A one-minute hold
The slot is held from the moment it's chosen, for a set time. Unpaid, it's released.
The price. Pleasant for the customer. Requires a "held" state with an expiry, and someone who releases it. And it opens a question: what happens when the hold expires exactly during payment.
Both, and sort it out manually
Accept both bookings, and whoever runs the place sorts out the double booking.
The price. You don't lose any booking, and it fits when there's flexibility in the place. But someone gets an apologetic phone call, and someone else does manual work. And a system that decided nothing behaves exactly like this, only without the phone call.
There is no right answer. There is an answer someone made, and an answer the system made for them.
What the decision leads to
One decision, five places. This is what changes in each of them, whichever answer is chosen.
The lockOn the server, in one place. Not in a check on the client side, which doesn't see the other customer.
All or nothingPayment and booking are one action. If one fails, the other is cancelled. Otherwise: money without a booking, or a booking without money.
What the customer sees"Taken", "held", "paid". Three screens, three messages.
What was promised to the secondA confirmation that was sent is a promise, and a charge that was made needs a refund. How long you hold a spot and what the message says can change tomorrow. What was already sent to whoever arrived second can't.
Who gets the phone callWhen it happens anyway, and it will, who knows, and who fixes it.
What was proven, and what not yet
This is how you know it holds:
A test that runs two customers on the same slot and sees one booking
A payment that went through without the booking being recorded: refunded automatically, or the booking is completed. Never left in the middle
An expired hold releases the slot, even without anyone clicking
Whoever arrived second gets exactly what was decided: a message, a refund or an alternative. Not a confirmation that's later cancelled
Without the decision, this is what hasn't been proven yet. With the decision, this is the handover verification list.
Who decides
The decision on "who wins" belongs to the business owner. The decision on "all or nothing" belongs to whoever builds, and it doesn't have two options: it's a must. What's left to decide is who checks that it really exists, before a customer checks it for you.