Pi 5 dev-MQTT validation of the current server exposed intermittent HTTP 500s from GET /api/v1/packets?limit=50 during ingestion. The generated ListPacketsRow treats the latest observation's IATA and path scalars as non-nullable, although ListPackets uses LEFT JOIN LATERAL and packets are inserted before their observations.
The store already omits latestObserver when the joined observer ID is absent, but a NULL scan fails before that guard executes. I am adding a PostgreSQL regression for a packet with no observation, then its observed state. A focused fix should preserve the packet, omit the absent observer, retain real observation values, and regenerate sqlc. No API or schema change should be necessary. This is a separate follow-up from the node, limit and background PRs.
This is an AI-assisted investigation; the final contribution will receive author review before submission.
Pi 5 dev-MQTT validation of the current server exposed intermittent HTTP 500s from
GET /api/v1/packets?limit=50during ingestion. The generatedListPacketsRowtreats the latest observation's IATA and path scalars as non-nullable, althoughListPacketsusesLEFT JOIN LATERALand packets are inserted before their observations.The store already omits
latestObserverwhen the joined observer ID is absent, but a NULL scan fails before that guard executes. I am adding a PostgreSQL regression for a packet with no observation, then its observed state. A focused fix should preserve the packet, omit the absent observer, retain real observation values, and regenerate sqlc. No API or schema change should be necessary. This is a separate follow-up from the node, limit and background PRs.This is an AI-assisted investigation; the final contribution will receive author review before submission.