Effect Saga Orchestrator
The pattern for a multi-vendor booking that fails halfway and must not keep your money. Charge the card, reserve the seat, issue the ticket: if the ticket service is down after the charge, a plain sequence leaves the customer charged for a seat they cannot use. There is no distributed transaction across three vendors' APIs, so the saga registers each step's compensation as it succeeds and, on failure, runs the compensations in reverse for exactly the steps that completed. A compensation that itself fails surfaces as a typed CompensationFailed carrying the stuck steps, not a swallowed refund. The demo unwinds a charge and a seat reservation cleanly when ticketing fails. Pinned to effect 4.0.0-beta.98.
npx shadcn@latest add @compronents/effect-saga-payment-orchestratorInstalls from ui.aryank.space. Needs a registry token and a one-time @compronents entry in components.json. The docs walk through both.
Charge, reserve, issue: each forward step registers its compensation. Ticketing fails, so the saga runs the compensations in reverse for exactly the steps that succeeded. Card refunded, seat released, nothing stranded.