Bug Whisperer Browser-verified
Live demo. The clinic sample app starts every case as the AI first built it, bugs included. Every case runs Kane CLI for real. Judges: unlock live cases →
← Case files · Clinic Records · opened 2026-11-13 12:43

Case #3Two patients can be booked into the same appointment slot

  1. The case
  2. The scene
  3. Evidence
  4. Verdict
  5. Repair
  6. Back to the scene
  7. Closed
Case closed Kane saw the bug, Claude repaired it, and Kane went back to the scene and saw the fix with its own eyes.

🎬 The case, reconstructed

Kane's office in 3D · this case's real evidence · plays by itself, under a minute

🧷 The evidence board

KANE

I saw the fix with my own eyes.

Witness statement

we have 2 patients booked at 10:00 tomorrow?? how did the system allow that. sunrise clinic. the 2nd one should be blocked

Claude's reading

A Sunrise Clinic user booked one patient at 10:00 tomorrow, then booked a second patient at the same 10:00 slot, and the app accepted both instead of blocking the second one.

Kane at the scene
Kane at the sceneI checked: The second booking was refused with a message that the 10:00 slot tomorrow is already taken.
Confirmed

The agent booked Aisha Rahman for tomorrow at 10:00, then booked James Carter for the same date and time. The app accepted the second booking and opened James Carter's patient page

