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
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.
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.
/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.
Camera scrapes still upsert the cameras table. They no longer
JetStream-publish events.camera messages, which the ingester was
inserting as HUD event spam.
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.
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.
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.
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.
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.
Reject private/loopback/link-local hosts on POST /api/ingest/rss and
URL-shaped GDELT queries via camera_scraper.is_public_url (HTTP 400).
PATCH /api/sources/{id} only accepts name, url, config, enabled (422 else).
Pin titiler to the Pi-running digest, make workers=1 explicit for
in-memory WS/layer caches, and add PostGIS GIST indexes for events/fires
bbox pans without dropping the existing btree indexes.
GET /api/satellites?groups=stations,weather returns last-known satellite
positions propagated from CelesTrak GP JSON (OMM mean elements, not TLE)
via the real sgp4 library (TEME->geodetic), not two-body Kepler.
- Fetch gp.php?GROUP=...&FORMAT=JSON at most once per 2h per group,
cached with a last-good blob fallback for 403 / stale responses.
- SatNOGS TLE fallback only when the CelesTrak cache is empty.
- bbox viewport culling; unknown group -> 400.
- overlay_catalog() gains id=satellites (kind=points, /api/satellites).
- OMM path handles NORAD cat numbers >= 100000 (no TLE round-trip).
Poll GET /api/stats ~30s for rail integers (404 falls back to overlay
array lengths). Keyboard: ? cheat sheet, L layers, R reset, Esc closes
panels; F/S left unbound. Cheap sun-position day/night overlay default
off. Camera/HLS thumbs only at zoom >= 12. NOAA SWPC Kp chip in the
status strip (browser-direct; hide on failure).
Default-off LAYERS row paints L.circleMarker theatres colored by
severity (war/high/elevated). Popup shows label, description, and
eventCount. Catalog is fetched once (not on moveend). A 404 hides
the toggle. Null lat/lon rows are skipped so they never pin at 0,0.