Compare commits

..
Author SHA1 Message Date
da8f803b16 Merge pull request 'fix(osint): run the PR #72 summarizer build (fail-loudly + concurrent map phase)' (#92) from fix/osint-summarizer-fb5285d into master 2026-12-05 05:29:24 +00:00
Lance Walters
2f613e4f11 fix(osint): run the PR #72 summarizer (fail-loudly + concurrent map phase)
The resilience fix sirius/osint-dashboard@fb5285d (PR #72) was merged but
never deployed: ns osint still ran the 11/19 image amd64-fe2b5df369d0, which
has neither the concurrent map phase nor NousAPIError, so a non-retryable
Nous rejection was swallowed as an empty completion and the analyst idled
for nine days without a single signal.

* pin deploy/osint-news-summarizer to the CI-built amd64-fb5285df7f38
  (build run 1497 / job 2165, manifest sha256:e2387f90...4de52)
* pin osint-analyst-exporter to the same tag — it borrows the summarizer
  image for python3 + psycopg2, and two tags for one image read as drift
* SUMMARY_MAP_CONCURRENCY=16 next to BATCH_SIZE: ~20 s per map call, the
  746-batch recap measured 951 s at 16 (8 projects to ~98 min)
* README: image inventory + a section on the new behaviour and log line
2026-12-05 00:29:11 -05:00
9cec2da3c4 Merge pull request 'fix(forgejo): allow ci-runners -> forgejo:3000 so CI image pushes work' (#91) from fix/forgejo-allow-ci-runners-registry into master 2026-12-05 05:18:47 +00:00
4 changed files with 35 additions and 4 deletions

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-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-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-scraper` | `forgejo…/sirius/osint-news-scraper:amd64-58f71f5b4520` | Scrapy news scraper loop |
| `osint-news-summarizer` | `forgejo…/sirius/osint-news-summarizer:amd64-fe2b5df369d0` | "analyst" — Nous Portal briefs every 15 min + 23:00 recap | | `osint-news-summarizer` | `forgejo…/sirius/osint-news-summarizer:amd64-fb5285df7f38` | "analyst" — Nous Portal briefs every 15 min + 23:00 recap |
Every workload is pinned to `kubernetes.io/hostname: siriussec` (Gateway/Envoy Every workload is pinned to `kubernetes.io/hostname: siriussec` (Gateway/Envoy
co-location + local-path PVs). co-location + local-path PVs).
@ -141,6 +141,21 @@ because `chat()` swallows non-200s and returns an empty string. It is set in
`configmap.yaml`; changing it in the UI (`PUT /api/settings`) only takes effect `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. when the env var is empty, because `resolve_model()` prefers the env.
## Analyst resilience + map concurrency (PR #72)
`SUMMARY_MAP_CONCURRENCY` (16, in `configmap.yaml`) sets how many map calls are
in flight. Each call is a ~20 s wall clock, so the phase is latency-bound: the
746-batch recap measured **951 s** end-to-end at 16, where 8 is projected at
~98 min. The code default is also 16; the env var is pinned so a default change
upstream cannot silently stretch the 15-min interval past its window.
A non-retryable Nous rejection (400/404/422 — e.g. a retired model id) now
raises `NousAPIError` and aborts the run with `rc=1` instead of being swallowed
as an empty completion, so the failure shows up in the pod log on the *first*
tick rather than as nine days of "idle" ticks. The per-run summary line is
`summarize done kind=<interval|recap> summary_id=… model=… batches=… articles=…
ticker=… map=… elapsed=…s`.
## Analyst grading (PR #53 + #54) ## Analyst grading (PR #53 + #54)
The map call scores every article **0-100** against a rubric in the same request The map call scores every article **0-100** against a rubric in the same request

View file

@ -21,7 +21,10 @@
# Why the summarizer image: it is the only image in this namespace that already # Why the summarizer image: it is the only image in this namespace that already
# ships psycopg2 and a python3, and it is pinned by tag (no floating base). The # ships psycopg2 and a python3, and it is pinned by tag (no floating base). The
# script uses the stdlib HTTP server, so nothing is installed at runtime and no # script uses the stdlib HTTP server, so nothing is installed at runtime and no
# new image build is needed. Revisit if that image is ever replaced. # new image build is needed. It tracks the summarizer's own pin (currently
# amd64-fb5285df7f38) — bump BOTH together; two different tags for one image in
# one namespace reads as drift in an audit, and the exporter only needs the
# interpreter + psycopg2, which every summarizer build carries.
--- ---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -217,7 +220,8 @@ spec:
containers: containers:
- name: exporter - name: exporter
# Pinned summarizer image: python3 + psycopg2, see header comment. # Pinned summarizer image: python3 + psycopg2, see header comment.
image: forgejo.siriusdevops.com/sirius/osint-news-summarizer:amd64-fe2b5df369d0 # Kept equal to the summarizer pin in news-summarizer-deployment.yaml.
image: forgejo.siriusdevops.com/sirius/osint-news-summarizer:amd64-fb5285df7f38
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: ["python", "/opt/exporter/exporter.py"] command: ["python", "/opt/exporter/exporter.py"]
env: env:

View file

@ -78,6 +78,13 @@ data:
# batches risk timing out and silently contributing nothing to the reduce # batches risk timing out and silently contributing nothing to the reduce
# phase. # phase.
BATCH_SIZE: "4" BATCH_SIZE: "4"
# Map-phase fan-out (PR #72). Each map call is a ~20 s wall clock, so the
# phase is latency-bound, not CPU-bound: the 746-batch recap measured 951 s
# end-to-end at 16 in flight, where 8 is projected at ~98 min. 16 is also the
# summarizer's DEFAULT_SUMMARY_MAP_CONCURRENCY; it is pinned here so a future
# code default change cannot silently stretch the 15-min interval past its
# window.
SUMMARY_MAP_CONCURRENCY: "16"
# Map-phase grading (PR #53): the map call scores every article 0-100 against # Map-phase grading (PR #53): the map call scores every article 0-100 against
# a rubric and only blocks >= SUMMARY_MIN_SCORE reach the brief. When nothing # a rubric and only blocks >= SUMMARY_MIN_SCORE reach the brief. When nothing
# clears the bar the top SUMMARY_FALLBACK_TOP are used so the HUD is not blank # clears the bar the top SUMMARY_FALLBACK_TOP are used so the HUD is not blank

View file

@ -39,7 +39,12 @@ spec:
kubernetes.io/arch: amd64 kubernetes.io/arch: amd64
containers: containers:
- name: news-summarizer - name: news-summarizer
image: forgejo.siriusdevops.com/sirius/osint-news-summarizer:amd64-fe2b5df369d0 # amd64-fb5285df7f38 = sirius/osint-dashboard@fb5285d (PR #72, merged):
# the map phase runs concurrently (SUMMARY_MAP_CONCURRENCY) and a
# non-retryable Nous rejection raises NousAPIError instead of being
# swallowed, so a wedged analyst fails loudly instead of idling for
# nine days on silent empty completions (card t_22334588 / t_2ae9f0c0).
image: forgejo.siriusdevops.com/sirius/osint-news-summarizer:amd64-fb5285df7f38
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
# Loop: batch the last window, call Nous Portal, write summaries. # Loop: batch the last window, call Nous Portal, write summaries.
command: ["python", "run_news_summarizer.py"] command: ["python", "run_news_summarizer.py"]