feat: add featured/locked columns and auto-rotation logic to news pipeline

- Add `ai_grade`, `featured`, `featured_locked`, `landing_locked`, `author`, `article_published`, `image_url`, `has_unique_image` columns to news table
- Extend `news_images` schema with `alt_text`, `phash`, `width`, `height`, `is_placeholder` columns
- Create `idx_news_featured` index for efficient featured queries
- Update admin toggle endpoints to set `featured_locked`/`landing_locked` when manually toggling
- Propagate `featured` and `image_url` fields through landing page, news list, and detail page rendering
- Update `get_featured_news` to return `featured` and `image_url` fields
- Document in AGENTS.md the full zero-maintenance pipeline: image perceptual hashing, placeholder detection, AI grading on cleaned text, reliability gate, effective score computation, and post-loop landing rotation
- Update README.md service description to reflect automatic image comparison and landing rotation capabilities
- Clarify docs_api.py summaries that toggling featured/landing now locks articles from auto-rotation
This commit is contained in:
2026-06-18 22:08:41 +00:00
parent 0a554ebc32
commit 217210e02f
30 changed files with 1296 additions and 235 deletions
+2
View File
@@ -120,6 +120,7 @@ class BaseService(ABC):
default_enabled = True
title = ""
description = ""
details = ""
DEFAULT_LOG_SIZE = 20
TICK_SECONDS = 1
PERSIST_SECONDS = 3
@@ -414,6 +415,7 @@ class BaseService(ABC):
"name": self.name,
"title": self.title or self.name.capitalize(),
"description": self.description,
"details": self.details,
"enabled": enabled,
"status": status,
"interval_seconds": self.current_interval(),