Commit graph osint-dashboard/news/summerizer/tests
Author SHA1 Message Date
backend
57c0444a69 fix(summarizer): ignore future-dated rows; require a score floor for the fallback
Two leaks let low-value items reach the operator brief:

- get_recent_news() only bounded the window from below, so event
  listings dated days ahead (wiseye.org, +3d/+6d) were re-fetched,
  re-graded and re-billed every interval for a week. The window is now
  (now - N, now]; NULL timestamps stay excluded as before.
- select_graded() returned ordered[:fallback_top] with no floor, so a
  15/100 event listing entered the brief as 'low'. New
  SUMMARY_FALLBACK_MIN_SCORE (default 40, clamped 0-100) filters the
  fallback set; when nothing clears it the reduce phase gets empty DATA
  and writes the empty-brief response. The fallback WARNING now logs the
  floor.

Docs: .env.example and docs/news.md document the new knob and window.
2026-11-13 21:56:46 -05:00
hermes-backend
853e87b7c5 feat(summarizer): score articles in the map phase, brief only the important ones
The map prompt now grades every article 0-100 against an explicit rubric as
the first line of its block; the summarizer parses Score:, falls back to the
Importance: label when the line is missing, ranks blocks best-first and passes
only score >= SUMMARY_MIN_SCORE (capped at SUMMARY_TOP_N) to the reduce phase.

- new pure helpers in intel.py: parse_map_scores(), select_graded(), join_blocks()
- reduce prompts drop the 'fill the brief with minor incidents and crime'
  filler instructions and the 'fill ticker with medium then low' clause
- new article_scores table (ensure_tables + alembic 012) persists every grade
  with selected/summary_id/model so thresholds can be tuned from data
- SUMMARY_MIN_SCORE (60), SUMMARY_TOP_N (12), SUMMARY_FALLBACK_TOP (3) env knobs
2026-11-13 21:47:30 -05:00
Sirius DevOps
c48788d4b6
fix(map): geofence delete, vessel snapshots, sentinel cache, news briefs
Geofences could be drawn but not removed. VesselAPI Hormuz dots vanished
on restart and DVR skipped between the 5 daily polls. Sentinel-1 re-hit
STAC on every pan and often painted a neighbouring swath. Executive
briefs truncated; ticker stayed empty unless something was critical.

- Layer-panel list + polygon popup DELETE /api/geofences/{id}
- Persist VesselAPI polls to vessels (UTC-day purge, DVR as-of, boot hydrate)
- Cache Sentinel-1 by 2° cell; pick covering scene; clip Leaflet tiles
- Retry truncated LLM JSON; ticker falls back to medium/low; 3-min HUD poll
2026-08-29 20:40:27 -04:00
Sirius DevOps
7822d45f37 fix: stop summarizer from bailing to a canned empty brief
The reduce/recap prompts told the model to AND STOP with "No qualifying…"
whenever nothing looked breaking enough, so full article batches became
one sentence. Always write summary_en from the provided stories; ticker
and map may still be empty. Futures/market tape stay ignored.
2026-08-28 23:20:40 -04:00
Sirius DevOps
49ee5fe7a3 feat: 23:00 daily news recap; prompts drop futures
Summarizer still runs the 15-min analyst, plus a 24h breaking-news recap
at 23:00 America/New_York. HUD pins kind=daily_recap. Prompts ignore
futures/market tape.
2026-08-28 22:53:31 -04:00
Sirius DevOps
d2bf55183c fix: let Settings model reach summarizer; cap map pins at 20 2026-08-28 17:06:55 -04:00
Sirius DevOps
4b00eed566 feat: nous portal chat client for news summarizer 2026-08-28 17:06:55 -04:00
Sirius DevOps
96590bc16d test: add news summarizer intel parser tests + impl 2026-08-28 17:06:55 -04:00