The scenario: find a usable time for two people
An appointment can involve a patient and a companion whose calendars differ from the clinic’s available slots. A useful search should explain which busy times were considered, avoid sending unnecessary event detail and leave final booking to the authoritative appointment workflow. An empty result or an unknown calendar is not the same as a confirmed shared free period.
The pinned Movo-X implementation combines partner coordination, busy-window inputs and clinic slot suggestions. Ten selected local cases passed: four TypeScript cases and six portable Swift cases using synthetic schedules and transports. Selected database and Android source were inspected separately. No real calendar or appointment was accessed.
Send time intervals rather than calendar descriptions
The API accepts availability windows containing start and end values, with a maximum of 200 entries. Selected route cases refuse an extra event-title field, reversed/invalid intervals and a span exceeding seven days. The exact seven-day span and selected 200-window boundary pass. Lifetime input is bounded to integer hours from one to 72.
The Swift transport case inspects a selected request body containing only start/end keys for each interval. Android calendar source separately selects time, all-day and free/busy columns rather than titles or notes. Those observations concern specific serialization and query construction. They do not establish a complete device privacy audit, encrypted retention or the absence of sensitive timing patterns.
Prepare bounded windows before sending them
The selected Swift helper drops empty/reversed ranges, clips to a chosen horizon, sorts, merges overlaps and touching intervals, then splits long ranges into segments of at most seven days. It keeps the earliest 200 prepared segments. Existing fixtures exercise those transformations and their selected bounds.
A supplemental synthetic case checks a smaller clipped/merged example at every integer second in its horizon and verifies repeat preparation gives the same output. That is a local coverage invariant, not proof for every possible calendar. The cap is especially important: valid bounded input can still omit later busy time. Do not represent a truncated set as a complete calendar export.
Keep declared hours tied to the intended time zone
The selected portable fixture expands manually declared weekday hours with a Kuala Lumpur calendar, verifies Monday-to-Friday windows and checks invalid weekday/interval choices. Android controller source uses phone-local dates for declared hours and the clinic zone for the search’s starting day. Those are separate calendar contexts.
A review should preserve the distinction between an instant used for overlap and a local date used to ask for clinic slots. The selected tests do not cover every daylight-saving change, travel between zones or device clock error. Include those cases when defining the supported operating regions and calendar experience.
Explain omitted and explicitly empty busy input
The TypeScript route fixture preserves an explicit myBusy empty list and separately preserves its omission. The inspected SQL selects submitted myBusy when present, otherwise an unexpired stored set, otherwise an empty list. An explicit empty input and an omitted field therefore express different server candidates.
The Swift factory intentionally omits an empty list so the server may reuse stored windows; its existing and supplemental cases check that representation. Android controller source similarly separates NONE, calendar and declared sources and only stores nonempty prepared windows during its selected search path. Treat clearing stored availability as its own explicit operation and product contract, rather than assuming an empty local selection deletes previous data.
Show what the search knows without promising complete coverage
The selected SQL reads unexpired busy sets, iterates a bounded date range, asks for clinic slots and excludes overlaps with the combined candidate windows. It returns at most 20 suggestions. Its interval comparison treats overlap separately from a range merely touching a slot boundary. These database branches were source-reviewed, not executed.
The response includes selected busy-known flags; their calculations differ. The partner flag can recognize an unexpired stored empty set, while the caller flag follows the selected window count. Portable decoding defaults absent flags to false. Neither flag proves that every personal commitment was imported or that a suggested slot will still be free when someone tries to book it.
An attendance proposal does not move an appointment
The API distinguishes accept, decline and propose. Selected local cases require a proposed time only for propose, restrict selected notification channels and forward a response operation with the appointment identifier. The portable Swift factory also checks a proposal window from now through 60 days and deduplicates selected channels.
In the inspected SQL response branch, the companion’s status and proposed time change; that branch does not reschedule the clinic appointment. A proposal is a coordination signal. Actual rescheduling needs the appointment workflow’s current slot, ownership, consent and conflict decision. A successful injected response in a local test does not establish any durable appointment change.
Keep companion participation separate from clinical permission
Selected companion operations receive facility, patient, appointment and partnership identifiers, but those values are not access grants. The inspected SQL requires a trusted session, consults appointment access and active partnership state, and places additional restrictions on adding a companion. It also defines selected retry handling for mutations.
Those branches were not run against a database and are not a complete audit of later installed definitions. A portable convenience rule for showing an add action is also not authoritative permission. The release package needs actual isolated transaction cases for allowed and denied relationships, stale partnerships, removed companions and repeated requests. Notification queue construction remains distinct from delivery.
A practical scheduling handover
Retain the ten scoped cases and source revision. Add isolated database checks for busy-set expiry, explicit clearing, stored fallback, overlap edges, suggestion limits and final booking conflict. Exercise calendar permission refusal, partial input, large calendars, changed search inputs and time-zone changes with controlled native fixtures. Display uncertainty and offer a clear way to update availability.
For a founder or CTO, the goal is a scheduling workflow people can understand and recover. Bounded intervals and typed requests make the selected implementation inspectable. Complete availability, authoritative booking, durable permission and actual calendar/device behaviour remain explicit acceptance responsibilities rather than consequences of seeing a list of suggested times.
Compare the reviewed boundaries
Different scheduling outcomes need different evidence
On smaller screens, scroll across to compare every column. Keyboard users can focus the table and use the arrow keys.
| Outcome | Selected local evidence | Separate acceptance |
|---|---|---|
| Prepared busy set | Merge/clip/split/cap fixtures | Completeness of actual calendar input |
| Time suggestions | Request shape and SQL source | Fresh slots and final reservation |
| Attendance proposal | Factory and respond dispatch | Authorized rescheduling workflow |
| Companion access | Selected access/partnership source | Installed permission and durable replay |
Illustrative control flow
Pseudocode summarizing the decision boundary. It is not copied production code or a deployment instruction.
busy = prepare_bounded_intervals(selected_source, horizon)
suggestions = search_with_documented_stored_or_explicit_busy_input(busy)
show_suggestions_and_what_availability_is_known()
# Proposing attendance does not reserve or reschedule a slot.
book_through_the_authoritative_appointment_workflow()About this engineering series
Written by Omer Muneer Qazi from a review of Movo-X implementation and dated engineering records. This article explains source behaviour and historical observations; current production, clinical outcomes and store availability require their own verification. Examples are synthetic and proposed test cases are identified as such.
Explore the Movo-X engineering series → · Related implementation experience →
Discuss a similar engineering problem
Send the workflow, current platform and the decision your team needs to make. I can help define an implementation or review scope with concrete acceptance evidence.
Discuss your project on WhatsApp ↗