Commit graph

239 commits

Author SHA1 Message Date
Sirius DevOps
5a39404384 fix(openapi): declare the admin session cookie on every guarded operation
/openapi.json is served to the internet and declared no securitySchemes at
all, so every one of the 22 mutating operations read as unauthenticated while
the middleware answers 401 on them. The enforcement lives in
AdminAuthMiddleware, not in a route dependency, so FastAPI had nothing to
infer a scheme from.

The spec is now stamped from auth.is_public() — the same allowlist the
middleware enforces — instead of a hand-maintained per-route list:
- components.securitySchemes.adminSession: apiKey in cookie, name
  osint_session (the cookie the middleware actually reads), with the 401/403
  behaviour documented.
- protected operations: security: [{"adminSession": []}] — 19 of the 22
  mutating operations plus GET /api/keys, GET /api/settings, /api/news/models.
- public operations: security: [] (explicit "no auth"; not omitted).
  POST /api/search, POST /api/auth/login and POST /api/auth/logout stay
  public, and the read-only HUD surface is untouched.

Tests pin the pair per documented operation: the real app must answer 401 on
every operation that declares security, and the middleware must admit every
operation that declares []. Verified red on the untouched base (9 failures)
and green after the change.
2026-11-27 00:27:50 -05:00
76035535bc Merge pull request 'fix(gdelt): ingest the 15-minute GKG bulk file' (#70) from fix/gdelt-bulk-gkg into master
All checks were successful
build-and-deploy / build-push (push) Successful in 21s
2026-11-21 23:37:46 +00:00
Lance Walters
8f38ff6ff8 fix(gdelt): ingest the 15-minute GKG bulk file, keep the DOC API as fallback
The DOC 2.0 API is per-IP quota'd (429 with no Retry-After) and only lands a
fetch every 5-6 cycles, so gdel-t2 coverage was near zero. GDELT publishes the
same articles every 15 minutes as static files with no key and no quota.

ingest_gdelt now parses lastupdate.txt, downloads the newest *.gkg.csv.zip,
filters rows to the CONFIG GDELT query terms (matched against GKG theme
tokens), and maps each surviving row into the existing events.gdelt shape:
title from PAGE_TITLE, url from DocumentIdentifier (so event_dedup on URL is
unchanged), body = source domain, location_name/lat/lon from V2Locations, and
PAGE_PRECISEPUBTIMESTAMP as source_timestamp. Publishing goes through
_publish_unknown, so known URLs are skipped before they hit NATS.

The DOC path (with its 429 backoff) still runs, but only when the bulk fetch
itself fails.
2026-11-21 18:37:31 -05:00
fc0cd41b7a Merge pull request 'fix(gdelt): stop retrying 429 over http, back off instead of tracebacking' (#69) from fix/gdelt-429-backoff into master
All checks were successful
build-and-deploy / build-push (push) Successful in 17s
2026-11-21 23:13:19 +00:00
Sirius DevOps
56908aed03 fix(gdelt): stop retrying 429 over http, add quota backoff
GDELT's DOC 2.0 API answers 429 with a plain-text body, no Retry-After, and
a per-IP block window that widens with request volume. The https->http retry
only doubled the request count against that quota and could never succeed,
and every cycle logged a full traceback.

- ingest_gdelt: a 429 (or a 200 with a prose body) now sets a backoff window
  (GDELT_BACKOFF_BASE=300s, doubling to GDELT_BACKOFF_MAX=1800s, Retry-After
  honoured when present) and returns 0 instead of raising.
- cycles inside the window skip the call entirely, logging one line.
- the https->http fallback now only covers TransportError (TLS/connect), not
  HTTP error statuses.
- producer_loop logs a GDELT failure as one WARNING line, no traceback.
- tests/test_gdelt_backoff.py covers no-retry-on-429, cooldown skip, doubling
  and cap, Retry-After, 200-prose, success reset, transport fallback.
2026-11-21 18:12:56 -05:00
54897b49bc Merge pull request 'fix(adsb): keep aircraft ingest alive with no browser viewport' (#68) from fix/adsb-idle-watch-poll into master
All checks were successful
build-and-deploy / build-push (push) Successful in 3m38s
2026-11-21 22:30:58 +00:00
Sirius DevOps
366ee12b46 fix(adsb): keep aircraft ingest alive with no browser viewport
The ADSB refresh loop only persisted positions for registered WS viewports,
so aircraft_positions went silent for a day whenever nobody had the map open
(max(ts) frozen at 2026-11-20 04:58 while USGS/news ingest kept running).

When no client viewport is registered the loop now sweeps the chokepoint
presets (ADSB_WATCH_ENABLED=1, ADSB_WATCH_INTERVAL=30s, 5 boxes ~65-81 nm)
through the same fetch_aircraft(persist=True) path, so the hypertable and
aircraft_tracks_1min keep advancing unattended. Viewport polling keeps its
8 s cadence when a tab is connected.
2026-11-21 17:30:47 -05:00
915f6cbe25 Merge pull request 'feat(hud): Blue Marble default basemap + constant-speed readable news ticker' (#67) from wt/t_88bfa75f into master
All checks were successful
build-and-deploy / build-push (push) Successful in 17s
2026-11-20 04:45:54 +00:00
Sirius DevOps
a72ddc30f8 feat(hud): Blue Marble default basemap + constant-speed readable news ticker
- initMap preferred chain: BlueMarble_ShadedRelief_Bathymetry first (static,
  gap-free); VIIRS/MODIS satellite remain selectable. No basemap persistence
  exists (osint.mapDefaults stores overlay prefs only), so first-load default
  is the whole change. has_time=false hides time controls via mapLayerChanged.
- News ticker: animation-duration computed from rendered group width for a
  constant 28 px/s regardless of headline count, recomputed on every 3-min
  rebuild; CSS fallback raised 90s -> 240s. Seamless two-copy -50% loop kept;
  market ticker untouched (60s CSS, no inline override).

Verified in real browser vs mock API + live GIBS tiles: fresh load selects
Blue Marble (8/8 tiles), Terra satellite round-trip renders with time controls,
measured ticker speed 28.01 px/s (was ~88), critical-news/blips toggles clean
(1 shared canvas -> 0, no reload), zero console errors.
2026-11-19 23:45:22 -05:00
a268eefb84 Merge pull request 'fix(map): one persistent canvas renderer for critical-news pins (per-pin leak + only-last-pin-clickable)' (#66) from wt/t_40da439a into master
All checks were successful
build-and-deploy / build-push (push) Successful in 19s
2026-11-20 04:31:31 +00:00
Sirius DevOps
577a96658d fix(map): one persistent canvas renderer for critical-news pins
loadNewsPins() called renderer: pointCanvas() INSIDE the per-pin .map(),
giving every critical pin its own full-viewport L.canvas (~19 MB each at
retina 2x). Renderers were never removed on refresh (Leaflet keeps empty
renderers mounted), so canvases grew without bound (35 after 6 refreshes
measured) and stacked pointer-events:auto siblings at z100 meant only the
LAST pin's canvas received clicks — Kyiv (first) was dead, Kherson (last)
worked. This is the user-reported 'selecting Critical News reloads the
site': unbounded full-viewport canvases stall the GPU/main thread.

Fix (mirrors T2's articlesRenderer pattern):
- hoist one persistent L.canvas({padding:0.5}) into module-level
  newsRenderer, shared by all pins and reused across refreshes; L.Canvas
  hit-tests every drawn path so ALL pins are clickable
- remove the renderer on toggle-off (0 canvases when layer off)
- guard L.Canvas.prototype._redraw against detached renderers: Leaflet
  1.9.4's moveend-driven _updatePaths() calls _redraw() directly, nulling
  _redrawRequest without cancelling a pending animation frame; removing
  the renderer before that orphaned frame fires crashes on the deleted
  2d context ('clearRect of undefined'). No-op when detached, unchanged
  when live.

Verified in real browser against local mock of /api/news/map (5 pins) +
/api/news/blips (1398-row T2 fixture):
- all 5 pins open their popups on click, Article Blips ON and OFF
- canvas count flat at 1 across 12 pan/zoom refreshes (was +5/refresh);
  0 when toggled off, 1 when back on
- 6 toggle off/on cycles: every CDP eval 1-2 ms, no navigation/reload
  (boot sentinel + navigation entries unchanged), counts/HUD 0<->5
- 4 toggles mid-map-motion (race stress): zero errors
- article blips still clickable above the canvas (svg z200 pe:none)
- popup content, cyan styling, counts/HUD byte-identical; zero console
  errors across the full session

app/static/index.html only, +19/-2.
2026-11-19 23:29:48 -05:00
fe2b5df369 Merge pull request 'feat(map): dense per-article blip layer from /api/news/blips (T2 frontend)' (#65) from wt/t_305683a2 into master
All checks were successful
build-and-deploy / build-push (push) Successful in 10s
2026-11-20 03:53:27 +00:00
44897a86d4 Merge pull request 'news: per-article proximate geolocation + GET /api/news/blips' (#64) from wt/t_bc15eb53 into master
All checks were successful
build-and-deploy / build-push (push) Successful in 23s
2026-11-20 03:52:57 +00:00
Sirius DevOps
e6ef6b79f9 feat(map): dense per-article blip layer from /api/news/blips
Additive 'Article Blips' layer on the HUD map (default OFF), separate
from the critical-news pins:
- GET /api/news/blips?bbox=&limit=1000 (frozen T1 contract), own
  superseded-request counter + overlayAbort handling, bbox refresh on
  pan/zoom and a NEWS_REFRESH_MS timer while enabled
- small radius-3 violet circleMarkers in a chunked markerClusterGroup
  (maxClusterRadius 40) with quiet violet cluster icons; one persistent
  SVG renderer (clickable paths, click-through root, no container leak)
- click -> .blip-pop popup: headline, domain, category, location_name +
  confidence, score, source link (esc() on every field)
- legend toggle + count, ARTICLES HUD chip, syncHud wiring
- graceful 404/failure: warn + idle at 0, map and critical pins unaffected
- .leaflet-heatmap-layer pointer-events:none — the visual-only FIRMS
  canvas sat on top of the overlay pane and ate clicks meant for vector
  blips/pins (pre-existing; fixes click-through for canvas pins too)

Critical-news layer and /api/news/map consumption unchanged.
2026-11-19 22:52:32 -05:00
Sirius DevOps
ca1c73e1a6 news: per-article proximate geolocation + GET /api/news/blips
Every graded article now carries best-effort geo on article_scores:
- parse_map_scores extracts Location/Lat/Lon/Confidence per block
  (clamp_coords-validated; Unknown -> no geo; never invent a place)
- place-name-only blocks resolve via a vendored offline GeoNames
  gazetteer (cities15000 + admin1 + country->capital), confidence approx
- nullable location_name/lat/lon/location_confidence columns (alembic
  014, single head; idempotent ensure_tables mirror) + partial bbox index
- GET /api/news/blips: frozen contract, dedup by article id (latest geo
  wins), finite coords only, created_at DESC, bbox/since/limit, default
  1000 max 5000, public read like /api/news/map
- critical/high map pins, ticker, grading thresholds, dedupe unchanged

Tests: 50 new summarizer geo tests (161 total), 18 new blips API
contract tests; alembic upgrade heads proven on fresh DBs both start
orders; forced batch on test DB yielded 10 non-critical blips with geo.

Card: t_bc15eb53
2026-11-19 22:50:59 -05:00
5ea43a3d0b Merge pull request 'ci: push amd64 images to the in-cluster Forgejo registry' (#63) from wt/ci-in-cluster-registry into master
All checks were successful
build-and-deploy / build-push (push) Successful in 11s
Reviewed-on: #63
2026-11-17 20:10:37 +00:00
tui-design
88b95f6a95 ci: log in with a write:package PAT called REGISTRY_TOKEN
Run 1364 got as far as building and naming the image, then every blob upload
401'd with 'unauthorized: reqPackageAccess'. Forgejo's container routes run
reqPackageAccess(Write), which checks the login token's own scope list for
write:package and rejects a scoped token without it — the token only has to
be scoped, since an unscoped token skips the check. The repo's FORGEJO_TOKEN
secret is such a scoped token.

FORGEJO_/GITHUB_ are reserved secret prefixes, so that name cannot be created
or updated through the API; the workflow now reads REGISTRY_TOKEN instead.
2026-11-17 15:10:13 -05:00
tui-design
005d271175 ci: push amd64 images to the in-cluster Forgejo registry
The build has been red since 2026-11-14 (runs 1342+). Every failure is the
registry login step:

  Error response from daemon: Get "http://127.0.0.1:3000/v2/": dial tcp
  127.0.0.1:3000: connect: connection refused

Forgejo moved off the Pi's docker into k8s, so PUSH_REGISTRY=127.0.0.1:3000
was the job pod's own loopback. Point it at the in-cluster service
forgejo.forgejo.svc.cluster.local:3000 (whitelisted insecure on the runner).

Also:
- runs-on amd64 instead of docker: label docker only exists on the arm64 Pi
  runner, whose images the amd64 cluster cannot run.
- drop the job-level permissions block; Forgejo ignores it and flags it with a
  pre-execution warning, which was being read as the cause of the failures.
- drop the compose deploy step: it ran docker compose against the dind daemon,
  redeploying nothing. Deploys are pinned tags in homek8s apps/base/osint; the
  summary now prints the tag to pin.
- tag images amd64-<sha12> (one canonical tag, no :latest drift).
2026-11-17 15:04:00 -05:00
7c77aa3103 Merge pull request 'fix(news): unwrap CDATA titles at ingest and on /api/news' (#62) from wt/t_4f334c8b into master
Some checks failed
build-and-deploy / build-push-deploy (push) Failing after 6s
Reviewed-on: #62
2026-11-17 19:57:07 +00:00
23286e14da Merge pull request 'feat(geofence): hear quakes, WFIGS incidents, and news pins' (#61) from wt/t_02dd06a8 into master
Some checks failed
build-and-deploy / build-push-deploy (push) Failing after 6s
Reviewed-on: #61
2026-11-17 19:56:56 +00:00
Sirius DevOps
0f91127233 feat(map): geofence inbox shows cameras and the news line
Some checks failed
build-and-deploy / build-push-deploy (push) Failing after 6s
A hit with evidence keeps the meta line and adds a second line: camera
count, the first camera name, and the first headline. A non-empty news
url is an anchor; an empty url stays text. Hits without evidence stay
the one-liner. snapshot_url is never written into the inbox.
2026-11-17 19:56:41 +00:00
3f11e647f0 Merge pull request 'fix(health): ignore future article timestamps; flag unset vessel/FIRMS keys' (#59) from wt/t_ceb74e64 into master
Some checks failed
build-and-deploy / build-push-deploy (push) Failing after 5s
Reviewed-on: #59
2026-11-17 19:56:20 +00:00
eefcc08b31 Merge pull request 'fix(summarizer): stamp ticker and map urls from the article, not the model' (#58) from wt/t_b564e062 into master
Some checks failed
build-and-deploy / build-push-deploy (push) Failing after 6s
Reviewed-on: #58
2026-11-17 19:56:03 +00:00
386118153e Merge branch 'master' into wt/t_f6e95af9
Some checks failed
build-and-deploy / build-push-deploy (push) Failing after 6s
2026-11-17 19:55:23 +00:00
0ba9754e1a Merge pull request 'fix(hud): hide vessel and FIRMS rows when those feeds are unset' (#56) from wt/t_617c8a08 into master
Some checks failed
build-and-deploy / build-push-deploy (push) Failing after 6s
Reviewed-on: #56
2026-11-17 19:55:16 +00:00
Sirius DevOps
13a4049137 fix(news): unwrap CDATA titles at ingest and on /api/news
Excelsior rows store the feed's CDATA wrapper as the title text, including
the surrounding whitespace. Strip a whole-title wrapper before insert and
again on GET /api/news so existing rows read clean without an UPDATE.
Plain titles and real HTML are unchanged.
2026-11-14 00:47:04 -05:00
Sirius DevOps
d878655617 feat(geofence): hear quakes, WFIGS incidents, and news pins
New hits carry a frozen evidence pack. adsb/ais/firms payloads stay
unchanged, and cameras are never passed to record_and_notify.
2026-11-14 00:40:10 -05:00
Sirius DevOps
02a9a5626b fix(health): ignore future article timestamps; flag unset vessel/FIRMS keys
/api/health articles.age_s used max(timestamp) with no future-date filter,
so rows ahead of now() reported a negative age. Use the same closed window
as the news list (timestamp <= now(); NULL timestamps are not fresh). If
every non-null timestamp is in the future, age_s is null and ok is false.

GET /api/stats keeps existing counters and adds feeds.vessels.configured
and feeds.fires.configured from non-empty api_keys values only. The stored
value is never returned.
2026-11-14 00:34:39 -05:00
Sirius DevOps
653e02b09f fix(summarizer): stamp ticker and map urls from the article, not the model
The reduce model returns url="" and save_batch was persisting that blank.
Match each headline to a selected article title and store that article's
url. A null article url or an ambiguous match stores "" — never a guessed
or model-supplied URL.
2026-11-14 00:32:43 -05:00
Sirius DevOps
9809fdf05b fix(cameras): stop publishing discovery rows as events
Camera scrapes still upsert the cameras table. They no longer
JetStream-publish events.camera messages, which the ingester was
inserting as HUD event spam.
2026-11-14 00:30:13 -05:00
Sirius DevOps
c572f0ee60 fix(hud): hide vessel and FIRMS rows when those feeds are unset
Read feeds.vessels.configured and feeds.fires.configured from /api/stats.
A missing feeds object leaves both rows visible. WFIGS and trains stay.
2026-11-14 00:30:04 -05:00
d04ddc9afa Merge pull request 'feat(summarizer): collapse syndicated duplicate stories before selection' (#55) from wt/t_b3af1cb0 into master
Some checks failed
build-and-deploy / build-push-deploy (push) Failing after 6s
2026-11-14 03:16:27 +00:00
Sirius DevOps
d40244900e feat(summarizer): collapse syndicated wire copies before selection
The map phase grades every article, but a single wire story arrives from
many station domains with an identical headline (the measured run selected
12 blocks that were only two stories, then produced a ticker with five
summit rows and one FAA row). Dedupe now runs before the threshold/cap, so
SUMMARY_TOP_N buys distinct stories.

- intel.py: pure `dedupe_blocks(blocks, *, similarity, enabled)` plus
  `normalize_title` / `title_similarity`. Titles are lowercased, punctuation
  flattened and a short digit-free trailing source suffix (" - KCCI",
  " | CNN", " — AP") dropped; blocks match on equal normalised titles or
  word-set Jaccard / word-sequence difflib ratio >= similarity (default
  0.85). Best score wins the group (ties -> earliest), matching is against
  the representative only (no transitive chaining), and differing categories
  or differing numbers never merge. Blocks now carry their article title.
- summarizer.py: dedupe graded blocks before select_graded() and log
  `dedupe 21 -> 9 (kept 9, duplicates 12)`; SUMMARY_DEDUPE=0 skips it,
  SUMMARY_DEDUPE_SIMILARITY tunes it. persist_article_scores() still writes
  one row per graded article, with duplicates selected=false and
  duplicate_of pointing at the surviving article id.
- article_scores.duplicate_of INTEGER NULL in ensure_tables() and alembic
  013 (upgrade/downgrade verified against Postgres 16).
- docs/news.md + .env.example document both knobs.

Replaying the observed summary id=6 (21 graded, 9 distinct titles) now keeps
9 and, at min_score=60/top_n=12, selects 2 — the 11 dropped copies that
scored >= 60 are stored selected=false with a duplicate_of pointer.
2026-11-13 22:14:44 -05:00
fa745ee3f7 Merge pull request 'fix(summarizer): ignore future-dated rows; require a score floor for the fallback' (#54) from wt/t_39f51764 into master
Some checks failed
build-and-deploy / build-push-deploy (push) Failing after 6s
2026-11-14 02:57:45 +00:00
backend
57c0444a69 fix(summarizer): ignore future-dated rows; require a score floor for the fallback
Two leaks let low-value items reach the operator brief:

- get_recent_news() only bounded the window from below, so event
  listings dated days ahead (wiseye.org, +3d/+6d) were re-fetched,
  re-graded and re-billed every interval for a week. The window is now
  (now - N, now]; NULL timestamps stay excluded as before.
- select_graded() returned ordered[:fallback_top] with no floor, so a
  15/100 event listing entered the brief as 'low'. New
  SUMMARY_FALLBACK_MIN_SCORE (default 40, clamped 0-100) filters the
  fallback set; when nothing clears it the reduce phase gets empty DATA
  and writes the empty-brief response. The fallback WARNING now logs the
  floor.

Docs: .env.example and docs/news.md document the new knob and window.
2026-11-13 21:56:46 -05:00
2c41737d42 Merge pull request 'feat(summarizer): score articles in the map phase, brief only the important ones' (#53) from wt/t_87992985 into master
Some checks failed
build-and-deploy / build-push-deploy (push) Failing after 8s
2026-11-14 02:49:24 +00:00
hermes-backend
853e87b7c5 feat(summarizer): score articles in the map phase, brief only the important ones
The map prompt now grades every article 0-100 against an explicit rubric as
the first line of its block; the summarizer parses Score:, falls back to the
Importance: label when the line is missing, ranks blocks best-first and passes
only score >= SUMMARY_MIN_SCORE (capped at SUMMARY_TOP_N) to the reduce phase.

- new pure helpers in intel.py: parse_map_scores(), select_graded(), join_blocks()
- reduce prompts drop the 'fill the brief with minor incidents and crime'
  filler instructions and the 'fill ticker with medium then low' clause
- new article_scores table (ensure_tables + alembic 012) persists every grade
  with selected/summary_id/model so thresholds can be tuned from data
- SUMMARY_MIN_SCORE (60), SUMMARY_TOP_N (12), SUMMARY_FALLBACK_TOP (3) env knobs
2026-11-13 21:47:30 -05:00
58f71f5b45 Merge pull request 'fix(news): drop future-dated items at ingest, hide them in /api/news' (#52) from wt/t_b8b8e927 into master
Some checks failed
build-and-deploy / build-push-deploy (push) Failing after 6s
2026-11-14 02:43:23 +00:00
backend
c42d375d6c fix(news): drop future-dated items at ingest, hide them in /api/news
wiseye.org public-affairs event listings carry pubDate 3-6 days ahead; with
ORDER BY timestamp DESC they pinned the top of the feed for a week and made
the news list look frozen.

- PostgresPipeline drops items whose parsed publish date is >2h in the
  future, counts future_dated_dropped (stats + one INFO line per run).
  Unparseable dates keep the old behaviour (kept, timestamped now()).
- GET /api/news filters timestamp > now() in the query while still returning
  timestamp IS NULL rows; limit/offset/domain/since unchanged.
- docs/news.md documents the guard.
- tests: pipeline drop/keep unit tests, API future-row exclusion + limit.
2026-11-13 21:41:44 -05:00
84ea0a17b1 Merge pull request 'feat(auth): ADMIN_COOKIE_SECURE forces the session cookie Secure' (#51) from wt/t_e5a0c384 into master
Some checks failed
build-and-deploy / build-push-deploy (push) Failing after 6s
2026-11-14 02:16:57 +00:00
Hermes Backend
72757e7c51 feat(auth): ADMIN_COOKIE_SECURE forces the session cookie Secure
Behind the cluster's HTTP origin listener Envoy normalizes
X-Forwarded-Proto to http, so _is_https() never fires and the session
cookie was issued without Secure. Add an explicit deploy-time flag:
set_session_cookie() now marks the cookie Secure when the env var is
1/true/yes (case-insensitive, stripped) or the header inference says
https. clear_session_cookie() is unchanged, SameSite stays Lax.

Tests cover flag-over-http, header-without-flag, and the local-dev path;
docs/auth.md and .env.example document the variable.
2026-11-13 21:15:05 -05:00
d8113b37b8 Merge pull request 'feat(auth): public read-only HUD, admin-only API keys and mutations' (#50) from feat/public-hud-admin-auth into master
Some checks failed
build-and-deploy / build-push-deploy (push) Failing after 6s
Reviewed-on: #50
2026-11-14 02:05:19 +00:00
Sirius DevOps
c0a2454fdd feat(auth): public read-only HUD, admin-only API keys and mutations
Adds single-admin authentication to the dashboard. Anonymous visitors get a
read-only site (map + news); the one admin unlocks everything else.

- app/auth.py: deny-by-default ASGI middleware on /api/* with an explicit
  public read allowlist; /login page; /api/auth/{login,logout,me}; PBKDF2
  password hashing; HMAC-signed HttpOnly SameSite=Lax session cookie (7d,
  Secure behind X-Forwarded-Proto: https); 5-fail/15-min per-IP login limit;
  Origin/Referer host check on state-changing admin requests.
- Fails closed: missing ADMIN_PASSWORD_HASH or ADMIN_SESSION_SECRET -> admin
  routes 403 'admin auth not configured', public site unaffected.
- app/main.py: mounts the middleware + router (6 lines, no per-route decorators).
- app/static/index.html: hides Ingest/API Keys/Settings, the summarizer panel
  and geofence write controls until /api/auth/me says admin; adds a discreet
  SIGN IN link to /login. CSS gates fail closed without JS.
- tests/test_auth.py: 42 tests (anonymous 401s, login/logout, tampered and
  expired cookies, fail-closed, rate limit, CSRF, HUD markup).
- Existing API tests now send an admin session cookie for admin routes.

Public allowlist extends the spec's list with the remaining read-only GETs the
HUD calls (/api/stats, /api/conflicts, /api/place, /api/satellites,
/api/infrastructure, /api/map/gpsjam, /api/map/times, /api/fire-incidents,
/api/fire-perimeters, /api/weather-alerts, /api/storms, /api/geofences/{id}/at)
so an anonymous HUD is not half-broken.
2026-11-13 20:56:07 -05:00
38eb4fe4d6 Merge pull request 'feat(map): quiet HUD chrome — VIIRS default, collapsed layer rail' (#49) from feat/hud-chrome-quiet into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 27s
Reviewed-on: #49
2026-09-01 17:21:09 -04:00
Sirius DevOps
0fa49b8407 fix(map): NEWS ticker fills 32px news-only dock
.ticker stayed at height:50% after MKT was hidden, leaving an empty
half-bar. .dock.news-only .ticker is now 100% of the 32px dock.
2026-09-01 17:15:32 -04:00
Sirius DevOps
beb457c382 feat(map): quiet HUD chrome — VIIRS default, collapsed rail
Satellite-first chrome: daily VIIRS preferred, layer rail collapsed on
load, geofence after basemap, FIRMS-only default overlays, hide MKT
standby ticker, Strait select instead of buttons, IBM Plex instead of
Orbitron, news as 6px circleMarkers.
2026-09-01 17:15:24 -04:00
cb20473119 Merge pull request 'feat(map): geofence watch HUD — finish/cancel, inbox, fence DVR' (#48) from feat/geofence-watch-ui into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 21s
Reviewed-on: #48
2026-09-01 07:44:36 -04:00
Sirius DevOps
8c97ce50d2 feat(map): geofence watch HUD — finish/cancel, inbox, fence DVR
Phone can finish a polygon without double-click. List is mute/go/rename/delete.
Inbox seeds from /api/geofence-alerts and appends WS hits. Watch all fence
ids on /ws/live. Selected-fence DVR uses GET /api/geofences/{id}/at.
2026-09-01 01:36:21 -04:00
75e065f8c2 Merge pull request 'feat(geofence): watch list, filtered hit log, fence snapshot' (#47) from feat/geofence-watch into master
All checks were successful
build-and-deploy / build-push-deploy (push) Successful in 15s
Reviewed-on: #47
2026-09-01 01:26:31 -04:00
Sirius DevOps
f6c1cfc454 feat(geofence): watch list, filtered hit log, fence snapshot
Off-viewport clients that send {type:watch_geofences,ids} on /ws/live
still receive geofence_alert; AIS/ADS-B stay viewport-only.

GET /api/geofence-alerts accepts geofence_id/since/until/source_kind.
GET /api/geofences/{id}/at returns CAGG+FIRMS inside the fence at T
(404 if missing, empty lists if DB down). DELETE missing fences 404s.
2026-09-01 01:24:36 -04:00