Skip to content

fix(ingest): strip NUL bytes from observer status - #191

Merged
MrAlders0n merged 1 commit into
devfrom
fix/observer-status-nul-bytes
Sep 30, 2026
Merged

MrAlders0n merged 1 commit into
devfrom
fix/observer-status-nul-bytes

Conversation

@MrAlders0n

Copy link
Copy Markdown
Member

Observer 89F44E77 (Canadaverse RemoteTerm, RemoteTerm/3.17.1) has had every status update rejected since 2026-09-29 11:56 UTC with invalid byte sequence for encoding "UTF8": 0x00, so its status, firmware info and telemetry are frozen.

  • Strip NUL bytes from the status text fields, matching what channel messages already do.
  • Clean \u0000 out of status_metadata, which jsonb also rejects. Payloads without one are stored byte for byte as before.
  • Warn with the observer and the affected fields, so we can see which client field carries the padding.

Log noise: on dev in 53 minutes there were 4,705 timestamp clamps, 1,763 malformed-IATA drops and 686 empty-timestamp fallbacks, against 889 inserted packets. All three are expected and already handled, so they drop to debug.

An observer sending NUL-padded status strings had every status update rejected
by Postgres, freezing its status and telemetry. Strip them from the text fields
and the stored JSON, and warn with the fields affected.

Also drop the timestamp-clamp, empty-timestamp and malformed-IATA logs to debug;
they're expected and outnumbered inserted packets several times over.
@MrAlders0n
MrAlders0n merged commit 5b177d6 into dev Sep 30, 2026
3 checks passed
@MrAlders0n
MrAlders0n deleted the fix/observer-status-nul-bytes branch September 30, 2026 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant