Skip to content

feat(deliveries): stream ordered milestone events to webhooks, socket… - #302

Merged
Tybravo merged 1 commit into
SwiftChainn:mainfrom
spiffamani:feat/delivery-milestones
Oct 20, 2026
Merged

Tybravo merged 1 commit into
SwiftChainn:mainfrom
spiffamani:feat/delivery-milestones

Conversation

@spiffamani

Copy link
Copy Markdown
Contributor

Closes #245

Work done

  • Added DeliveryEvent append-only model with a unique (delivery, seq) index and a repository that assigns gapless per-delivery seq with retry on collision
  • Added deliveryService.emitMilestone: persists the event, then fans out notification -> webhook -> socket, with each consumer isolated so failures are logged and can't break the transition
  • Emitted on every transition: created, funded (escrow service), assigned, in_progress, completed, cancelled
  • Added GET /api/v1/deliveries/:id/events (Controller -> Service -> Repository), restricted to the delivery's participants and admins, paginated
  • Tests (tests/deliveryMilestones.test.ts, 11 passing): seq ordering incl. concurrency, fan-out order, fire-after-commit isolation, endpoint authorization

Known unrelated failures (also fail on clean upstream/main)

  • tests/deliveryStatusTransition.test.ts: stray ──── on line 96
  • tests/escrow.e2e.test.ts: validate is not defined in src/routes/delivery.routes.ts
  • tests/integration/deliveryEta.test.ts: @stellar/stellar-sdk axios interceptors error at import

@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@spiffamani Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Tybravo

Tybravo commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

@spiffamani

Thank you for your contribution

@Tybravo
Tybravo merged commit c0ff9db into SwiftChainn:main Oct 20, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Stream structured delivery milestone events to webhooks, sockets, and the indexer

2 participants