Conversation
This was referenced Sep 10, 2026
Contributor
Author
|
@MrAlders0n please review this change with your Claude agent as part of the September 13 Beacon review batch. The current candidate is Please check NULL-origin advert rows, known-key preservation and cursor behavior. This PR is linked to issue #106 for closure on merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Closes #106. A NULL
packets.origin_pubkeymakesListObserverAdvertsfail when sqlc scans the encoded value into a Go string, so one incomplete advert breaks the entire page.Return explicitly typed, non-null text for that field. Unknown-origin adverts remain in the page with an empty
nodePublicKey; known keys and ID-based pagination are preserved. The query and sqlc output are regenerated together. No schema or API type changes.Type of change
Checklist
go build ./...passesgofmt -l .is emptygo vet ./...passesgo test ./...passesCONTRIBUTING.mdNo new dependency or Swagger contract change.
Testing notes
The real HTTP/Store/PostgreSQL regression reproduces the reported
cannot scan NULL into *stringand HTTP 500 before the fix. It now returns both missing-origin and known-origin adverts and continues correctly through the numeric cursor. Fixtures use temporary tables and roll back.Built and ran the full suite natively on the Pi 5 with PostgreSQL enabled, based on merged
devate15f873. The merged migration-recovery PostgreSQL test also ran without skipping. The broader preview upgrade is validated separately from this one-query bug fix.AI tools assisted implementation and validation under the contributor's standing approval for this effort.
The Pi preview now serves b3682b8 with current web e43de48f. An actual missing-origin advert loaded successfully, both feeds are advancing, and the paired activity/telemetry APIs and charts pass. Merged migrations were tested on a private 27,086-observation preview copy; those timings do not represent analyzer production scale.