prop/lib/microwaveprop/propagation
Graham McIntire b80878056d
feat(grid-rs): Rust worker for HRRR f01..f18 propagation chain
Extracts the memory-hostile HRRR fetch → decode → score pipeline for
forecast hours 1–18 into a separate Rust service (`prop-grid-rs`).
Elixir retains f00 with its native-duct + NEXRAD + commercial-link
enrichment; Rust handles the other 18 steps per hourly chain.

Hand-off via a new `grid_tasks` table (`FOR UPDATE SKIP LOCKED` claim
from Rust, Postgrex `NOTIFY propagation_ready` back to Elixir). Rust
writes the same on-disk score-grid format Elixir already uses, to the
same `/data/scores` NFS tree. Phase 1 ships in shadow mode with
PROP_SCORES_DIR=/data/scores_shadow.

Rust crate layout at `rust/prop_grid_rs/` (1:1 module parity with the
Elixir source it ports):
  - grid, region, band_config, scores_file, sounding_params
  - scorer: all 10 factors + composite. Matches the Elixir scorer
    byte-for-byte across 115 golden-fixture samples (5 scenarios
    × 23 bands).
  - decoder: wgrib2 subprocess + Fortran-record lola-binary parser
  - fetcher: HRRR URL derivation + idx cache (1h TTL) + 8-way
    parallel byte-range downloads with 429/5xx retry
  - pipeline: end-to-end chain step, f00 rejected at the boundary
  - db: sqlx grid_tasks claim/complete + propagation_ready NOTIFY
  - bin/worker: tokio main loop, JSON logs, SIGTERM-safe

91 Rust tests + clippy -D warnings clean. 2,158 Elixir tests green.

Elixir additions:
  - `GridTaskEnqueuer` seeds fh=1..18 rows from
    `PropagationGridWorker.seed_chain/0`
  - `NotifyListener` LISTEN → warm `ScoreCache` → PubSub fan-out
  - `ShadowComparator` diffs prod vs shadow `.ntms` bodies
  - `mix rust.golden` task writes the Rust-side golden fixture

k8s: new `deployment-grid-rs.yaml` pinned to talos5 (32 GB NUC) via
`prop-grid-rs=primary` nodeSelector + `workload=grid-rs:NoSchedule`
toleration, 512 Mi limit, sharing the existing NFS `/data` mount.

The plan document is at `plans/vivid-hatching-quail.md` (local to my
workstation); phases 2 (cutover) and 3 (talos5 concurrency tuning)
follow after 72h of shadow-mode parity.
2026-04-19 15:42:49 -05:00
..
band_config.ex feat(propagation): per-band weight calibration from full-corpus correlation 2026-04-18 10:19:26 -05:00
common_volume.ex feat(rainscatter): classify QSO propagation mechanism from common-volume radar 2026-04-17 15:57:59 -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
grid_task_enqueuer.ex feat(grid-rs): Rust worker for HRRR f01..f18 propagation chain 2026-04-19 15:42:49 -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
mechanism_classifier.ex feat(propagation): per-contact mechanism classification 2026-04-18 10:42:08 -05:00
moon_ephemeris.ex feat(propagation): per-contact mechanism classification 2026-04-18 10:42:08 -05:00
notify_listener.ex feat(grid-rs): Rust worker for HRRR f01..f18 propagation chain 2026-04-19 15:42:49 -05:00
pipeline_status.ex feat(map): shareable URL params for view/band/time 2026-04-19 08:53:07 -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
rain_scatter_classifier.ex feat(rainscatter): classify QSO propagation mechanism from common-volume radar 2026-04-17 15:57:59 -05:00
recalibrator.ex perf: finish audit follow-ups (path conditions, recalibrator parallelism) 2026-04-18 12:23:18 -05:00
region.ex Phase 7: Regionalized seasonal scoring 2026-04-10 08:39:01 -05:00
run_timing.ex feat(propagation): record per-forecast-hour chain step timings 2026-04-18 09:36:52 -05:00
score_cache.ex perf: reduce per-pod RSS and HRRR chain wall time 2026-04-19 14:56:48 -05:00
scorer.ex perf(propagation): parallel chain fan-out + hoist shared factors 2026-04-19 09:39:06 -05:00
scores_file.ex Run PropagationGridWorker hourly, retain only the current chain's window 2026-04-14 15:26:58 -05:00
shadow_comparator.ex feat(grid-rs): Rust worker for HRRR f01..f18 propagation chain 2026-04-19 15:42:49 -05:00
sporadic_e.ex Add 50/144/222 MHz bands, rename 440→432 2026-04-16 12:36:10 -05:00