prop/rust/prop_grid_rs/src
Graham McIntire 3f2d97735e
fix: three more Rust/Elixir contract drift bugs on /map and /weather
Found by auditing the ProfilesFile, hrrr_profiles, and weather-layer
contracts against what the Rust writers actually emit.

Bug 1 (HIGH) — Rust `hrrr_points` worker upserted hrrr_profiles rows
  with NULL `surface_refractivity`, `min_refractivity_gradient`, and
  `ducting_detected`. The Elixir HrrrClient path always wrote them
  via SoundingParams.derive. Per-QSO pages that rely on these
  scalars ("N:", "dN/dh:", duct badge) showed "—" for any contact
  enriched through Stream C. Fixed by porting
  `surface_refractivity` + `ducting_detected` into Rust's
  `sounding_params.rs` and deriving at upsert time.

Bug 2 (HIGH) — Rust f01..f18 `cell_to_profile_entry` never emitted
  wind_u / wind_v / cloud_cover_pct / precip_mm into ProfilesFile
  cells. `Propagation.factors_for` recomputes factor scores from the
  profile cell on /map click, and these four fields are read
  (wind_speed_kts, sky_cover_pct, precip_to_rate_mmhr). Result: every
  f01..f18 point-detail popup showed 0 for wind/sky/rain factors.
  Fixed by extracting the grib values at cell_to_profile_entry time
  and whitelisting the keys for atomization in
  profiles_file.ex `@mp_atom_keys`.

Bug 4 (MEDIUM) — `WeatherLayers.duct_field/2` only knew the
  `SoundingParams.detect_ducts` shape (`d["base"]` / `d["strength"]`).
  The Rust/HrrrNativeClient shape uses `:base_m` / `:thickness_m`
  atom keys (post-ProfilesFile.read atomization). On /weather, the
  Duct Base / Duct Strength layers returned nil for every Rust-origin
  cell. Tolerant lookup now reads either shape; uses `thickness_m`
  as the "strength" proxy for the native shape (thicker duct traps
  a wider band).

Skipped (verified but lower impact):
- Rust ProfilesFile aggregates ducts as scalars, not per-layer — the
  `ducts` array in the popup is always empty. Requires larger
  DuctMetrics refactor in Rust; deferred.
- `complete_hrrr_task` emits no NOTIFY (vs `complete` which does).
  Elixir has no matching listener yet, so adding NOTIFY alone is a
  no-op; the existing cron reconciler catches it.
- `:best_duct_band_ghz` fallback in propagation.ex is dead code;
  cleanup, not a bug.

133 Rust tests + 2842 Elixir tests + credo green.
2026-04-24 14:04:02 -05:00
..
bin chore(rust): drop easily-inlined deps (anyhow, bytes, byteorder, num_cpus) 2026-04-24 12:13:25 -05:00
band_config.rs style(rust): apply cargo fmt across prop_grid_rs 2026-04-20 13:20:22 -05:00
commercial.rs fix(commercial): decode commercial_links.id as Uuid, not i64 2026-04-20 09:21:10 -05:00
db.rs style(rust): apply cargo fmt across prop_grid_rs 2026-04-20 13:20:22 -05:00
decoder.rs chore(rust): drop easily-inlined deps (anyhow, bytes, byteorder, num_cpus) 2026-04-24 12:13:25 -05:00
duct.rs style(rust): apply cargo fmt across prop_grid_rs 2026-04-20 13:20:22 -05:00
fetcher.rs chore(rust): drop futures and pretty_assertions 2026-04-24 12:23:10 -05:00
grid.rs feat(grid-rs): Rust worker for HRRR f01..f18 propagation chain 2026-04-19 15:42:49 -05:00
hrrr_points.rs fix: three more Rust/Elixir contract drift bugs on /map and /weather 2026-04-24 14:04:02 -05:00
lib.rs chore(grid-rs): retrigger Rust CI to heal ImagePullBackOff 2026-04-24 08:54:49 -05:00
metrics.rs style(rust): apply cargo fmt across prop_grid_rs 2026-04-20 13:20:22 -05:00
native_duct.rs perf(rust): intern CellValues keys as Arc<str> to kill per-cell String clones 2026-04-21 17:54:44 -05:00
nexrad.rs chore(rust): drop easily-inlined deps (anyhow, bytes, byteorder, num_cpus) 2026-04-24 12:13:25 -05:00
pipeline.rs fix: three more Rust/Elixir contract drift bugs on /map and /weather 2026-04-24 14:04:02 -05:00
profiles_file.rs perf(wire)+ts: pack scores as flat tuples, bump ProfilesFile gzip, tighten TS types 2026-04-21 17:45:06 -05:00
region.rs feat(grid-rs): Rust worker for HRRR f01..f18 propagation chain 2026-04-19 15:42:49 -05:00
scorer.rs style(rust): apply cargo fmt across prop_grid_rs 2026-04-20 13:20:22 -05:00
scores_file.rs chore(rust): drop easily-inlined deps (anyhow, bytes, byteorder, num_cpus) 2026-04-24 12:13:25 -05:00
sounding_params.rs fix: three more Rust/Elixir contract drift bugs on /map and /weather 2026-04-24 14:04:02 -05:00
telemetry.rs chore(rust): drop OpenTelemetry stack to speed up cold builds 2026-04-24 09:11:43 -05:00