Skip to content

fix: NaN telemetry writes, docker-compose port exposure, /v1/events docs#530

Merged
SimmerV merged 4 commits into
MeshAddicts:developfrom
SimmerV:bug-fix
Jul 17, 2026
Merged

fix: NaN telemetry writes, docker-compose port exposure, /v1/events docs#530
SimmerV merged 4 commits into
MeshAddicts:developfrom
SimmerV:bug-fix

Conversation

@SimmerV

@SimmerV SimmerV commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

fix(storage): don't fail node writes on non-finite telemetry values

proto3's JSON mapping serializes non-finite floats as the strings
"NaN"/"Infinity"/"-Infinity"; asyncpg can bind neither those strings nor
real NaN/inf floats into numeric columns, so one bad sensor value made the
whole node + telemetry-current write fail. Observed in production: a node with
a faulty environment sensor lost all telemetry persistence, erroring daily.
Non-finite values are now mapped to NULL at the typed-column boundary in
_write_node_telemetry_current; everything else passes through unchanged.
Includes regression tests (TestFiniteOrNone).

fix(compose): stop publishing postgres/API/SPA ports on all interfaces

docker-compose.yml published postgres on 0.0.0.0:5432 with the committed
default password — and docker-published ports bypass host firewalls (ufw), so
any network-reachable host could read/write the DB. Nothing external needs it:
the app reaches postgres over the compose network, and the backup/migrate
scripts use docker exec.

  • postgres: port mapping removed (comment documents the docker exec path and
    the 127.0.0.1 override option for host access)
  • meshinfo (9000) and frontend (8000): bound to 127.0.0.1 — caddy is the
    public entry for both
  • mosquitto: stays fully published by design (WAN mesh gateways publish
    uplinks to it), with a pointer to the broker-auth sample config

docs(api): document the /v1/events SSE endpoint

The SSE stream powering live map/chat/telemetry/coverage updates was absent
from API.md's endpoint tables.

SimmerV and others added 4 commits July 16, 2026 21:12
Postgres was published on 0.0.0.0:5432 with the committed default
password, and docker-published ports bypass host firewalls (ufw), so
any network-reachable host could read/write the DB. Nothing external
needs it: the app reaches Postgres over the compose network and the
backup/migrate scripts use docker exec.

The API (9000) and SPA (8000) now bind to 127.0.0.1 — caddy is the
public entry for both. Mosquitto stays fully published by design (WAN
gateways publish uplinks to it) with a pointer to the broker-auth
sample config.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
proto3's JSON mapping serializes non-finite floats as the strings
"NaN"/"Infinity"/"-Infinity"; asyncpg can bind neither those strings
nor real NaN/inf floats into numeric columns, so one bad sensor value
made the whole node + telemetry-current write fail (seen daily in
production from node 75e1c1bc since 2026-07-12). Map non-finite values
to NULL at the typed-column boundary; everything else passes through.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@SimmerV SimmerV self-assigned this Jul 17, 2026
@SimmerV SimmerV added this to meshinfo Jul 17, 2026
@SimmerV SimmerV added the bug Something isn't working label Jul 17, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in meshinfo Jul 17, 2026
@SimmerV
SimmerV merged commit f83bfc9 into MeshAddicts:develop Jul 17, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in meshinfo Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant