Exceptions to recurring schedules override the rule in real time
Why it matters
A recurring schedule exception that does not override the calendar in real time is an invisible lie. The host marks next Monday as closed; the customer sees open slots for next Monday; the booking confirms; the host is unavailable. This ISO 25010 functional-correctness failure occurs when the exception record is stored correctly but the slot generation query does not join against the exceptions table before returning availability. The result is phantom slots: the system thinks it is correctly managing exceptions, but customers book into them anyway.
Severity rationale
Low because the failure requires a recurring-schedule-plus-exceptions setup to trigger, but when it does, it creates confirmed bookings on dates the host explicitly marked unavailable.
Remediation
In your slot generation function (typically src/lib/availability.ts or your availability API route), query exceptions in the same request as the recurring rule and filter before returning results.
// src/lib/availability.ts
export async function getRecurringSlots(recurringId: string, start: Date, end: Date) {
const [rec, exceptions] = await Promise.all([
db.recurringAvailability.findUnique({ where: { id: recurringId } }),
db.availabilityExceptions.findMany({
where: { recurringId, exceptionDate: { gte: start, lte: end } },
}),
])
if (!rec) return []
const blocked = new Set(exceptions.map(e => e.exceptionDate.toISOString().slice(0, 10)))
const occurrences = rrulestr(rec.rrule, { dtstart: start }).between(start, end)
return occurrences.filter(d => !blocked.has(d.toISOString().slice(0, 10)))
}
The exception filter must run synchronously in the slot generation path, not as a background job or deferred reconciliation task.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Calendar & Availability Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- iso-25010:2011 · functional-correctness — Functional Correctness — exceptions must override recurring rules in real time
Taxons
History
- 2026-04-18·v1.0.0·Initial import from booking-calendar-availability·automated