Install
openclaw skills install idempotencyDeep idempotency workflow—identifying retry surfaces, idempotency keys, storage and TTL, exactly-once pitfalls, and testing duplicate delivery. Use when designing safe APIs, workers, and payment flows under at-least-once delivery.
openclaw skills install idempotencyMost distributed systems deliver work at least once. Idempotency makes duplicate processing safe—critical for payments, inventory, and message consumers.
Trigger conditions:
Initial offer:
Use six stages: (1) identify side effects, (2) choose keys, (3) storage & scope, (4) API patterns, (5) worker patterns, (6) testing). Confirm storage (Redis, SQL) and retention window.
Goal: Classify operations: reads vs creates vs monetary transfers vs state transitions.
Exit condition: List of mutations that must be idempotent under retries.
Goal: Client-supplied Idempotency-Key header (Stripe-style) vs deterministic hash of normalized payload—trade UX vs collision risk.
Goal: Store key → outcome or result reference with TTL covering retry window; scope keys per tenant/user when needed.
Goal: Same key + same body → same outcome; reject or conflict if same key with different body.
Goal: Natural unique constraints in DB; dedupe table keyed by event_id or business idempotency key for consumers.
Goal: Chaos or integration tests that deliver duplicate messages; property tests for key behavior.