feat(generic): config-driven REST/GeoJSON source adapter (ported from Central) (#78)

Universal, no-code data sources: one GenericHttpAdapter polls any public
REST/GeoJSON feed per config.generic_sources[] — dotted-path field mapping
(items/id/lat/lon/geometry/title/fields) → coverage-gated, persisted
(generic_events, v26), cold-start-silent, LLM-queryable events. Ports
Central's GenericHttpAdapter to meshai native. First real use case: Idaho
Power outages, configured (not hardcoded) — anyone can point it at their own
utility/feed. GUI editor is a follow-up.

Co-authored-by: Matt Johnson <mj@k7zvx.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
malice 2026-07-07 00:20:02 -06:00 committed by GitHub
commit 30212ceb18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 897 additions and 7 deletions

View file

@ -99,9 +99,9 @@ def _ingest_envelope(norad_id=25544, observer="Boise", max_el=72.5,
# ── schema / migration ───────────────────────────────────────────────
def test_schema_version_is_current():
# Bumped to 25 by the LLM-persistence migrations (v24 avalanche_events,
# v25 ducting_events); was 23 at the native-satpass observer_locations (v23).
assert SCHEMA_VERSION == 25
# Bumped to 26 by the generic-source migration (v26 generic_events); v24
# avalanche_events, v25 ducting_events; was 23 at native-satpass (v23).
assert SCHEMA_VERSION == 26
def test_v22_migration_applies_and_adds_due_at_column(tmp_path, monkeypatch):
@ -114,7 +114,7 @@ def test_v22_migration_applies_and_adds_due_at_column(tmp_path, monkeypatch):
close_thread_connection()
conn = init_db()
row = conn.execute("SELECT value FROM schema_meta WHERE key='version'").fetchone()
assert int(row["value"]) == 25
assert int(row["value"]) == 26
cols = {r["name"] for r in conn.execute("PRAGMA table_info(satpass_pending)")}
assert "due_at" in cols
close_thread_connection()