prop/test/microwaveprop/weather
Graham McIntire 9f583a16bf
perf(weather/scalar_file): single MessagePack format for both Elixir and Rust
Move ScalarFile from a dual-writer dual-format setup (ETF on the Elixir
side, materialized via NotifyListener; nothing on the Rust side) to a
single chunked-MessagePack format that both languages produce and
consume.

Elixir side:

- ScalarFile now writes gzipped MessagePack `.mp.gz` per chunk via
  Msgpax. Reader decodes with Msgpax + zlib. Atom keys are stripped to
  strings on encode and re-atomized via a whitelist on read so callers
  see the same shape regardless of which side wrote the bytes.
- DateTime values round-trip through ISO8601 strings.
- New cross-language wire-format test that decodes a hand-rolled
  payload mirroring exactly what `rmp_serde::to_vec_named` emits, so a
  format regression on either side fails the suite.

Rust side:

- New `prop_grid_rs::weather_scalar_file` module:
  - 1:1 port of `Microwaveprop.Weather.WeatherLayers.derive/1` plus
    the surface fields `Weather.build_grid_cache_row/4` adds on top
    (lapse rate, mid lapse rate, inversion strength + base, 850/700 mb
    interpolation, surface RH, surface refractivity, ducting flag).
  - `write_atomic` chunks rows into 5°×5° buckets, writes one
    `<lat_band>_<lon_band>.mp.gz` per chunk via tmp + rename, drops
    pre-existing chunks first to keep writes canonical.
  - 5 unit tests covering surface-only rows, upper-air derivation,
    write/read round-trip, chunk band boundaries, and the
    out-of-physical-range surface-temp filter.
- Pipeline integration: both `run_chain_step` (f01..f18) and the f00
  analysis path now build `Vec<ScalarRow>` in the same merged-cell
  pass that builds `CellEntry` and `Conditions`, then fire a parallel
  `spawn_blocking` write that overlaps with scoring. Awaiting the
  scalar future after the score-band writes keeps the failure-surface
  symmetric with the existing profile_future.

Result: every new forecast hour lands with the scalar artifact already
on disk, so /weather reads never fall through to ProfilesFile decode +
per-cell SoundingParams + WeatherLayers derivation. The Elixir-side
`NotifyListener.handle_propagation_ready/1` materialization remains as
an idempotent safety net for hours that pre-date this commit.
2026-04-29 08:26:28 -05:00
..
grib2 fix: April 2026 codebase review — address 13 bugs across propagation chain 2026-04-25 10:52:51 -05:00
frontal_analysis_test.exs Fix credo warnings: struct specs, length/1, and test patterns 2026-04-12 10:26:53 -05:00
gefs_client_test.exs test: coverage round 1 (80.45% → 82.05%) + 12 new property tests 2026-04-24 10:15:37 -05:00
gefs_profile_test.exs feat(gefs): scaffold extended-horizon forecast ingestion 2026-04-18 14:28:44 -05:00
grid_cache_test.exs feat(observability): emit telemetry for NotifyListener warm + GridCache hit/miss 2026-04-21 13:30:26 -05:00
grid_snap_property_test.exs fix: April 2026 codebase review — address 13 bugs across propagation chain 2026-04-25 10:52:51 -05:00
hrrr_client_test.exs feat(skewt): fetch full 25-level profile and drop valid_time URL param 2026-04-25 15:19:34 -05:00
hrrr_native_client_test.exs test: coverage round 4 (84.39% → 84.44%) + 6 new property tests 2026-04-24 10:32:05 -05:00
hrrr_native_profile_test.exs Extend skew-T plot to cover the full troposphere 2026-04-14 17:25:58 -05:00
hrrr_profile_lookup_test.exs fix(skewt): only fall back to profiles with all 13 pressure levels 2026-04-25 14:19:56 -05:00
hrrr_profile_test.exs Partition hrrr_profiles by valid_time for query performance 2026-04-01 11:03:33 -05:00
iem_client_test.exs perf(weather): batch ASOS fetches into one multi-station request 2026-04-24 12:44:22 -05:00
iem_rate_limiter_test.exs perf(weather): adaptive IemRateLimiter + rebatch mix task 2026-04-24 12:57:25 -05:00
iemre_observation_test.exs Add IEM precipitation data to QSO weather pipeline 2026-03-30 13:18:11 -05:00
narr_client_test.exs fix(narr): handle cdo 2.5.1 mixed name/code output 2026-04-16 15:14:51 -05:00
ncei_metar_client_test.exs test: coverage round 3 (83.96% → 84.39%) + 10 new property tests 2026-04-24 10:15:37 -05:00
nexrad_cache_test.exs perf(nexrad): route fetch_decoded_frame through NexradCache 2026-04-19 09:05:55 -05:00
nexrad_client_test.exs test: coverage round 4 (84.39% → 84.44%) + 6 new property tests 2026-04-24 10:32:05 -05:00
nexrad_observation_test.exs Phase 9.3, 9.4, and Phase 3 NEXRAD pipeline 2026-04-10 12:48:36 -05:00
rtma_client_test.exs test: coverage round 3 (83.96% → 84.39%) + 10 new property tests 2026-04-24 10:15:37 -05:00
scalar_file_test.exs perf(weather/scalar_file): single MessagePack format for both Elixir and Rust 2026-04-29 08:26:28 -05:00
skewt_params_test.exs feat(skewt): NOAA SPC line colors + sounding-parameter parity 2026-04-25 13:26:41 -05:00
solar_client_test.exs test: cover Format.number/bytes, Instrument.span, SolarClient edges 2026-04-23 14:09:13 -05:00
sounding_params_property_test.exs test: coverage round 2 (82.05% → 83.96%) + 23 new property tests 2026-04-24 10:15:37 -05:00
sounding_params_test.exs fix: April 2026 codebase review — address 13 bugs across propagation chain 2026-04-25 10:52:51 -05:00
sounding_test.exs Add weather data schema, context, sounding params, and IEM ingestion 2026-03-28 15:57:19 -05:00
station_test.exs Add weather data schema, context, sounding params, and IEM ingestion 2026-03-28 15:57:19 -05:00
surface_observation_test.exs Add IEM precipitation data to QSO weather pipeline 2026-03-30 13:18:11 -05:00
theta_e_test.exs Phase 2 tasks 2.1-2.4: BL turbulence feature computations 2026-04-10 08:21:23 -05:00
uwyo_sounding_client_test.exs test: broaden coverage across parsers, schemas, and pure helpers 2026-04-23 13:56:29 -05:00
weather_layers_test.exs feat(weather): add 700 mb T/Td and mid-layer lapse rate for cap diagnostics 2026-04-24 19:27:23 -05:00