noCV
CAL-102 · Represent time and availability

Merge overlapping busy intervals before offering slots

Practice briefTaskFoundational

Two overlapping provider events produce a false free gap between them. Normalize busy intervals and apply the agreed booking duration and buffer.

Focused work estimate
1h 15m + prerequisites
Priority in the scenario
Medium
Engineering practice
Interval arithmetic · Boundary tests · Scheduling

Estimated field mix

  • Backend60%
  • Integrations40%

Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.

Your next step

Review it, then add it to your workspace.

The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.

Project context

A fictional consultancy books appointments across time zones. The first connector duplicates events after timeouts and offers slots during stale calendar sync. Use a local calendar-provider double and synthetic calendars.

Setup prerequisites

  • Create a local provider double for free/busy, event creation, updates, cancellation, and expiring tokens.
  • Use synthetic calendars and an injected clock; no calendar account or outgoing invitation is required.

Preceding work

Complete these dependencies, or supply their agreed outputs before taking this ticket.

Acceptance criteria

  • Overlapping and adjacent intervals merge according to documented half-open boundaries.
  • Offered slots fit completely within working hours after pre/post buffers are applied.
  • Zero-length or reversed provider intervals are rejected as malformed input.

Implementation constraints

  • Keep interval calculations in UTC; convert working-hour boundaries from the declared zone.

Verification to include

  • Merge 09:00-10:00 and 09:30-10:30 and confirm no slot appears at 10:00.
  • Test a slot ending exactly at closing time with and without a post-booking buffer.

Deliverables

  • Interval normalizer and slot boundary examples

Rollout and recovery

Compare new slot output with fixture expectations in preview mode before exposing booking actions.

Value of the work

For the engineer: Practice time modeling, conflict-safe booking, external state reconciliation, and credential lifecycle boundaries.

For the team: Review whether integration work protects appointment correctness and offers clear recovery when a provider is uncertain.

Evidence boundaries

Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.

Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.