Case #2Appointments can be booked on past dates with no error
- The case
- The scene
- Evidence
- Verdict
- Repair
- Back to the scene
- Closed
🎬 The case, reconstructed
Kane's office in 3D · this case's real evidence · plays by itself, under a minute🧷 The evidence board
I saw the fix with my own eyes.
hi. my receptionist booked mrs aisha for 3 march 2025 by accident (we meant 2027) and the system just saved it?? no warning nothing. it should not let us book in the past right. we are sunrise clinic
A Sunrise Clinic receptionist booked an appointment for patient Aisha on 3 March 2025, a date in the past, and the app saved it without any warning or error.
The browser agent logged in, booked Aisha Rahman for 3 March 2025 at 10:00, and the app saved it without any warning. The appointment then showed on her patient page, so the app do
- date.fromisoformat(appt_date)+ if date.fromisoformat(appt_date) < date.today():+ errors.append("The appointment date cannot be in the past. The appointment was not saved.")
Kept on file: bug-20261113-112727
🗺️ The scene map · each room is a page Kane really visited, in the order he went
Kane's first visit
-
1Login
/login- I went to /login.
- I typed the test email into Email.
- I typed the test password into Password.
- I clicked Log in with email and password.
-
2Patients
/patients- I waited to see what the page did.
- I clicked Appointments link in navigation.
-
3Appointments
/appointments- I clicked + Book appointment link to open new appointment booking page.
-
4Appointments · New
/appointments/new- I picked Aisha Rahman in Patient.
- I typed 2025-03-03 into Date.
- I typed 10:00 into Time.
- I clicked Book appointment.
-
5Patients · #3
/patients/3- I looked closely: The appointment was not saved.
- I checked: The app shows an error saying the date is in the past and the appointment was not saved.
Back at the scene, after the repair
-
1Login
/login- I went to /login.
- I typed the test email into Email.
- I typed the test password into Password.
- I clicked Log in.
-
2Patients
/patients- I clicked Appointments in the top navigation.
-
3Appointments
/appointments- I clicked + Book appointment link in Appointments header.
-
4Appointments · New
/appointments/new- I picked the patient named Aisha Rahman from the Patient dropdown.
- I typed the date 2025-03-03 into the Date field.
- I typed 10:00 into the time field.
- I clicked Book appointment button in the form.
- +2 more
🎞️ Watch Kane solve this case
24 moments · about 29 s · Kane's real screens🕵️ Kane:
The witness statement
hi. my receptionist booked mrs aisha for 3 march 2025 by accident (we meant 2027) and the system just saved it?? no warning nothing. it should not let us book in the past right. we are sunrise clinic
Claude's reading of the case
A Sunrise Clinic receptionist booked an appointment for patient Aisha on 3 March 2025, a date in the past, and the app saved it without any warning or error.
At the scene Past appointment date is accepted and saved
assert: The app shows an error saying the date is in the past and the appointment was no
“The form did not reject the 3 March 2025 appointment date. After booking, the patient page shows the 03 Mar 2025 · 10:00 appointment, and no past-date error is shown.”
The scene, before and after the repair · same steps, same detective · drag to compare
❌ Before
✅ After
Before: Final verification failed: "The app shows an error saying the date is in the past and the appointment was not saved."
After: Objective completed
The repair · by Claude, attempt 1 of 3
The app was saving bookings on any valid date, including dates that had already passed, so the 3 March 2025 booking went through with no warning. I added a check in `validate_appointment` (`app.py:247`) that turns down dates before today. The booking form now stays open with "The appointment date cannot be in the past. The appointment was not saved." and nothing is saved.
--- a/clinic/app.py+++ b/clinic/app.py@@ -244,7 +244,8 @@ def validate_patient(full_name: str, date_of_birth: str) -> list[str]: def validate_appointment(appt_date: str, appt_time: str) -> list[str]: errors = [] try:- date.fromisoformat(appt_date)+ if date.fromisoformat(appt_date) < date.today():+ errors.append("The appointment date cannot be in the past. The appointment was not saved.") except ValueError: errors.append("Please choose a valid date.") try:
📁 Kept on file: Kane's steps are saved as bug-20261113-112727. 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
- 2026-11-13 14:29 · ✅ still closed
- 2026-11-13 14:27 · ✅ still closed
- 2026-11-13 14:14 · ✅ still closed
- 2026-11-13 14:11 · ✅ still closed
- 2026-11-13 14:08 · 🔁 REOPENED: The app saved the 03 Mar 2025 10:00 appointment instead of showing a past-date error.
- 2026-11-13 14:06 · 🔁 REOPENED: The application saved an appointment for 03 Mar 2025 at 10:00 instead of rejecting the past date.
Reply to the user
Thanks for telling us! We followed your exact steps and saw the same problem, and it's fixed now. The app should refuse to book an appointment on a past date. It should show an error such as 'appointment date cannot be in the past' and not save the booking. 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
## Appointments can be booked on past dates with no error **Steps** 1. Log in to the clinic app as a Sunrise Clinic user 2. Go to Appointments and click '+ Book appointment' 3. Select patient 'Aisha Rahman' 4. Set the date to 2025-03-03 and the time to 10:00 5. Click 'Book appointment' **Expected:** The booking is refused, the user stays on the form, and an error such as 'Appointment date cannot be in the past' is shown. Nothing is saved. **Actual:** The form is accepted and the user is redirected (POST /appointments/new returns 303). The patient page then shows a saved appointment on 03 Mar 2025 · 10:00, and no error or warning appears. Reproduced by Kane CLI (Bug Whisperer report 20261113-112727).
📁 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 page for booking a new appointment. Select the patient named Aisha, set the date to 2025-03-03 and the time to 10:00, then click the button to book or save. Store what the page shows after that as 'what_happened'. Verify that the app shows an error saying the date is in the past and the appointment was not saved.
Every screen at the scene
I went to http://127.0.0.1:8001/login.
queued plan (3 steps): type "Email"; type "Password"; click "Log in"
I typed the test email into Email.
queued plan (2 steps): type "Password"; click "Log in"
I typed the test password into Password.
I clicked Log in with email and password.
I waited to see what the page did.
I clicked Appointments link in navigation.
I clicked + Book appointment link to open new appointment booking page
queued plan (4 steps): select "Patient"; type "Date"; type "Time"; cli
I picked Aisha Rahman in Patient.
I typed 2025-03-03 into Date.
I typed 10:00 into Time.
I clicked Book appointment.
I looked closely: The appointment was not saved.
I checked: The app shows an error saying the date is in the past and t
Kane CLI: 39 credits · 119 s · open in TestMu AI