feat: Idempotency-Key for POST /emails/send - #96
Conversation
Prevent double-sends on client retries by claiming a per-tenant Blob ledger entry before the provider call, replaying completed responses, and returning IDEMPOTENCY_IN_PROGRESS while a claim is in flight. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning Review limit reachedNext included review available in 40 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (19)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai full review |
|
Summary
Idempotency-KeyonPOST /emails/send: absent keeps at-least-once behaviour; present claims a per-tenant Blob ledger before the provider callSendResponsewithout a second provider call; in-flight replays return409 IDEMPOTENCY_IN_PROGRESS@azure/storage-blob) rather than Table — no new dependency; decision and 24h TTL documented indocs/architecture/send-idempotency.mdCloses #37
Test plan
pnpm --filter @singleton-sd/post-kit-types testpnpm --filter @singleton-sd/post-kit-api test(replay, concurrent in-flight, cross-tenant, no-header, key validation, blob store fakes)Lint / test / buildgreenidempotencycontainer exists (or will be created) on the template storage account before prod useMade with Cursor