Skip to content

Packet list can fail while a packet has no observation yet #114

Description

@n30nex

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions