feat(reliability): idempotency store, custom webhook replay protection, correlation ids

Add LICENSE (MIT), an IdempotencyStore abstraction with a KV implementation and provider-scoped delivery keys, optional replay protection for custom webhooks (X-WebHooker-Timestamp + X-WebHooker-Nonce), and per-request correlation ids in webhook responses and logs.
This commit is contained in:
RhenCloud committed 2026-08-15 17:03:32 +08:00
1 parent 92ba2203a5
commit 737dd7af98
15 files changed
+378 -26

No files matched your search

+1 -1
View File
@@ -198,7 +198,7 @@ describe("processWebhook", () => {
const second = await processWebhook(env, body, headers, makeWait().waitUntil, "team-a");
expect(first.status).toBe(200);
expect(second.status).toBe(200);
expect(second.body).toEqual({ ok: true, duplicate: true });
expect(second.body).toEqual({ ok: true, duplicate: true, requestId: expect.any(String) });
expect(fetched).toHaveLength(1);
});