Skip to content

Add webhook delivery exactly-once semantics via consumer-side dedupe receipts #423

Description

@thlpkee20-wq

Description

Webhook receivers can receive duplicates under retry. Provide a dedupe-receipt contract: each delivery carries a stable delivery_id and the consumer can POST /api/v1/webhooks/ack to confirm; subsequent retries are suppressed.

Requirements and context

  • Must be secure, tested, and documented
  • Should be efficient and easy to review
  • Relevant code: src/routes/webhooks.ts
  • Ack TTL must be at least 7 days

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feat/webhook-exactly-once-acks
  • Implement changes
    • Persist webhook_acks(delivery_id, acked_at)
    • Skip retries when delivery_id already acked
    • Document ack contract in OpenAPI
  • Validate security and correctness assumptions

Test and commit

  • Run tests
    • npm test
  • Cover edge cases
    • Ack arriving after retry already sent must short-circuit next retry
  • Include test output and notes

Example commit message

feat: webhook exactly-once via consumer acks

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programapiAPI endpoints and request/response behaviorbackendBackend scopetests

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions