From 7edfc64996181d05f6e66047485a82a4f1f373fd Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sun, 3 May 2026 12:38:29 -0500 Subject: [PATCH] fix(path): stop warning on expected native-duct cache misses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `Weather.nearest_native_duct_info/3` returns `{:error, :not_found}` whenever the midpoint has no native HRRR profile within ±0.07° / ±1 h — the documented fallback for the sparsely-populated `hrrr_native_profiles` table (only QSO-worker-touched cells get ingested). The empty-map fallback was already the right behavior; the warning was just noise that fired on every /path computation outside the populated set. Now the `:not_found` clause silently returns the same fallback shape without logging. --- lib/microwaveprop_web/live/path_live.ex | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/microwaveprop_web/live/path_live.ex b/lib/microwaveprop_web/live/path_live.ex index f03ca3a5..807d9296 100644 --- a/lib/microwaveprop_web/live/path_live.ex +++ b/lib/microwaveprop_web/live/path_live.ex @@ -347,17 +347,16 @@ defmodule MicrowavepropWeb.PathLive do # midpoint. Resolves thin trapping layers HRRR's 13 pressure levels # miss; feeds the 1.15× boost in Scorer.score_refractivity, gated on # Richardson so turbulent duct readings don't inflate the score. + # + # `:not_found` is the documented fallback when no native sample is + # within ±0.07° / ±1 h of the midpoint — the native profile table + # is sparsely populated (only points the per-QSO worker has + # touched). The empty-map fallback is correct behavior, not a + # failure, so we don't log it. native_duct = case Weather.nearest_native_duct_info(midlat, midlon, now) do - {:ok, info} -> - info - - {:error, reason} -> - Logger.warning( - "PathLive nearest_native_duct_info failed: midpoint=#{midlat},#{midlon} reason=#{inspect(reason)}" - ) - - %{best_duct_band_ghz: nil, bulk_richardson: nil} + {:ok, info} -> info + {:error, :not_found} -> %{best_duct_band_ghz: nil, bulk_richardson: nil} end # Build conditions and score