flowfi icon indicating copy to clipboard operation
flowfi copied to clipboard

[Backend] Wire dispatchWebhookEvent into the event pipeline or retire the webhook feature

Open blurbeast opened this issue 2 weeks ago • 4 comments

Overview & Background

dispatchWebhookEvent (backend/src/services/webhook.service.ts:389-425) is exported but never called anywhere in src/. The Soroban event worker broadcasts only SSE (soroban-event-worker.ts:1013-1018), and stream-runway-worker.ts:102-118 — commented "Send low balance alert via SSE and webhooks" — calls only sseService.broadcastTo*. Users can create webhook subscriptions and test pings work, but no production stream event is ever dispatched: a half-shipped feature that silently does nothing.


Technical Specification & Architecture

  1. Call dispatchWebhookEvent from the event worker's broadcast points (fire-and-forget with its own error boundary), and from the runway worker's alert path.
  2. Ensure delivery is idempotent per event (dedup key per subscription).
  3. If the feature is not ready to ship, watermark it in the UI/docs and remove the subscription endpoints until it is.

Target Files

  • backend/src/workers/soroban-event-worker.ts
  • backend/src/workers/stream-runway-worker.ts
  • backend/src/services/webhook.service.ts

Acceptance Criteria

  • [ ] A stream lifecycle event triggers a webhook delivery attempt to subscribed URLs.
  • [ ] Delivery failures are logged and retried per policy without blocking the indexer.
  • [ ] An integration test asserts end-to-end dispatch on a simulated stream event.

blurbeast avatar Nov 18 '26 19:11 blurbeast

@SahheedTech has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

Hello maintainer, I would love to solve this issue pls assign

ℹ️ Repo Maintainers: To accept this application, review their application or assign @SahheedTech to this issue.

SahheedTech avatar Nov 20 '26 22:11 SahheedTech

@king-daveed has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

i can resolve

ℹ️ Repo Maintainers: To accept this application, review their application or assign @king-daveed to this issue.

king-daveed avatar Nov 21 '26 08:11 king-daveed

Congratulations, @king-daveed! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on November 25, 2026.

🧑‍💻 @king-daveed: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

🌊 Happy Wave 🌊

drips-wave[bot] avatar Nov 21 '26 08:11 drips-wave[bot]

This issue has been completed by @king-daveed as part of the Stellar Wave Program's 11th Wave 🥳

😎 @king-daveed: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

drips-wave[bot] avatar Nov 24 '26 17:11 drips-wave[bot]