Detect and warn about feeds that fetch successfully but return no articles #116
Labels
No labels
bug
devops
duplicate
enhancement
good first issue
layout
next major release
next minor release
question
research
testing
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lvl0/fedi-feed-router#116
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
A feed whose URL has broken can fetch "successfully" and produce zero articles indefinitely, with nothing surfaced to the user. This is how #115 went unnoticed — the Belga RSS feed was retired upstream and the app kept reporting healthy fetches.
The gap
ArticleDiscoveryForFeedJob::handle()updateslast_fetched_atunconditionally after calling the fetcher:ArticleFetcherreturns an empty collection rather than throwing, in every failure path:collect()collect()simplexml_load_string(), which failed exactly this way)Meanwhile
CheckFeedStalenessJobdetects staleness purely viaFeed::stale():Because the broken feed keeps updating
last_fetched_at, it never looks stale. The warning exists in the log but nothing reaches the UI, and no notification fires.Proposed
Track article-yield per feed and notify when a feed fetches repeatedly without producing anything.
Sketch — details open to discussion:
last_article_at(or a consecutive-empty-fetch counter) tofeedsArticleDiscoveryForFeedJobupdates it when$articles->isNotEmpty()CheckFeedStalenessJob, or add a sibling job, to flag feeds wherelast_fetched_atis recent but no articles have arrived within a thresholdNotificationTypeEnumcase (e.g.FEED_EMPTY) —FEED_STALEmeans something different and reusing it would muddy bothSetting, followingfeed_staleness_thresholdDesign questions
last_article_attimestamp composes better with the existing threshold pattern. Leaning timestamp.Why this matters beyond Belga
The same failure mode applies to every feed. VRT and Guardian could break identically — an upstream URL change, a markup change breaking a parser, a retired feed — and the app would report healthy fetches indefinitely. Discovering it depends on someone noticing missing articles.
Acceptance criteria
FEED_STALEbehaviourSetting, with a sensible default;0disablesFEED_STALEbehaviour unchangedRelated