Belga discovery skips the newest article — offset=1 should be offset=0 #158
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#158
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
The Belga API url in
config/feed.phpusesoffset=1. The parameter is 0-based, so every fetch silently drops the newest press release. An article only becomes visible to FFR once a newer one is published and pushes it into position 2 — meaning the most recent Belga article is always missing, for hours at a time.Evidence
Same endpoint, same
count, differing only inoffset(2026-08-16):Both report
_meta.total = 14732.offset=1is an item offset, not a page number, and it starts one item late.Observed on PROD
v1.4.1, feed 2 (Belga), inspected 2026-08-16:
2026-08-16T06:01:172026-08-16T06:07:47— six minutes later35544 was the newest article from 06:07 onward, so it was dropped by every fetch for ~11 hours. It would only have been ingested after 35545 appeared at
17:32:55.Why it went unnoticed
The failure is invisible from inside the app:
FetchWebsiteArticlesActionpushes every article it listed, new or already-known, so "Fetched 50" says nothing about how many were newFEED_EMPTY(the collection is never empty)Fix
config/feed.php,providers.belga.languages.en.url:offset=1→offset=0.A config change alone is not sufficient, and shipping one on its own would make things worse.
feeds.urlis read from the database at fetch time;config/feed.phponly ever seeds new rows viaCreateFeedAction'sfirstOrCreate(['url' => $url], …). Because the url is the lookup key, changing it in config does not update the existing row — it fails to match and inserts a second belga feed, leaving the stale one active.This needs the established pattern: a data migration keyed on
provider, modelled on2024_01_01_000012_sync_belga_feed_to_website_discovery.php, which adopts the row already on the target url and deactivates superseded ones. Two schema constraints apply —feeds.urlis UNIQUE whilefeeds.provideris not, androutes.feed_idcascades on delete, so superseded rows must be deactivated rather than deleted.Acceptance criteria
config/feed.phpusesoffset=0for the Belga endpointprovider, not on the old urlRelated
language=NLandlanguage=FRboth return an emptydataarray.