Claude's repair · attempt 1
+        if not errors and conn.execute(+            "SELECT 1 FROM appointments WHERE clinic_id = ? AND date = ? AND time = ?",+            (clinic["id"], form["date"], form["time"]),+        ).fetchone():+            errors.append(+                f"The {form['time']} slot on {form['date']} is already taken. "
Kane, back at the scene
Kane, back at the sceneI checked: The second booking was refused with a message that the 10:00 slot tomorrow is already taken.
Case closed

Kept on file: bug-20261113-124324-d930-fixed-date

🗺️ The scene map · each room is a page Kane really visited, in the order he went

Kane's first visit

  1. 1Login /login
    • I went to /login.
    • I typed the test email into Email.
    • I typed the test password into Password.
    • I clicked Log in button.
  2. 2Patients /patients
    • I clicked Appointments in the top navigation.
  3. 3Appointments /appointments
    • I clicked Book appointment in the top-right corner.
  4. 4Appointments · New /appointments/new
    • I picked Aisha Rahman in the patient dropdown.
    • I typed 2026-11-14 into the Date field.
    • I typed appointment time 10:00.
    • I clicked Book appointment for tomorrow 10:00 for the first patient.
  5. 5Patients · #3 /patients/3
    • I waited to see what the page did.
    • I clicked + Book to open the appointment booking page again.
  6. 6Appointments · New /appointments/new?patient_id=3
    • I picked James Carter in Patient.
    • I typed 2026-11-14 into Date.
    • I typed 10:00 into Time.
    • I clicked Book appointment.
  7. 7Patients · #2 /patients/2
    • I waited to see what the page did.
    • I checked: The second booking was refused with a message that the 10:00 slot tomorrow is already taken.
    🔴 Clue: the bug

Back at the scene, after the repair

  1. 1Login /login
    • I went to /login.
    • I typed the test email into Email.
    • I typed the test password into Password.
    • I clicked Log in button.
  2. 2Patients /patients
    • I clicked Appointments in the top navigation.
  3. 3Appointments /appointments
    • I clicked Book appointment for the first patient at 10:00 tomorrow.
  4. 4Appointments · New /appointments/new
    • I picked Aisha Rahman in the Patient dropdown.
    • I typed the date in the booking form and submitting the appointment.
    • I typed 10:00 into the Time field.
    • I clicked Book appointment to submit the first patient booking.
  5. 5Patients · #11 /patients/11
    • I clicked Appointments in the top navigation again.
  6. 6Appointments /appointments
    • I clicked Book appointment for the second patient on tomorrow at 10:00.
  7. 7Appointments · New /appointments/new
    • I picked James Carter as the second patient.
    • I typed 2026-11-14 in the Date field for booking.
    • I typed 10:00 in the appointment time field.
    • I clicked Book appointment for the second patient tomorrow at 10:00.
    • +1 more
    🟢 Fixed: Kane saw it

🎞️ Watch Kane solve this case

24 moments · about 29 s · Kane's real screens
Kane's screen

🕵️ Kane:

The witness statement

we have 2 patients booked at 10:00 tomorrow?? how did the system allow that. sunrise clinic. the 2nd one should be blocked

Claude's reading of the case

A Sunrise Clinic user booked one patient at 10:00 tomorrow, then booked a second patient at the same 10:00 slot, and the app accepted both instead of blocking the second one.

At the scene Duplicate appointment slot is accepted

What Kane saw

assert: The second booking was refused with a message that the 10:00 slot tomorrow is al

🕵️ Detective Kane's notes

“The booking check did not stop an appointment from being added when that date and time were already occupied.”

The scene, before and after the repair · same steps, same detective · drag to compare

Before the repair After the repair ❌ Before ✅ After

Before: Final verification failed: "The second booking was refused with a message that the 10:00 slot tomorrow is already taken."

After: Objective completed

The repair · by Claude, attempt 1 of 3

The booking form never checked whether the clinic already had an appointment at the chosen date and time, so a second 10:00 booking for tomorrow was saved. In `app.py` (`appointment_create`), the app now looks for an existing appointment at that slot before saving. If it finds one, it doesn't save and shows the form again with "The 10:00 slot on <date> is already taken. Please choose another time. The appointment was not saved."

--- a/clinic/app.py+++ b/clinic/app.py@@ -606,6 +606,14 @@ def appointment_create(             errors.insert(0, "Please choose a patient.")         else:             form["patient_id"] = patient["id"]+        if not errors and conn.execute(+            "SELECT 1 FROM appointments WHERE clinic_id = ? AND date = ? AND time = ?",+            (clinic["id"], form["date"], form["time"]),+        ).fetchone():+            errors.append(+                f"The {form['time']} slot on {form['date']} is already taken. "+                "Please choose another time. The appointment was not saved."+            )         if errors:             ctx = _appointment_form_context(conn, clinic, form, errors)             return render(request, "appointment_form.html", status_code=400, **ctx)

📁 Kept on file: Kane's steps are saved as bug-20261113-124324-d930-fixed-date. Kane can revisit this scene in about 20 seconds after any change, so this bug can't sneak back.

📁 Kane revisits this scene · after code changes, before Claude may finish

  1. 2026-11-13 14:29 · ✅ still closed
  2. 2026-11-13 14:27 · ✅ still closed
  3. 2026-11-13 14:14 · ✅ still closed
  4. 2026-11-13 14:11 · ✅ still closed
  5. 2026-11-13 14:08 · ✅ still closed
  6. 2026-11-13 14:06 · ✅ still closed
Earlier repair attempts (1), kept on file

Didn't get past Kane after 3 attempt(s). Not a wrong fix: the clinic app's auto-reload hung on Windows, so Kane kept testing the old code. Bug Whisperer now restarts the app itself after every fix and resets the test data before every Kane run.

  1. Attempt 1: Kane failed. The booking page allowed another appointment for the same tomorrow 10:00 slot and sent the user to the patient record rather than showing that the slot was unavailable.
  2. Attempt 2: Kane failed. The booking page allowed another appointment at a time that was already listed for the same patient and date. It redirected back to the patient page rather than showing that the slot was unavailable.
  3. Attempt 3: Kane failed. The appointment form did not prevent a duplicate booking for the same patient, date, and time. After submission, the patient page shows multiple 10:00 appointments on 14 Nov 2026 and no refusal message.
📁 Take the case with you. Everything Kane proved, in one report: the statement, his steps and photos, the verdict, the repair and its proof.

Reply to the user

Thanks for telling us! We followed your exact steps and saw the same problem, and it's fixed now. Once a 10:00 appointment exists for tomorrow, the app should refuse to book another patient at that same date and time and show an error saying the slot is already taken. We checked the fix by doing the same steps again, and we'll re-check them after every future change, so it stays fixed.

Bug ticket

## Two patients can be booked into the same appointment slot

**Steps**
1. Log in to Sunrise Clinic
2. Go to Appointments and click Book appointment
3. Pick the first patient (Aisha Rahman), set tomorrow's date (2026-11-14) and 10:00, then click Book appointment
4. Open the booking page again
5. Pick the second patient (James Carter), set the same date (2026-11-14) and 10:00, then click Book appointment

**Expected:** The second booking is refused, with a message saying the 10:00 slot tomorrow is already taken.

**Actual:** The second booking is saved and the app opens James Carter's patient page with no error, so two patients now share the 10:00 slot tomorrow.

Reproduced by Kane CLI (Bug Whisperer report 20261113-124324-d930).
📁 The full case file: Kane's instructions and every screen it saw

Kane's instructions

Go to http://127.0.0.1:8001/login and log in with email {{account1_email}} and password {{account1_password}}. Open the appointment booking page. Book an appointment for the first patient in the patient list on tomorrow's date at 10:00 and submit. Open the appointment booking page again. Book an appointment for the second patient in the patient list on tomorrow's date at 10:00 and submit. Store what the page shows after that as 'what_happened'. Verify that the second booking was refused with a message that the 10:00 slot tomorrow is already taken.

Every screen at the scene

Kane CLI: 44 credits · 147 s · open in TestMu AI