Conversation
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 explicit 0/0 adverts versus omitted location fields, signature validation and database/event agreement. This PR is linked to issue #97 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 #97. A signed advert that explicitly includes latitude and longitude of
0/0currently leaves the node's previous location in place.Use the advert's location-presence flag when preparing the node update. Explicit zero coordinates now reach the database and the node-update event; adverts without a location field continue to preserve the previous coordinates. Signature validation is unchanged. This fixes subsequent eligible adverts; it does not backfill earlier resets.
Type of change
Checklist
go build ./...passesgofmt -l .is emptygo vet ./...passesgo test ./...passesCONTRIBUTING.mdNo schema, query, dependency, handler or API type change.
Testing notes
The signed-advert regression fails on the original condition for the explicit reset. It passes after the fix, along with ordinary coordinates, either coordinate zero, an omitted location and a tampered signature. The zero fixture sets the wire presence bit explicitly because the library's app-data encoder omits the field for
0/0.Native Pi 5 formatting, build, vet and full Go tests pass. A real PostgreSQL transaction verifies that an omitted location preserves the old coordinates, explicit
0/0replaces them on the same node, and a later omission preserves the reset. It ran without skipping against the private test database, using a temporary table and rollback.The event uses the same coordinate pointers as the database update. The existing web update handler preserves numeric zero. These paths were reviewed; no synthetic advert was published into the live feeds.
AI tools assisted implementation and validation under the contributor's standing approval for this effort.
The Pi preview now serves combined revision
cacdadfewith this fix and the still-open #138. Both broker feeds advanced after deployment; the observer-advert, activity and telemetry API checks passed. The PR itself remains independently based ondevate15f873.