RSS Feed lastGuid Rotation Handling #584

Open
opened 2026-09-18 14:47:14 +01:00 by Smithy-bot · 0 comments
Member

Epic: #528
Story Points:


Stop treating every item as new when the stored lastGuid has rotated off the feed (retention/expiry), so a poll cannot flood a channel.

Follow-up from the review on #579 / #530: GetNewItems currently returns the full feed when lastGuid is set but not present.

Acceptance Criteria

GIVEN a parsed feed with items ordered newest-first
AND lastGuid matches an item still in the feed
WHEN RssFeedHelper.GetNewItems is called
THEN only items newer than lastGuid are returned, oldest-first
AND existing behaviour is unchanged

GIVEN a parsed feed with items ordered newest-first
AND lastGuid is set but is not present on any item
WHEN RssFeedHelper.GetNewItems is called
THEN at most 10 items are returned, oldest-first
AND the newest items in the feed are the ones kept if the feed is larger than the cap

GIVEN a parsed feed
AND lastGuid is missing, null, or empty
WHEN RssFeedHelper.GetNewItems is called
THEN an empty array is still returned (first-poll behaviour is unchanged)

Subtasks

  • Update RssFeedHelper.GetNewItems to cap results when lastGuid is not found in the feed
  • Keep newest-first scan and oldest-first return order
  • Make the cap configurable (default 10) so the timer/commands can reuse it
  • Update tests for unknown lastGuid, cap overflow, and the existing match/empty cases

Notes

  • Raised in the #579 review: if lastGuid disappears from a feed (retention/rotation), all items are treated as new
  • Cap applies only when lastGuid is set but not found; do not flood on first poll (lastGuid absent still returns [])
  • Suggested default cap: 10 items per poll
Epic: #528 Story Points: --- Stop treating every item as new when the stored `lastGuid` has rotated off the feed (retention/expiry), so a poll cannot flood a channel. Follow-up from the review on #579 / #530: `GetNewItems` currently returns the full feed when `lastGuid` is set but not present. ## Acceptance Criteria GIVEN a parsed feed with items ordered newest-first AND `lastGuid` matches an item still in the feed WHEN `RssFeedHelper.GetNewItems` is called THEN only items newer than `lastGuid` are returned, oldest-first AND existing behaviour is unchanged GIVEN a parsed feed with items ordered newest-first AND `lastGuid` is set but is not present on any item WHEN `RssFeedHelper.GetNewItems` is called THEN at most 10 items are returned, oldest-first AND the newest items in the feed are the ones kept if the feed is larger than the cap GIVEN a parsed feed AND `lastGuid` is missing, null, or empty WHEN `RssFeedHelper.GetNewItems` is called THEN an empty array is still returned (first-poll behaviour is unchanged) ## Subtasks - [ ] Update `RssFeedHelper.GetNewItems` to cap results when `lastGuid` is not found in the feed - [ ] Keep newest-first scan and oldest-first return order - [ ] Make the cap configurable (default 10) so the timer/commands can reuse it - [ ] Update tests for unknown `lastGuid`, cap overflow, and the existing match/empty cases ## Notes - Raised in the #579 review: if `lastGuid` disappears from a feed (retention/rotation), all items are treated as new - Cap applies only when `lastGuid` is set but not found; do not flood on first poll (`lastGuid` absent still returns `[]`) - Suggested default cap: 10 items per poll
Smithy-bot added this to the 3.4.0 milestone 2026-09-18 14:47:14 +01:00
Vylpes added this to the 3.3 Sprint 9 project 2026-09-23 18:39:13 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
RabbitLabs/vylbot-app#584
No description provided.