prop/test/microwaveprop/propagation
Graham McIntire 733a7f5bf1
fix(review): address code-reviewer findings
Fixes flagged by the code-reviewer agent's pass over the session's
commits (cc9220b..7b78a25):

- Propagation.warm_cache_and_broadcast/2 now uses ScoresFile.read/2
  directly and returns {:ok, :ok} | {:error, :enoent | :invalid_format}.
  Previously it called ScoresFile.read_bounds/3 which silently returns
  [] on missing/corrupt files, poisoning ScoreCache with an empty grid
  that the reconciler couldn't heal.
- NotifyListener.warm_band/2 and ScoreCacheReconciler.warm_one/2 now
  pattern-match {:error, reason} and skip (log, return :error) instead
  of caching empty. rescue clauses kept as defense-in-depth for
  unexpected faults in PubSub.broadcast / ETS writes.
- ScoresFile.extract_points/2 promoted to @doc public — callers that
  need to distinguish missing file from empty grid can feed read/2
  payloads here themselves.
- Weather.build_grid_cache_row/4: replaced || fallbacks with prefer/3
  helper (Map.fetch) so a legitimate persisted ducting_detected: false
  is not clobbered by a derived-from-sounding true.
- Weather.hrrr_data_fully_present?/1 @spec tightened from map() to
  Contact.t() | field-constrained map, plus is_nil(qso_timestamp)
  guard so callers with partial contacts get a clean false rather
  than a HrrrClient.nearest_hrrr_hour/1 crash.
- AdminTaskWorker.native_derive bulk-UPDATE: chunk reduced 2000 → 500
  and wrapped in try/rescue with per-row fallback on Postgrex errors
  so a single bad row doesn't kill the remaining 1999 in its chunk.
- Runbook FM3 rewritten to match the actual code path (no rescue;
  explicit {:error, _} pattern match). FM5 clarifies the surviving
  PropagationGridWorker is a cron-fired seed worker, not a fallback
  compute path.
- Dialyzer: strict flags added (:error_handling, :unknown,
  :unmatched_returns, :extra_return, :missing_return). Baseline
  emitted 130 warnings, mostly discarded Task.start/PubSub/Logger
  returns; a follow-up will tighten those and backfill @specs.

New tests:
- ScoreCacheReconciler GenServer lifecycle: run_on_start true/false,
  interval_ms rescheduling, info-level log line.
- Weather.hrrr_data_fully_present?/1: nil qso_timestamp returns false.
- Weather.build_grid_cache_rows/2: explicit ducting_detected: false
  on profile beats derived true from sounding params.
- RadarFrameWorker: pins the NexradClient "NEXRAD n0q HTTP <code>"
  error string contract so permanent_error?/1 classification doesn't
  silently regress if the client's error format changes.
2026-04-21 10:09:46 -05:00
..
band_config_test.exs feat(propagation): per-band weight calibration from full-corpus correlation 2026-04-18 10:19:26 -05:00
common_volume_test.exs feat(rainscatter): classify QSO propagation mechanism from common-volume radar 2026-04-17 15:57:59 -05:00
duct_test.exs Phase 4: Ray-traced duct geometry 2026-04-10 08:31:16 -05:00
freshness_monitor_test.exs fix(propagation): dedup PropagationGridWorker enqueues 2026-04-16 14:58:55 -05:00
grid_task_enqueuer_test.exs feat(grid-rs): Rust worker for HRRR f01..f18 propagation chain 2026-04-19 15:42:49 -05:00
grid_test.exs Increase grid to 0.125 degrees with smooth canvas overlay 2026-03-31 08:52:07 -05:00
hf_muf_test.exs HfMuf physics: distance-adjusted MUF from GIRO MUFD(3000) 2026-04-15 14:59:39 -05:00
inversion_test.exs Phase 2 tasks 2.1-2.4: BL turbulence feature computations 2026-04-10 08:21:23 -05:00
mechanism_classifier_test.exs feat(propagation): per-contact mechanism classification 2026-04-18 10:42:08 -05:00
model_test.exs Integrate ML model into grid worker, QSO search, and UI improvements 2026-04-01 10:14:22 -05:00
pipeline_status_test.exs feat(map): shareable URL params for view/band/time 2026-04-19 08:53:07 -05:00
profiles_file_test.exs feat(profiles_file): read Rust-written MessagePack alongside legacy ETF 2026-04-19 18:10:23 -05:00
rain_scatter_classifier_test.exs feat(rainscatter): classify QSO propagation mechanism from common-volume radar 2026-04-17 15:57:59 -05:00
rain_scatter_test.exs test: cover propagation/rain_scatter 2026-04-16 14:09:44 -05:00
recalibrator_test.exs feat(propagation): per-band weight calibration from full-corpus correlation 2026-04-18 10:19:26 -05:00
region_test.exs Phase 7: Regionalized seasonal scoring 2026-04-10 08:39:01 -05:00
score_cache_reconciler_test.exs fix(review): address code-reviewer findings 2026-04-21 10:09:46 -05:00
score_cache_test.exs Nudge HRRR scores with live ASOS obs between runs 2026-04-12 14:27:27 -05:00
scorer_test.exs perf(propagation): parallel chain fan-out + hoist shared factors 2026-04-19 09:39:06 -05:00
scores_file_test.exs Run PropagationGridWorker hourly, retain only the current chain's window 2026-04-14 15:26:58 -05:00
sporadic_e_test.exs Add 50/144/222 MHz bands, rename 440→432 2026-04-16 12:36:10 -05:00