feat(persistence): make satpass/avalanche/ducting LLM-queryable (#74)

Close the LLM data gaps: add build_satpass_detail (satpass_events was written
but had no reader), and give avalanche + ducting durable tables (v24/v25) with
native writers + env_reporter readers so the mesh LLM can answer avalanche,
satellite-pass, and RF-propagation questions. Persistence-only; no broadcast/
gating changes.

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-06 16:24:26 -06:00 committed by GitHub
commit 3fb4e6e65c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 570 additions and 8 deletions

View file

@ -99,8 +99,9 @@ def _ingest_envelope(norad_id=25544, observer="Boise", max_el=72.5,
# ── schema / migration ───────────────────────────────────────────────
def test_schema_version_is_current():
# Bumped to 23 by the native-satpass observer_locations migration (v23).
assert SCHEMA_VERSION == 23
# 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
def test_v22_migration_applies_and_adds_due_at_column(tmp_path, monkeypatch):
@ -113,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"]) == 23
assert int(row["value"]) == 25
cols = {r["name"] for r in conn.execute("PRAGMA table_info(satpass_pending)")}
assert "due_at" in cols
close_thread_connection()