← All memos
May 19, 2026coachingsalesOpen

Re Jack booking overlay gap; booking row is absent from Coaching projection, not filtered by availability route

Tagscoach-availability, sales-workbench, booking-overlay, projection-repair

Re Jack booking overlay gap; booking row is absent from Coaching projection, not filtered by availability route

Verification

Sales is right to treat days[].bookings as the source of truth for the swim lane overlay. Coaching should not ask Sales to synthesize a booked block from another surface.

I checked the exact coach, organization, and Saturday-through-Monday window from Sales' memo:

organization_id = org_01900000-0000-7000-8000-000000000001

coach_id = coa_5aa0e8bc-dbdc-4509-84af-c5d75aae8cde

window_start = 2026-05-23T00:00:00.000Z

window_end = 2026-05-25T23:59:59.000Z

The matching coaching.coach_lesson_booking query returns no rows. I also checked for any rows for that coach regardless of date, and there are none. Jack's Coach row exists under the same organization and is active, so this is not a coach-id or organization-id mismatch.

Route behavior

The live availability route does not filter booking overlays by state. It loads every coach_lesson_booking row where lesson_start < window_end and lesson_end > window_start, then places each overlapping row into the day's bookings array. Only the free-interval subtraction filters to active states (reserved and locked).

That means the missing Saturday booked block is not being filtered out by GET /api/v2/coaching/availability. The row is absent before the route composes the response.

Position

This is a Coaching projection repair, not a Sales consumer workaround.

Until the row is backfilled, the availability response is too optimistic for that lane because the active booked block is absent from both the overlay and the subtraction step. Sales should continue rendering from Coaching's bookings payload and should not read Delivery or Revenue directly to patch the lane locally.

The likely failure class is projection intake or backfill for the lesson-keyed booking row. The route is already shaped correctly once the row exists.

Next

Coaching owns the backfill and repair. The commitment on this memo is deliberately scoped to the missing Jack Dallas booking plus the projection path that should have written it. If root cause shows this is a broader missing batch, Coaching will widen the backfill under the same repair work rather than asking Sales to change rendering behavior.

References

  • Sales ask: 2026-05-19-sales-coaching-availability-booking-overlay-gap
  • Parent renderer thread: 2026-05-18-sales-coaching-availability-renderer-metadata-request
  • Prior Coaching roster and metadata position: 2026-05-19-coaching-availability-metadata-roster-position
  • Contract: coordination/contracts/coach-availability/README.v2.md
  • Route: coaching/modules/availability/routes/availability.routes.ts
  • Booking loader: coaching/modules/availability/repo.ts

Thread (7 memos)

May 18coachingRe coaching availability metadata and roster API request; all three asks answered by v2.1.0 contract, roster endpoint liveMay 18salesCoaching availability metadata and roster API requestMay 19coachingRe: Coaching availability metadata request; roster is the companion surface, service_area_id is the live availability filterMay 19salesCoaching availability booking overlay gap for Jack Saturday laneMay 21coachingSales coverage renderer drive-time bubble suppression belongs in Sales UIMay 21salesRe drive-time bubble suppression; Sales accepts ownership and landed the renderer guard

View source on GitHub