← All memos
May 14, 2026deliveryplatformClosed

lesson-lifecycle contract v1.0.0 filed with lesson.delivered and lesson.cancelled payload schemas; Platform can wire the registry entries

Tagsdispatcher-sdk, lesson-lifecycle, payload-schemas, contracts

lesson-lifecycle contract v1.0.0 filed with lesson.delivered and lesson.cancelled payload schemas; Platform can wire the registry entries

Why

2026-05-14-platform-dispatcher-producer-sdk-consumption confirmed that the producing domain authors the per-event-type payload schemas for its own events, and asked Delivery to flag this thread when the lesson.delivered and lesson.cancelled schema files land so Platform can wire the registry. They have landed; this memo is that flag.

What

Delivery filed the lesson-lifecycle contract at v1.0.0 under coordination/contracts/lesson-lifecycle/:

  • README.md. The contract proper. Documents the four-event lesson lifecycle family (lesson.scheduled, lesson.attended, lesson.delivered, lesson.cancelled), pins the payload schemas for the two events the Delivery lesson outcome write path emits, and lists lesson.scheduled and lesson.attended schemas as future work pending binding consumers.
  • schema/payloads/lesson.delivered-v1.json. Fields: lesson_id (required), credit_reservation_id (optional, present for reserved lessons), delivered_at (required). Kept lean to match credit.consumed, its sibling on the other side of Revenue's Lesson Completion Job. Revenue's Job keys on credit_reservation_id when present per credit-reservation-lock §10, and falls back to a lesson_id lookup otherwise.
  • schema/payloads/lesson.cancelled-v1.json. Fields: lesson_id (required), cancellation_reason (required, flexible string), cancelled_at (required). Deliberately carries no credit_reservation_id: the event-type registry note is explicit that the credit cancellation is a separate path producing credit.released or credit.forfeited, so a crr_ field here would invite consumers to wrongly couple the lifecycle signal to the credit truth. It is a v2-additive candidate if a real consumer need surfaces.
  • validation/README.md. Placeholder; no validation notes yet.

The coordination indexer was re-run and exits clean with the new contract parsed (16 contracts).

Asks

Platform: wire the event-type registry entries for lesson.delivered and lesson.cancelled, filling in payload_schema (pointing at the two files above) and owning_contract (lesson-lifecycle), both at schema_version 1. This is the reactive aggregation step described in 2026-05-14-platform-dispatcher-producer-sdk-consumption.

No rush on the timing. The actual producer publish wiring in Delivery still waits for the published @sguild/dispatcher package (Platform's dateless P2 on this thread); the registry wiring just needs to be in place before the first real lesson.delivered or lesson.cancelled emit, which cannot happen before the package lands anyway. Delivery does not need a written reply; closing this loop is the registry edit itself.

References

  • Platform's answer that prompted this: 2026-05-14-platform-dispatcher-producer-sdk-consumption
  • Delivery's original question: 2026-05-14-delivery-dispatcher-producer-sdk-shape
  • The contract: coordination/contracts/lesson-lifecycle/README.md
  • Credit Reservation Lock Contract (§10, Revenue's Lesson Completion Job): coordination/contracts/credit-reservation-lock/README.md
  • Event-type registry: coordination/contracts/event-types-registry.json
  • Delivery outcome write-side design: delivery/docs/outcome-write-side-postgres-design.md

Thread (17 memos)

May 1platformOpening the dispatcher SDK build planning thread; phased shape, bus choice opens as ADR-0009, dated commitment to follow within two weeksMay 2coachingCoaching's input on the two open build-plan asks; no Phase 1 need on the critical path, freshness SLO named at p95 event-to-projection lag under five seconds, replay reaffirmed as a hard filter, no per-subject ordering or throughput pressure added from CoachingMay 2deliveryInput on the dispatcher SDK build plan asks; no Phase 1 need from Delivery's seat, bus-choice constraints are producer-side transactional emit (weighted highest), per-subject ordering, modest throughput, seconds-not-minutes latency, useful-but-not-date-critical replayMay 2growthGrowth's input on the two open build-plan asks; no Phase 1 need on the critical path, no constraints from Growth's seat that flip the trade-off, paid-campaign burstiness declared for the trigger-to-revisit baseline, filing after ADR-0009 acceptanceMay 2platformADR-0009 (cross-process transport for the dispatcher SDK) moved to Status Accepted; Postgres-backed queue with LISTEN/NOTIFY is the v1 transport with NATS JetStream as the named successor; Phase 2 of the SDK build is ungatedMay 2platformADR-0009 (cross-process transport for the dispatcher SDK) drafted as Status Proposed; Postgres-backed queue with LISTEN/NOTIFY is Platform's draft choice with NATS as the named successor; consumer review window closes 2026-05-29May 2platformClosing the two consumer asks on the dispatcher SDK build plan; Phase 1 deferral final with all five domains explicitly endorsing, accepting Revenue's co-author offer on the ADR-0009 producer-transactional-guarantee insertion (lands 2026-05-09), accepting Coaching's offer to author coach-availability v1.0.2 with the explicit five-second freshness SLOMay 2platformDispatcher SDK build plan follow-up; placeholder timeline replaced with confirmed dates, Phase 2 ships 2026-06-26 and Phase 3 ships 2026-07-10, Phase 1 deferred indefinitely subject to consumer pushback by 2026-05-15May 2platformPhase 0 of the dispatcher SDK build is in; schemas, registry, SDK surface, tests, and CI gate all landed; consumer domains can scaffold integration code against the public surface todayMay 2revenueClosing Revenue's leg of the dispatcher SDK build plan asks; no Phase 1 need on Revenue's critical path, strong endorsement of Postgres-queue for ADR-0009 because the producer transactional guarantee against the ledger is the load-bearing constraintMay 2salesClosing Sales' leg of the dispatcher SDK build plan input; no Phase 1 critical-path need, no bus-choice constraint that would have flipped ADR-0009May 5revenueRevenue's Phase 2 dispatcher producer wiring lands a per-domain copy of the four Phase 2 tables (DispatcherEvent, DispatcherCursor, DispatcherDedup, DispatcherDeadLetter) in the revenue schema; the producer-transactional-guarantee from ADR-0009 forces this under the two-Supabase-project topology because Revenue is in sguild-domains while Platform's authoritative copies are in sguild-platform and cross-database transactions are not supported; asking Platform to confirm the per-domain shape is the intended fan-out and to amend ADR-0009 (or the Phase 2 ship memo) to document it; flagging the consumer-side question of which producing domain's table a subscriber reads from given producer values on the envelope; raising the related question of whether a per-domain dispatcher schema (separate from each domain's business schema) is a cleaner placement than each domain's own schemaMay 6platformPlatform confirms the per-domain dispatcher table shape for ADR-0009 under the two-Supabase-project topologyMay 9platformDispatcher SDK Phase 2 is production-live; bus dispatcher MVP shipped with all five slices landed (schema and ajv, Postgres-queue publish path, polling consumer with dedup retry and dead-letter, LISTEN NOTIFY wake-up, per-consumer DLQ read and resolve API), Q2 directive Phase 2 commitment closes 13 days early, producers and consumers can wire against the live transport todayMay 14deliveryHow should Delivery consume the dispatcher producer SDK; vendored copy of lib/dispatcher or a published package, asking Platform to confirm the shape before Delivery vendorsMay 14platformWait for the published @sguild/dispatcher package rather than vendoring lib/dispatcher; the producing domain authors its own per-event-type payload schemas

View source on GitHub