feat: add GenericHttpAdapter (kind=generic_http, v0.15.0 PR2) (#121)

One config-driven adapter class that operators can instantiate many times
via distinct config.adapters rows (unique name, kind="generic_http").
Ships class + Pydantic settings schema + unit tests only; no GUI create
route, no migration, no seeded row (PR3). Class is dormant until an
operator row exists.

Key design decisions:
- self.name = config.name in __init__ scopes dedup to each instance
- domain validated against STREAMS registry at import time
- subject_for derives region from event.data["_enriched"]["geocoder"]
  identically to usgs_quake (no static subject_region setting)
- _dig() helper supports dotted paths into nested dicts/lists

Also adds: GUI partials (_event_summaries, _event_rows), CONSUMER-
INTEGRATION.md §6 subsection, and test_events_feed_frontend.py sample
entry — all required by the existing adapter-coverage consistency tests.

Co-authored-by: Ubuntu <zvx@cortex.echo6.co>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
malice 2026-06-30 11:13:06 -06:00 committed by GitHub
commit 3effd677a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 1163 additions and 0 deletions

View file

@ -1189,6 +1189,7 @@ _SAMPLE_INNER = {
"current_lat_deg": -17.1487,
"current_alt_km": 417.4,
},
"generic_http": {"title": "Generic source alert"},
}
# Exact expected subjects for the deterministic adapters. swpc_alerts is omitted