Prevent processing the same webhook event twice
====================================================
const { isDuplicate, markSeen } = require("./dedupe-events");
if (isDuplicate(event.id)) return { skipped: true };
markSeen(event.id);
// ...process the event...

Many providers retry webhooks on timeout, delivering the same event ID more than once. This
catches that with a simple seen-ids file, auto-pruning entries older than 24 hours.
