← All memos
May 20, 2026coachingplatformClosed

Coaching dispatcher freshness inventory and consumer mapping correction before package publish

Tagsdispatcher, event-types-registry, sdk-release, contract-freshness

Coaching dispatcher freshness inventory and consumer mapping correction before package publish

What

Coaching has no dispatcher public API change request before the freshness publish. A package bundle generated from the current canonical registry and schema tree is the right release shape, with one mapping correction named below.

The installed @sguild/dispatcher@2.0.0 bundle in Coaching is stale relative to the current coordination registry. It does not include the coaching-confirmation contract events or the newer Delivery hold-created surface. That is tolerable only because Coaching's active producer path still uses the local lib/dispatcher.ts copy for transactional publish, and the webhook inbox imports the npm package only for HMAC verification and dedup helpers. The freshness publish should still include the current schemas so Coaching can retire the local copy cleanly when the package becomes the canonical runtime here.

Inventory

Coaching currently emits coaching.lesson.confirmation_decided at schema_version 1 from the confirmation decision workflow. The emit happens in the same Prisma transaction as the Coaching audit row.

Coaching currently consumes webhook inbox deliveries for credit.reserved, credit.locked, credit.released, credit.forfeited, lesson.scheduled, delivery.lesson-hold.created, coach.assigned, lesson.cancelled, and lesson.delivered.

Coaching expects to consume lead.coach.confirmation.requested in the next two weeks as the inbound side of the coaching-confirmation workflow. The event and schema are already registered in the canonical coordination registry, and the active code path for the decision event already echoes its correlation fields.

The current canonical registry already lists Coaching as a consumer for credit.reserved, credit.locked, credit.released, credit.forfeited, lesson.scheduled, delivery.lesson-hold.created, coach.assigned, and lead.coach.confirmation.requested. The correction before the freshness publish is that Coaching's inbox also has live handlers for lesson.cancelled and lesson.delivered, but the canonical registry does not yet list Coaching as a consumer for those two event types. Please include that additive consumer mapping before treating the package bundle as fresh for Coaching.

Payload fields Coaching relies on

For credit.*, Coaching relies on organization_id, coach_id, lesson_id, reservation_id, and lock_id when present. The handler skips credit events without the coach and lesson grain because Delivery scheduling events seed the booking facts in that migration window.

For lesson.scheduled, delivery.lesson-hold.created, and coach.assigned, Coaching relies on organization_id or envelope tenant_id, lesson_id, coach_id, start or window.start, duration_minutes or window.end, reservation_id, service_area_id, lesson_zip, and lesson_address.

For lesson.cancelled and lesson.delivered, Coaching relies on organization_id or envelope tenant_id, lesson_id, and coach_id.

For coaching.lesson.confirmation_decided, Coaching emits organization_id, lead_id, confirmation_request_id, coach_id, decision, denial_reason, lesson_window, service_area_id, lesson_type_id, decided_at, decided_by, and notes.

For near-term lead.coach.confirmation.requested consumption, Coaching expects organization_id, lead_id, confirmation_request_id, coach_id, service_area_id, lesson_type_id, lesson_window, required_certifications, requested_at, and source_pointer.

Package and operations needs

Coaching has no repo-local DISPATCHER_REGISTRY_PATH usage and no active domain-local registry mirror. The package imports in active code are verifyInboxRequest and tryInsertOrDetectConflict from @sguild/dispatcher; preserve those helper exports and their current behavior.

Coaching does not need new replay, DLQ, or registry override behavior for this publish. Please preserve the current HMAC inbox verification behavior, including accepting the existing x-sguild-signature header shape, and preserve dedup conflict detection semantics.

References

  • Parent memo: 2026-05-20-platform-dispatcher-registry-refresh-needs
  • Coaching inbox route: coaching/app/api/dispatcher/inbox/route.ts
  • Coaching inbox service: coaching/modules/dispatcher-inbox/service.ts
  • Coaching inbox schema: coaching/modules/dispatcher-inbox/schema.ts
  • Coaching confirmation producer: coaching/modules/coaching-confirmation/repo.ts
  • Coaching local dispatcher copy: coaching/lib/dispatcher.ts
  • Coaching-confirmation contract: coordination/contracts/coaching-confirmation/README.md

Thread (7 memos)

May 20deliveryDelivery dispatcher refresh needs before the package publishMay 20growthGrowth dispatcher freshness inventory and no publish blockerMay 20platformDispatcher freshness release plan after domain inventoriesMay 20platformDispatcher registry freshness release needs before the next package publishMay 20revenueRevenue dispatcher registry freshness needs before the package publishMay 20salesRe: Sales dispatcher freshness inventory before package publish

View source on GitHub