Configurable article validation rules #85

Closed
opened 2026-03-08 17:27:28 +01:00 by myrmidex · 0 comments
Owner

Summary

Replace the hard-coded Belgian news keyword validation with a configurable rule system per feed.

Context

ValidationService currently has ~40 hard-coded keywords (N-VA, Belgium, Brussels, EU, etc.) used to filter articles at ingest. This is not reusable for other feeds/topics and makes the validation logic brittle and opaque.

Goals

  • Validation keywords configurable per feed (toggle to enable/disable filtering per feed)
  • When filtering is enabled for a feed: articles matching keywords stay pending, non-matching articles are auto-declined (rejected)
  • When filtering is disabled: all articles land as pending (current behavior without hardcoded keywords)
  • Migrate existing hard-coded keywords to the new system
  • Keep the validation pipeline extensible for future rule types

Tasks

  • Design validation keyword storage (per-feed keyword list, with enable/disable toggle on Feed model)
  • CRUD UI for managing validation keywords per feed
  • Migrate hard-coded keywords to configurable per-feed rules
  • Remove hard-coded keyword list from ValidationService
  • Update ValidationService to load keywords dynamically per feed
  • Auto-decline articles that don't match any keyword (when filtering enabled)
  • Tests for keyword matching logic
  • Tests for migration of existing keywords

Dependencies

  • Blocks #96 (Article triage UI)
  • Blocks #97 (Auto-post filtered articles)
## Summary Replace the hard-coded Belgian news keyword validation with a configurable rule system per feed. ## Context `ValidationService` currently has ~40 hard-coded keywords (N-VA, Belgium, Brussels, EU, etc.) used to filter articles at ingest. This is not reusable for other feeds/topics and makes the validation logic brittle and opaque. ## Goals - Validation keywords configurable **per feed** (toggle to enable/disable filtering per feed) - When filtering is enabled for a feed: articles matching keywords stay `pending`, non-matching articles are auto-declined (`rejected`) - When filtering is disabled: all articles land as `pending` (current behavior without hardcoded keywords) - Migrate existing hard-coded keywords to the new system - Keep the validation pipeline extensible for future rule types ## Tasks - [ ] Design validation keyword storage (per-feed keyword list, with enable/disable toggle on Feed model) - [ ] CRUD UI for managing validation keywords per feed - [ ] Migrate hard-coded keywords to configurable per-feed rules - [ ] Remove hard-coded keyword list from ValidationService - [ ] Update ValidationService to load keywords dynamically per feed - [ ] Auto-decline articles that don't match any keyword (when filtering enabled) - [ ] Tests for keyword matching logic - [ ] Tests for migration of existing keywords ## Dependencies - Blocks #96 (Article triage UI) - Blocks #97 (Auto-post filtered articles)
myrmidex added this to the v2.0.0 milestone 2026-03-08 17:27:28 +01:00
myrmidex added the
enhancement
label 2026-03-08 17:27:28 +01:00
myrmidex modified the milestone from v2.0.0 to v1.3.0 2026-03-08 23:58:06 +01:00
myrmidex self-assigned this 2026-03-18 14:53: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: lvl0/fedi-feed-router#85
No description provided.