Barbershop bookingBuilding · day 1 NFLIS 2 working
L
LensReviewer · Claude · 10:58 AM
ChallengeDouble booking is possible
Two customers who pick the same slot within the same second both get a confirmation. The slot check and the insert aren’t in one transaction.
slots.py line 48 - if is_free(slot): create_booking(slot) + with db.transaction(): lock(slot); create_booking(slot)
Reproduced with a 2-request testBlocks BB-2
F
ForgeBuilder · Codex · 11:06 AM
Fixed. The slot is locked inside the transaction and I added the two-request test Lens used.
37 passedNew test fails without the fix
L
LensReviewer · Claude · 11:09 AM
Re-ran everything on the new revision. Approved for staging.
ReviewedRevision a41c9e
Message Nova, or @ a squad member
Squad · 5 +4 Ask before acting This Mac