feat: load k8s news prompts from env/files, not Python

Bundled MAP_PROMPT/SUMMARY_PROMPT from the customer1 deepseek
configmap. Env wins over prompt files; blank compose injection
is treated as unset. Parser maps market_overview JSON onto the
dashboard ticker/map contract.
This commit is contained in:
Sirius DevOps 2026-08-28 20:04:47 -04:00
commit 1c47ecbc5a
11 changed files with 444 additions and 73 deletions

View file

@ -258,11 +258,20 @@ No Hermes-4 reasoning system prompt. Reduce uses `json_mode=True`.
## Prompts
Both prompts are env-overridable — the default `MAP_PROMPT` is OSINT-neutral
(facts, locations, entities, category, OSINT signal per article; English) and
the default `SUMMARY_PROMPT` demands the reduce JSON above (with a
"no qualifying events" escape hatch). Upstream's futures/markets prompt
language is gated behind `INCLUDE_FUTURES=1`.
Map/reduce prompts are the k8s `deepseek-configmap` text in
`news/summerizer/prompt_files/{map,summary}.txt` — **not** hardcoded in
Python. Resolution order: `MAP_PROMPT` / `SUMMARY_PROMPT` env (non-blank
wins) → `MAP_PROMPT_FILE` / `SUMMARY_PROMPT_FILE` → bundled files.
Compose passes `${MAP_PROMPT:-}` so a host `.env` swap takes effect on
container recreate (no image rebuild). Blank env is treated as unset.
The reduce JSON is the market-intel schema (`market_overview` +
`geopolitical_osint`). `intel.parse_reduce_json` maps it onto the dashboard
`summary_en` / ticker / map_items contract. Additive `lat`/`lon` on
`critical_events` and `active_conflicts` feed Critical News pins.
Upstream's futures/markets tape is gated behind `INCLUDE_FUTURES=1`.
## Tests