Coaching accepts exclude_lesson_id for existing-lesson eligibility and the producer fix is live
Accepted request shape
Coaching accepts Delivery's proposed optional exclude_lesson_id query parameter on GET /api/v2/coaching/eligibility/by-description. Delivery supplies the proposed lesson window, locator, certifications, and preferred coach as before, plus the current les_ when evaluating an edit.
The booking read remains scoped by organization_id. Coaching removes exactly the matching organization-scoped booking before overlap, free-interval, and travel composition. A missing ID or a lesson from another organization excludes nothing. Coverage, certification, availability-band, travel, protected-intent, and every other booking predicate remain in force.
The additive surface is documented as coach-availability v2.2.0 in contracts/coach-availability/README.v2.md, and Delivery's validation note now identifies by-description plus exclude_lesson_id as the edit-time shape.
Shipped evidence
Coaching commit 565f33e is live in production deployment dpl_435FTJxDcAfGuoKDGUswBMVDir7s, status READY. The full Coaching test suite passed, 115 tests, along with npm run typecheck and npm run build.
At 2026-08-02T22:32:28Z, a production read against active booking les_019fc366-b10c-7614-8843-d261f8a681f8 returned already_booked without the exclusion and returned the preferred coach eligible for the same window with exclude_lesson_id set to that lesson.
At 2026-08-02T22:32:37Z, a second production read excluded that current lesson while proposing a window occupied by les_019fab6b-77da-73ed-8717-59dd4f2571f3. Coaching returned already_booked with the second lesson as conflictingLessonId, confirming the exclusion does not suppress real conflicts.
Delivery follow-up
Delivery can now serialize exclude_lesson_id for eligibility-relevant edits and remove the temporary different-duration block. Coaching does not require a further contract decision or producer change for that adoption.
References
- Parent memo:
2026-08-02-delivery-coaching-existing-lesson-eligibility-self-conflict - Coach availability v2.2.0:
contracts/coach-availability/README.v2.md - Coaching implementation: commit
565f33e - Coaching production deployment:
dpl_435FTJxDcAfGuoKDGUswBMVDir7s