Stabilize quarantined UK sources by replacing brittle RSS/Atom endpoints with durable official pages - #109
Conversation
Agent-Logs-Url: https://github.com/potemkin666/AlbertAlert/sessions/3a915006-48dd-4a25-a712-d2995bab2ba1 Co-authored-by: potemkin666 <183807833+potemkin666@users.noreply.github.com>
Agent-Logs-Url: https://github.com/potemkin666/AlbertAlert/sessions/3a915006-48dd-4a25-a712-d2995bab2ba1 Co-authored-by: potemkin666 <183807833+potemkin666@users.noreply.github.com>
Agent-Logs-Url: https://github.com/potemkin666/AlbertAlert/sessions/3a915006-48dd-4a25-a712-d2995bab2ba1 Co-authored-by: potemkin666 <183807833+potemkin666@users.noreply.github.com>
Agent-Logs-Url: https://github.com/potemkin666/AlbertAlert/sessions/4436d10f-167e-4173-96ac-e9bb6377e622 Co-authored-by: potemkin666 <183807833+potemkin666@users.noreply.github.com>
Agent-Logs-Url: https://github.com/potemkin666/AlbertAlert/sessions/4c72e8f5-1fd3-4051-93ce-07bfe2b8854c Co-authored-by: potemkin666 <183807833+potemkin666@users.noreply.github.com>
Agent-Logs-Url: https://github.com/potemkin666/AlbertAlert/sessions/4c72e8f5-1fd3-4051-93ce-07bfe2b8854c Co-authored-by: potemkin666 <183807833+potemkin666@users.noreply.github.com>
Agent-Logs-Url: https://github.com/potemkin666/AlbertAlert/sessions/558e6d50-2fee-4bea-b21f-a5b34569fa2b Co-authored-by: potemkin666 <183807833+potemkin666@users.noreply.github.com>
|
@copilot resolve the merge conflicts in this pull request |
Co-authored-by: potemkin666 <183807833+potemkin666@users.noreply.github.com>
Agent-Logs-Url: https://github.com/potemkin666/AlbertAlert/sessions/cce4d4cb-13f5-4dc9-ac47-b501cbf24949 Co-authored-by: potemkin666 <183807833+potemkin666@users.noreply.github.com>
Co-authored-by: potemkin666 <183807833+potemkin666@users.noreply.github.com>
Resolved and pushed. Merge conflicts are fixed on this PR in commit |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d9bc3b63a4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "id": "avon-somerset-police-news", | ||
| "provider": "Avon & Somerset Police a News", | ||
| "endpoint": "https://www.avonandsomerset.police.uk/newsroom/", | ||
| "endpoint": "https://www.avonandsomerset.police.uk/news/", |
There was a problem hiding this comment.
Keep source endpoints unique in the catalog
This replacement makes avon-somerset-police-news share the exact normalized endpoint with avon-and-somerset-police-news-html, and the same commit introduces several similar collisions (e.g. Home Office, MoD, ECHR/Judiciary). node scripts/validate-feed-data.mjs now fails on duplicate endpoints, and the runtime loader (normaliseSourcesPayload) silently drops later duplicates, so some source IDs you intended to keep active are skipped each run.
Useful? React with 👍 / 👎.
| if (requestedSources.length) { | ||
| console.log(`Loaded ${requestedSources.length} pending source request(s). Manual approval required before activation.`); | ||
| const baseSourceCount = sources.length; | ||
| sources = mergeSourceCatalogs(sources, requestedSources); |
There was a problem hiding this comment.
Preserve approval gating for pending source requests
This change activates every entry in source-requests.json for feed generation, even though those entries are explicitly queued as pending and there is a dedicated approve flow. In practice, stale or unreviewed requests will now be fetched on every build until manually removed, which bypasses the previous approval gate and can add noisy/unvetted sources into production runs.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
This PR primarily updates multiple source catalog entries to replace brittle RSS/Atom endpoints with more durable official pages (often switching kind to html) and regenerates the compiled data/sources.json. It also changes the live-feed build to merge pending source-requests into the runtime catalog and adds a unit test for catalog merging behavior.
Changes:
- Repointed several UK (and additional EU/London/international) source endpoints from feed-style URLs to stable official listing pages; updated
kind/metadata accordingly. - Regenerated
data/sources.jsonto reflect the shard updates. - Updated
scripts/build-live-feed.mjsto merge pending source requests into the active catalog for a run; added a test formergeSourceCatalogs.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/source-request-merge.test.mjs | Adds coverage for mergeSourceCatalogs dedupe/append behavior. |
| scripts/build-live-feed.mjs | Merges pending source-requests into runtime sources and logs “activated” count. |
| data/sources/uk/oversight.json | Switches ECHR UK Grand Chamber + GOV.UK org/news sources from RSS/Atom endpoints to stable HTML pages. |
| data/sources/uk/incidents.json | Updates Avon & Somerset and West Yorkshire Police endpoints; changes several sources from RSS to HTML. |
| data/sources/london/context.json | Updates borough/news endpoints and replaces two london.gov.uk RSS IDs with HTML press-release pages. |
| data/sources/international/oversight.json | Updates UNOCT listing endpoint. |
| data/sources/international/context.json | Updates OSCE press release listing endpoint. |
| data/sources/europe/oversight.json | Replaces the ECHR press releases RSS endpoint (but now points at a UK Judiciary feed). |
| data/sources/eu/oversight.json | Updates EU Home Affairs and Council press release sources; switches one HTML page to RSS. |
| data/sources/eu/incidents.json | Repoints Dutch police source from RSS index to English news listing. |
| data/sources/eu/context.json | Repoints Austria Interior Ministry source from RSS index to news listing. |
| data/sources.json | Compiled catalog output reflecting all shard changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "provider": "Hillingdon Council a News", | ||
| "endpoint": "https://www.hillingdon.gov.uk/news", | ||
| "endpoint": "https://pre.hillingdon.gov.uk/news", | ||
| "kind": "html", | ||
| "lane": "context", | ||
| "region": "london", | ||
| "isTrustedOfficial": true, | ||
| "requiresKeywordMatch": true, | ||
| "comment": "Hillingdon borough news used for Heathrow corridor and West London local context." | ||
| "comment": "Hillingdon canonical news target used for Heathrow corridor and West London local context." |
| "id": "eu-council-press-releases-html", | ||
| "provider": "Council of the EU - Press Releases", | ||
| "endpoint": "https://www.consilium.europa.eu/en/press/press-releases/", | ||
| "kind": "html", | ||
| "provider": "Council of the EU - Press Releases (RSS)", | ||
| "endpoint": "https://www.consilium.europa.eu/en/rss/pressreleases.ashx", | ||
| "kind": "rss", | ||
| "lane": "oversight", | ||
| "region": "eu", | ||
| "isTrustedOfficial": true, | ||
| "requiresKeywordMatch": true, | ||
| "comment": "Council of the EU press releases page for official announcements, JHA outcomes and sanctions statements." | ||
| "comment": "Next-best replacement for the blocked HTML page using the accessible official Council press releases RSS feed." |
| "id": "eu-commission-home-affairs-topic", | ||
| "provider": "European Commission - Home Affairs", | ||
| "endpoint": "https://commission.europa.eu/topics/home-affairs_en", | ||
| "provider": "European Commission - Home Affairs News", | ||
| "endpoint": "https://home-affairs.ec.europa.eu/news_en", | ||
| "kind": "html", | ||
| "lane": "oversight", | ||
| "region": "eu", | ||
| "isTrustedOfficial": true, | ||
| "requiresKeywordMatch": true, | ||
| "comment": "European Commission Home Affairs topic page for migration, internal security and terrorism-policy context." | ||
| "comment": "Migration and Home Affairs news page used as the best active source for dated policy and security updates." |
| "id": "eu-security-union-strategy", | ||
| "provider": "European Commission a Security Union Strategy", | ||
| "endpoint": "https://home-affairs.ec.europa.eu/policies/internal-security_en", | ||
| "provider": "European Commission - Home Affairs News", | ||
| "endpoint": "https://home-affairs.ec.europa.eu/news_en", | ||
| "kind": "html", | ||
| "lane": "oversight", | ||
| "region": "eu", | ||
| "isTrustedOfficial": true, | ||
| "requiresKeywordMatch": true, | ||
| "comment": "EU Commission Security Union policy page for counter-terrorism, serious crime, and internal security updates." | ||
| "comment": "Next-best active source for internal-security developments using the Home Affairs news stream." |
| const baseSourceCount = sources.length; | ||
| sources = mergeSourceCatalogs(sources, requestedSources); | ||
| const activatedCount = Math.max(0, sources.length - baseSourceCount); | ||
| console.log( | ||
| `Loaded ${requestedSources.length} pending source request(s); activated ${activatedCount} for this feed run.` |
| "id": "west-yorkshire-police-all-rss", | ||
| "provider": "West Yorkshire Police - All Feed", | ||
| "endpoint": "https://www.westyorkshire.police.uk/news/all/feed", | ||
| "kind": "rss", | ||
| "provider": "West Yorkshire Police - All News", | ||
| "endpoint": "https://www.westyorkshire.police.uk/news-stories-all", | ||
| "kind": "html", |
| "id": "west-yorkshire-police-news-rss", | ||
| "provider": "West Yorkshire Police - News Feed", | ||
| "endpoint": "https://www.westyorkshire.police.uk/news/feed", | ||
| "kind": "rss", | ||
| "provider": "West Yorkshire Police - News", | ||
| "endpoint": "https://www.westyorkshire.police.uk/news-stories-all", | ||
| "kind": "html", |
| "id": "echr-press-releases-rss", | ||
| "provider": "European Court of Human Rights - Press Releases RSS", | ||
| "endpoint": "https://hudoc.echr.coe.int/app/transform/rss?length=20&library=echrengpress&query=contentsitename%3AECHR+AND+doctype%3DPR&rankingModelId=11111111-0000-0000-0000-000000000000&sort=kpdate+Descending&start=0", | ||
| "provider": "UK Judiciary - Judgments Feed", | ||
| "endpoint": "https://www.judiciary.uk/judgments/feed/", | ||
| "kind": "rss", | ||
| "lane": "oversight", | ||
| "region": "europe", | ||
| "isTrustedOfficial": true, | ||
| "requiresKeywordMatch": true, | ||
| "comment": "Official ECHR press release RSS feed from HUDOC." | ||
| "comment": "Next-best substitute for the inaccessible ECHR press-release feed using the active UK Judiciary judgments feed." |
Several UK sources were repeatedly falling into quarantine due to stale or brittle feed-style endpoints (notably West Yorkshire Police, GOV.UK Atom links, and ECHR transform RSS). This change updates those source definitions to stable official pages while preserving source intent and lane coverage.
Source endpoint remediation (UK incidents)
avon-somerset-police-newsto the active Avon & Somerset Police news page.west-yorkshire-police-all-rsswest-yorkshire-police-appeals-rsswest-yorkshire-police-news-rsswest-yorkshire-police-releases-rsswest-yorkshire-police-news-appealsto the canonical.police.ukURL.Source endpoint remediation (UK oversight)
echr-uk-grand-chamber-rssfrom a fragile transform RSS URL to the stable HUDOC entry point.gov-uk-cabinet-office-atomgov-uk-home-office-atomgov-uk-mod-atomgov-uk-moj-atomgov-uk-news-and-communications-atomSchema-aligned catalog updates
kindwhere endpoint type changed (rss/atom→html).data/sources.jsonfrom source-of-truth shards.{ "id": "gov-uk-home-office-atom", "endpoint": "https://www.gov.uk/government/organisations/home-office", "kind": "html" }