docs(osint): analyst grading rubric, thresholds and article_scores

This commit is contained in:
Lance Walters 2026-11-13 22:08:07 -05:00
commit aede328bf0

View file

@ -15,7 +15,7 @@ instead of a host Docker container on the Pi.
| `osint-camera-service` | same app image | public-camera discovery + snapshots (PVC `osint-camera-snapshots` 3 Gi, shared with the app) |
| `osint-titiler` | `forgejo…/sirius/titiler:0.26.0` | SAR COG tile proxy, exposed same-origin at `/titiler` |
| `osint-news-scraper` | `forgejo…/sirius/osint-news-scraper:amd64-58f71f5b4520` | Scrapy news scraper loop |
| `osint-news-summarizer` | `forgejo…/sirius/osint-news-summarizer:amd64-c48788d4b614` | "analyst" — Nous Portal briefs every 15 min + 23:00 recap |
| `osint-news-summarizer` | `forgejo…/sirius/osint-news-summarizer:amd64-fa745ee3f7ae` | "analyst" — Nous Portal briefs every 15 min + 23:00 recap |
Every workload is pinned to `kubernetes.io/hostname: siriussec` (Gateway/Envoy
co-location + local-path PVs).
@ -116,6 +116,33 @@ it can actually parse.
`configmap.yaml`; changing it in the UI (`PUT /api/settings`) only takes effect
when the env var is empty, because `resolve_model()` prefers the env.
## Analyst grading (PR #53 + #54)
The map call scores every article **0-100** against a rubric in the same request
(no extra round-trip): 90+ breaking geopolitical/military/disaster, 70-89
significant national/international, 40-69 notable regional, 10-39 routine/crime,
0-9 noise (sport, celebrity, market tape, **event-calendar listings**). Only
blocks scoring `>= SUMMARY_MIN_SCORE` (60) reach the reduce prompt, capped at
`SUMMARY_TOP_N` (12). If nothing clears the bar the fallback may only pick blocks
`>= SUMMARY_FALLBACK_MIN_SCORE` (40), and if none clear that the brief is the
honest `No significant developments in this window.` — `SUMMARY_FALLBACK_TOP=0`
disables the fallback entirely.
`get_recent_news()` uses a closed window `(now - window, now]`: future-dated rows
must never be re-graded every 15 minutes (they are dropped at ingest and hidden
in `/api/news` — see above).
Every graded article is persisted to `article_scores` (`score`, `category`,
`selected`, `model`, `summary_id`) for threshold tuning, e.g.
```sql
select width_bucket(score, 0, 100, 10) * 10 as bucket, count(*), avg(selected::int)
from article_scores group by 1 order by 1;
```
Known gap (carded): syndicated wire copies are not yet collapsed, so several
`top_n` slots can hold the same story from different stations.
## Ingress
Cloudflare tunnel `sirius home` already carries `osint.siriusdevops.com` →