Real-time geospatial OSINT intelligence dashboard
  • Python 78.7%
  • HTML 20.8%
  • Shell 0.3%
  • Dockerfile 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
backend 625c935c80 fix(summarizer): fail loudly on a rejected model id; parallel map phase
The analyst produced no briefs for nine days because SUMMARY_MODEL had been
retired: every chat completion returned 404, nous_client.chat() swallowed it
into "", and the map phase "succeeded" with zero blocks.

- nous_client.chat(): log status_code + a 500-char body slice for every
  non-200. 400/404/422 now raise NousAPIError (bad model id / payload cannot
  succeed on a retry); 429/5xx are retried with backoff inside the call;
  401/other keep the old empty-return contract.
- Startup validation: one GET /models per process; if SUMMARY_MODEL is absent
  the run logs an ERROR with the configured id plus near matches and returns
  rc=2 before issuing any chat call. Fails open (warning) when /models itself
  is unreachable.
- Map phase: ThreadPoolExecutor fan-out capped by SUMMARY_MAP_CONCURRENCY
  (default 16). Grading still runs in batch order on the main thread; reduce
  stays serial; the 60 s per-call timeout is unchanged.
- summarize_news() now returns an exit code and __main__ sys.exit()s it:
  zero parsed map blocks, an empty reduce, or an unpersisted brief all exit
  non-zero. The scheduler logs rc at ERROR when it is not 0.
- Map calls start at 8192 completion tokens (they escalate to 16384): ~60% of
  real batches overflowed 4096 and were regenerated at 8192, doubling their
  wall time for no benefit.

Measured on the real backlog: NEWS_RECAP=1 NEWS_SUMMARIZE_FORCE=1
python summarizer.py over 2984 articles / 746 batches finished in 951 s
(15m51s), rc=0, 746/746 batches non-empty, 0 warnings.

Prompts, BATCH_SIZE=4, grading/rubric behaviour and the DB schema are
untouched (article_summaries.kind stays interval / daily_recap).
2026-12-04 23:34:54 -05:00
.forgejo/workflows ci: log in with a write:package PAT called REGISTRY_TOKEN 2026-11-17 15:10:13 -05:00
alembic news: per-article proximate geolocation + GET /api/news/blips 2026-11-19 22:50:59 -05:00
app fix(openapi): declare the admin session cookie on every guarded operation 2026-11-27 00:27:50 -05:00
deploy chore: remove unused masscan scanner 2026-09-01 00:47:24 -04:00
docs feat(summarizer): collapse syndicated wire copies before selection 2026-11-13 22:14:44 -05:00
news fix(summarizer): fail loudly on a rejected model id; parallel map phase 2026-12-04 23:34:54 -05:00
scripts fix(ingest): skip known KEV/FIRMS rows; CI skips unchanged images 2026-08-29 19:32:00 -04:00
tests fix(openapi): declare the admin session cookie on every guarded operation 2026-11-27 00:27:50 -05:00
.dockerignore Containerize for Pi: env-var config, compose stack, CI workflow 2026-07-07 17:50:51 -04:00
.env.example feat(summarizer): collapse syndicated wire copies before selection 2026-11-13 22:14:44 -05:00
.gitignore Add NASA FIRMS active-fire ingest + /api/fires; API keys management page 2026-08-24 15:37:42 -04:00
alembic.ini Containerize for Pi: env-var config, compose stack, CI workflow 2026-07-07 17:50:51 -04:00
docker-compose.yml fix(ops): pin TiTiler digest, GIST bbox indexes, single uvicorn worker 2026-09-01 00:47:06 -04:00
Dockerfile cameras: RTSP preview via ffmpeg, stop opening VLC, drop masscan to 200pps 2026-08-24 23:36:34 -04:00
Dockerfile.pg Fix Dockerfile.pg: mkdir conf.d before writing timescaledb preload 2026-07-07 18:17:31 -04:00
IDEA.md ci: retrigger deploy (previous run raced the force-push) 2026-08-27 17:42:03 -04:00
pytest.ini fix: pipeline reliability — WS, summarizer, ingest, health 2026-08-28 21:49:05 -04:00