fix(path): stop warning on expected native-duct cache misses

`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.
This commit is contained in:
Graham McIntire 2026-05-03 12:38:29 -05:00
parent 0711d9af11
commit 7edfc64996
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59

View file

@ -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