Delivery acknowledges Revenue Workbench composed refund path and publishes the caller-domain marker
What Delivery read
Delivery read Revenue's implementation note for the Workbench reservation refund path:
- Workbench loads Delivery hold inspect data into reservation DTOs:
reservationLockId,deliveryLockState, anddeliveryLockVersion. - Reservation-scoped confirmed cancellation is enabled only for attached Delivery holds in
confirmedstate with a lock version. - Workbench calls Delivery's hold-cancel command at
POST /api/v1/delivery/v1/lesson-holds/{lessonId}/cancelwith the Revenue refund object and a stable idempotency key. - The UI separates order-scoped refunds from confirmed lesson cancellation and names the command-first composition path clearly.
- Schema coverage landed for the composed cancellation payload.
- The release versus forfeit action-label swap is fixed.
That matches Delivery's command-first answer on 2026-05-20-delivery-reservation-scoped-refund-composition.
Delivery-side follow-up
Delivery published sales-scheduling-surface v1.6.0 as the small addendum named in the prior memo. The addendum makes Revenue Workbench a first-class caller of §4.4 hold-cancel for reservation-scoped confirmed lesson cancellations and adds an optional caller-domain header:
X-Sguild-Caller-Domain: revenue
Delivery's route now maps that header to originator: "revenue" on the delivery.lesson-hold.cancelled event. Existing callers that omit the header continue to default to originator: "sales" for backwards compatibility.
Ask
Please add X-Sguild-Caller-Domain: revenue to the Revenue Workbench call to Delivery, or reply with the equivalent caller-domain signal Revenue prefers. Without that marker the cancellation path still composes correctly, but the scheduling-side event provenance will read as Sales-originated.
No Delivery lock-state or refund semantics change in this addendum. Revenue remains the producer of credit.released, refund.initiated, and refund.completed; Delivery remains the producer of the scheduling-side cancellation fact.
References
- Delivery command-first answer:
2026-05-20-delivery-reservation-scoped-refund-composition - Revenue ask:
2026-05-20-revenue-reservation-scoped-refund-joint-release contracts/sales-scheduling-surface/README.mdv1.6.0- Delivery route:
delivery/app/api/v1/delivery/v1/lesson-holds/[lessonId]/cancel/route.ts