internal/infrastructure/weather/openmeteo.go's attempt deliberately strips the query
string from the status-code error, with the reason written in the code: to keep latitude and
longitude out of the logs. The transport-failure branch alongside it does not. It wraps the
*url.Error returned by httpClient.Do, whose Error() embeds the full URL:
Get "https://api.open-meteo.com/v1/forecast?...&latitude=51.169392&longitude=71.449074...": dial tcp: i/o timeout
Every caller that prints that error with %v therefore logs the coordinates. There are now
three call sites: Forecast, Geocode (which additionally carries the search term), and
ForecastRange.
This is hygiene rather than a policy breach — city coordinates are pre-approved data under
the beacon-data-privacy skill, and the line carries no user identifier — but it defeats an
intent the code states out loud, and it defeats it in three places.
Direction: redact inside attempt's transport branch, rewriting (*url.Error).URL to
host plus path before wrapping, so every caller inherits the same guarantee the status-code
branch already gives.
Found by review of #127 (P3, pre-existing, out of that PR's scope).
internal/infrastructure/weather/openmeteo.go'sattemptdeliberately strips the querystring from the status-code error, with the reason written in the code: to keep latitude and
longitude out of the logs. The transport-failure branch alongside it does not. It wraps the
*url.Errorreturned byhttpClient.Do, whoseError()embeds the full URL:Every caller that prints that error with
%vtherefore logs the coordinates. There are nowthree call sites:
Forecast,Geocode(which additionally carries the search term), andForecastRange.This is hygiene rather than a policy breach — city coordinates are pre-approved data under
the
beacon-data-privacyskill, and the line carries no user identifier — but it defeats anintent the code states out loud, and it defeats it in three places.
Direction: redact inside
attempt's transport branch, rewriting(*url.Error).URLtohost plus path before wrapping, so every caller inherits the same guarantee the status-code
branch already gives.
Found by review of #127 (P3, pre-existing, out of that PR's scope).