fix(rss): deliver unseen items published before the last poll - #7792
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
| if (itemDate <= lastCheckedTime) { | ||
| if (itemDate <= subscriptionStartedAt) { | ||
| return false | ||
| } |
There was a problem hiding this comment.
If a feed retains an item after its GUID falls out of the 500-entry lastSeenGuids window, this subscription-time cutoff allows that already-delivered item through again because its publication date remains after the subscription began. The idempotency key expires after three days, so feeds containing more than 500 retained items can cause old entries to be delivered repeatedly. Deduplication needs to remain durable for every item admitted by this broader timestamp window.
Summary
RSS polling advances
lastCheckedTimestampon every poll and rejects items published before that timestamp, even when their GUID has never been delivered. A feed that exposes a 21:25 article after a 23:26 poll therefore silently loses it. Staging native canaries exposed this while the poller itself continued reporting success.Use the subscription's immutable webhook creation time as the historical cutoff and retain GUID deduplication. This accepts delayed feed entries without replaying known GUIDs or backfilling items published before subscription. This patch is limited to the timestamp filter; the separate attempted-versus-delivered bookkeeping issue is deferred.
Type of Change
Testing
bun run type-check: passed.bun run check:api-validation: passed.git diff --check: passed.Checklist