mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-07-06 04:17:57 +02:00
cfbeabda1e
* feat(telegram): auto-translate OSINT channel posts to English Cherry-picked from @Bobpick PR #391 (telegram-only slice): server-side translation during fetch, SHOW ORIGINAL toggle in TelegramOsintPopup, and on-demand /api/telegram-feed?lang=. Co-authored-by: Robert Pickett <bobpickettsr@yahoo.com> Co-authored-by: Cursor <cursoragent@cursor.com> * feat(gt): experimental Derived OSINT analytics with lean-node safeguards Cherry-picked from @Bobpick PR #391 (GT + OpenClaw slice): Bayesian strategic-risk engine, map overlay, OpenClaw commands, and telegram_rhetoric watchdog. Off by default (GT_ANALYTICS_ENABLED=false, gt_risk layer false). 1 vCPU nodes get cgroup detection, UI warning on layer toggle, and lean profile that skips scheduled ingest/Louvain unless GT_ANALYTICS_ACK_LOW_CPU=true. Backtest HUD removed from dashboard (OpenClaw/API regression only). Co-authored-by: Robert Pickett <bobpickettsr@yahoo.com> Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Robert Pickett <bobpickettsr@yahoo.com> Co-authored-by: Cursor <cursoragent@cursor.com>
29 lines
1.0 KiB
Python
29 lines
1.0 KiB
Python
"""GT feed adapter uses Telegram English translations for costly-signal matching."""
|
||
|
||
from __future__ import annotations
|
||
|
||
from analytics.feed_adapter import normalize_feed_item
|
||
|
||
|
||
def test_telegram_prefers_translated_text_for_gt() -> None:
|
||
post = {
|
||
"title": "Київ 1х БпЛА",
|
||
"description": "Обстріл біля Харкова",
|
||
"title_translated": "Kyiv 1x UAV",
|
||
"description_translated": "Shelling near Kharkiv with troop movement reported",
|
||
"source": "t.me/osintdefender",
|
||
"coords": [49.99, 36.23],
|
||
}
|
||
item = normalize_feed_item(post, source_type="telegram_osint")
|
||
assert "troop movement" in item["text"].lower()
|
||
assert item["domain"] == "conflict"
|
||
|
||
|
||
def test_hashtag_region_maps_ukraine_dossier_key() -> None:
|
||
post = {
|
||
"title": "Update",
|
||
"description_translated": "#Ukraine #USA aircraft spotted on runway",
|
||
"source": "t.me/osintdefender",
|
||
}
|
||
item = normalize_feed_item(post, source_type="telegram_osint")
|
||
assert item["region"] == "ukraine" |