staff-engineering-skills-idempotency

Installation
SKILL.md

Idempotency Trap

The request was sent twice. The customer was charged twice. Before writing any operation that mutates state, ask: what happens if this runs again with the same input?

The Three Sources of Duplicates

Every system faces these as normal operation, not edge cases. You cannot prevent them -- only make operations safe when they happen.

  1. User retries -- double-click, refresh, back-button-and-resubmit. Client sends the same request twice intentionally.
  2. Network retries -- the operation succeeded but the response was lost (timeout, TCP reset, LB cut). Client retries, not knowing the first attempt worked.
  3. Infrastructure redelivery -- webhook providers retry on timeout, message queues deliver "at least once," cron jobs overlap. Infrastructure sends the same work twice.

Naturally Idempotent vs Not

Installs
1
First Seen
2 days ago
staff-engineering-skills-idempotency — triggerdotdev/staff-engineering-skills