read.markets/app
Giorgio Gilestro 2013bfa8cc news: auto-tag headlines + market-aware cadence + filter UI
- Move news_job from hourly to 3x/hour (cron 10,30,50), with a CadencePolicy
  gate that throttles to active hours (07-21 UTC weekdays at 20 min), off-hours
  (3 h), weekends (6 h). Keeps the daytime feed fresh without spamming RSS
  sources overnight.
- Tag each headline on ingestion via DeepSeek (BATCH_SIZE=25, max_tokens=4000,
  json.JSONDecoder().raw_decode + per-row regex recovery for resilient parsing).
  Vocabulary: 16 tags including new EU / USA / AI / Conflict. NULL tags are
  picked up automatically on the next news_job run, so back-tagging is implicit
  rather than a separate migration step.
- Tag UI: pill bar above the feed with off → include → exclude cycle on click;
  shift-click jumps straight to exclude. State persists in localStorage and is
  injected into /api/news requests via htmx:configRequest. Per-row chips sit to
  the right of the headline (new 5-column grid: age | source | title | tags |
  UTC) so vertical density stays high.
- Strategic log header bug: model was hallucinating "(Updated 21:30 UTC)" in
  future tense. Bumped PROMPT_VERSION 6→7, added explicit ban on time-of-day
  clauses, and supply the actual current UTC time in the user prompt so the
  model has no need to invent one.

Migration 0012 adds headlines.tags (JSON, nullable). Tests cover vocabulary
integrity, validation/normalisation, and the JSON-recovery parser (17 tests).
2026-05-21 23:25:03 +01:00
..
jobs news: auto-tag headlines + market-aware cadence + filter UI 2026-05-21 23:25:03 +01:00
routers news: auto-tag headlines + market-aware cadence + filter UI 2026-05-21 23:25:03 +01:00
services news: auto-tag headlines + market-aware cadence + filter UI 2026-05-21 23:25:03 +01:00
static news: auto-tag headlines + market-aware cadence + filter UI 2026-05-21 23:25:03 +01:00
templates news: auto-tag headlines + market-aware cadence + filter UI 2026-05-21 23:25:03 +01:00
__init__.py initial commit — cassandra v0.1 2026-05-15 21:56:10 +01:00
auth.py phase G: data minimisation + passwordless auth + DeepSeek-first LLM 2026-05-18 14:16:57 +01:00
branding.py phase G: data minimisation + passwordless auth + DeepSeek-first LLM 2026-05-18 14:16:57 +01:00
config.py phase G: data minimisation + passwordless auth + DeepSeek-first LLM 2026-05-18 14:16:57 +01:00
db.py initial commit — cassandra v0.1 2026-05-15 21:56:10 +01:00
logging.py initial commit — cassandra v0.1 2026-05-15 21:56:10 +01:00
main.py phase G: data minimisation + passwordless auth + DeepSeek-first LLM 2026-05-18 14:16:57 +01:00
models.py news: auto-tag headlines + market-aware cadence + filter UI 2026-05-21 23:25:03 +01:00
redis_client.py phase G: data minimisation + passwordless auth + DeepSeek-first LLM 2026-05-18 14:16:57 +01:00
scheduler_main.py news: auto-tag headlines + market-aware cadence + filter UI 2026-05-21 23:25:03 +01:00
schemas.py news: auto-tag headlines + market-aware cadence + filter UI 2026-05-21 23:25:03 +01:00
templates_env.py phase G: data minimisation + passwordless auth + DeepSeek-first LLM 2026-05-18 14:16:57 +01:00