Aglet

Verify idempotent webhook event handling

Idempotency verification must cover identity and concurrency, not only a sequential duplicate. Send the same event twice, race two workers, and process two similar events with different IDs. Inspect durable claim, side-effect count, acknowledgement, and final state. Include an interrupted worker after its claim succeeds.

Check whether the outcome improved

  1. Define event outcomes

    Write expected claim, handler, acknowledgement, side-effect count, and state for retry, concurrent duplicate, distinct similar event, missing ID, and expired claim. State which cases are safe no-ops and which require review.

  2. Run duplicate races

    Execute the same event through sequential and concurrent workers. Confirm one durable claim wins before the effect and the loser returns a safe disposition. Check a process restart so in-memory deduplication cannot create a false pass.

  3. Check distinct events

    Process two events sharing a resource or payload shape but carrying different identity. Verify both legitimate transitions remain possible when contract allows. Test a missing or malformed ID without inventing a hash-based identity.

What to carry forward

Accept when one event has one effect, concurrent attempts converge, distinct events remain distinct, and identity gaps stop safely. Keep provider resend behavior partial. Record claim storage, retention, fixtures, side-effect counts, and handler revision. Keep the losing worker’s disposition observable.

Technical background: Twilio documentation.

Keep the decision with the work.

Use a Work Item in Aglet to record the problem, the evidence you have, and the next decision. Add an owner and priority, then keep updates in the discussion so the next person can follow the reasoning.

Create an account See the product workflow