4 Commits
Author SHA1 Message Date
MrAlders0n f9a204e35e fix(polling): close the gaps review found in foreign claims
Whether a claim may replace what an observer has stored, own or
foreign, is now decided in one place under the observer's seat lock: an
older claim never undoes a newer one, the claim spacing holds across
both kinds, and an unsigned claim is refused while a signed one is
live. An observer that turns foreign loses every assignment in the same
transaction, requested ones its claim does not name included.

A server that starts checking drops the claims that were not placed
under its current host and broker list. A foreign reading never counts
as a repeater's newest; one from an observer this server assigned the
target stays its own; with authority approved it needs approval to be
trusted. A null sig or poll_url is refused. A packet's broker set only
grows. The foreign reading lookups get a partial index (093), the
MQTT 5 connected flag follows the current connection only, and queued
messages are charged for their source.
2026-11-28 20:49:32 -05:00
MrAlders0n ff8637b4ab feat(polling): tell this server's observers from foreign ones
polling.foreign_claims: check takes a claim as this server's own only
when its signed poll_url names DOMAIN, or, for firmware that sends
none, when a rebroadcaster says it arrived on one of polling.mqtt_hosts.
Any other claim is foreign, and one that can be placed neither way is
dropped. The default, off, treats every claim as its own, as before.

A foreign observer is kept out of polling_claims, so it is never a
poller or standby, gets no owners answer and takes no request. Its
readings are stored, marked foreign and trusted on the same advert
evidence. A reading with no claim behind it is kept as foreign too.

Claims that carry a signature are verified with the observer's key in
every mode; a wrong one is dropped. Asking for telemetry on a repeater
a foreign observer already checks needs acknowledgeForeign.
2026-11-28 20:32:20 -05:00
MrAlders0n 2ae10ca1a5 revert: foreign polling claims, until the design is settled 2026-11-28 16:54:58 -05:00
MrAlders0n 306128a4bd feat(polling): rank observers that follow another server behind our own
A claim can reach a server its observer does not ask for policy. Tell
them apart by the claim's poll_url, or by whether the observer asked
this server lately, and keep such observers out of requests.
2026-11-28 16:26:43 -05:00