feat(api): idempotency keys for payment and callback endpoints (#24) #92
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/kws!92
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/24-idempotency"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #24: the idempotency mechanism. No route uses it yet.
What
idempotency_keyswithUNIQUE (scope, operation_key), payload SHA-256, saved response,created_atindex.pgstore.Store.Run: reserve the key, run the work and save the 2xx response in one transaction. Retries on any node replay the first response.idempotency.Handle: HTTP wrapper for theIdempotency-Keyheader. Missing key 400, key reused with different bytes 409, duplicate still running 503 +Retry-After, businessRejectionreturned as its own problem and left retryable.Store.Purge(cutoff)for retention.Review
Dual pass per CLAUDE.md: ponytail (no Must fix left) and a superpowers reviewer (no Critical; Important items fixed).
Not in this PR
Handle, with theIdempotency-Keyheader and 400/409/503 inopenapi.yaml.Checks run locally
make lint,make cover(94.4%),make contract.🤖 Generated with Claude Code