@@ -17,12 +17,10 @@ export interface IdempotencyConfig {
1717 /** When true, failed keys are deleted rather than stored so the operation is retried on the next attempt. */
1818 retryFailures ?: boolean
1919 /**
20- * When false, the operation's return value is not persisted alongside
21- * the dedupe marker — only `{ success, status, error? }` is stored.
22- * Duplicate calls still short-circuit, but `executeWithIdempotency`
23- * resolves to `undefined` on the dedupe path. Use for webhook/polling
24- * flows where the cached body is large (multi-KB execution results)
25- * and callers don't consume the value of a duplicated delivery.
20+ * When false, only `{ success, status, error? }` is persisted — not the
21+ * operation's return value. Duplicate calls still short-circuit but
22+ * resolve to `undefined`. Use when callers don't consume the cached
23+ * body (e.g. webhook receivers, where the provider just wants a 2xx).
2624 * Defaults to true.
2725 */
2826 storeResultBody ?: boolean
@@ -524,20 +522,13 @@ export class IdempotencyService {
524522}
525523
526524/**
527- * Webhook idempotency. We're the receiver of provider-initiated webhooks,
528- * not the originator — duplicate deliveries from the provider's retry
529- * machinery just need a "we saw this" marker, not a replayable response
530- * body. `storeResultBody: false` drops the cached workflow result from
531- * each key, eliminating the long tail of large gmail/outlook payloads
532- * that pushed Redis Cloud into OOM on 2026-05-15.
533- *
534- * TTL stays at 7 days because that's the longest provider retry window
535- * we care about (Gmail / Pub/Sub). With body-stripping the per-key cost
536- * is ~150 bytes, so the long TTL is essentially free.
525+ * As a webhook receiver we only need a "we saw this delivery" marker —
526+ * the provider's retry just needs a 2xx, not our cached response body.
527+ * TTL must exceed the longest provider retry window (Gmail / Pub-Sub: 7d).
537528 */
538529export const webhookIdempotency = new IdempotencyService ( {
539530 namespace : 'webhook' ,
540- ttlSeconds : 60 * 60 * 24 * 7 , // 7 days — must exceed Gmail/Pub-Sub retry window
531+ ttlSeconds : 60 * 60 * 24 * 7 , // 7 days
541532 storeResultBody : false ,
542533} )
543534
0 commit comments