prop/lib/microwaveprop/propagation
Graham McIntire 8a969e315c
refactor: normalize pos1/pos2 JSONB key to 'lon' everywhere
57,186 prod contacts stored pos1/pos2 with 'lng'; 1,133 used 'lon'.
Every Elixir caller carried a `pos["lon"] || pos["lng"]` fallback
— which just caused a SQL widget to silently miscount 98% of contacts
(count_narr_done used `pos1->>'lon'` directly, no fallback, so every
lng-keyed row returned NULL and failed the coverage check).

- Migration rewrites every pos1/pos2 JSONB in place, renaming 'lng' to
  'lon' and dropping 'lng'.
- Removes all 20+ `|| pos["lng"]` fallbacks across lib/, workers,
  scorer, weather, radio.ex, contact show view, and recalibrator.
- lib_ml/propagation_analyze.ex SQL now reads pos1->>'lon' directly
  (was reading 'lng' only, which would have broken after migration).
- priv/repo/import_contacts.exs one-time seed script now emits 'lon'
  with string keys, matching production shape.
- Test fixtures in 4 test files normalized to 'lon'.
- Two lng-characterization tests deleted — nonsensical post-normalize.
- Updated notebook + old import_weather script to match.
- JS hook contact_map_hook.ts TypeScript type narrowed to 'lon'.
2026-04-17 09:10:32 -05:00
..
band_config.ex Rename 9cm band 3456 → 3400 2026-04-16 12:40:38 -05:00
duct.ex Fix all remaining credo --strict issues (0 issues) 2026-04-12 10:26:53 -05:00
freshness_monitor.ex fix(propagation): dedup PropagationGridWorker enqueues 2026-04-16 14:58:55 -05:00
grid.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
hf_muf.ex HfMuf physics: distance-adjusted MUF from GIRO MUFD(3000) 2026-04-15 14:59:39 -05:00
inversion.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
pipeline_status.ex Sync map progress chip to what's actually loadable 2026-04-15 09:05:03 -05:00
profiles_file.ex ProfilesFile.read/1: drop [:safe] flag, trust our own files 2026-04-15 17:04:34 -05:00
rain_scatter.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
recalibrator.ex refactor: normalize pos1/pos2 JSONB key to 'lon' everywhere 2026-04-17 09:10:32 -05:00
region.ex Phase 7: Regionalized seasonal scoring 2026-04-10 08:39:01 -05:00
score_cache.ex Add more caching to make the map feel instant 2026-04-12 12:26:25 -05:00
scorer.ex refactor: normalize pos1/pos2 JSONB key to 'lon' everywhere 2026-04-17 09:10:32 -05:00
scores_file.ex Run PropagationGridWorker hourly, retain only the current chain's window 2026-04-14 15:26:58 -05:00
sporadic_e.ex Add 50/144/222 MHz bands, rename 440→432 2026-04-16 12:36:10 -05:00