289 Commits
Author SHA1 Message Date
MrAlders0n d1008f8292 fix(observers): keep broker signal times across failed flushes and late writes, read stripsSignal fresh 2026-12-06 11:35:33 -05:00
MrAlders0n 1459f0ea33 feat(polling): count adverts heard without SNR as evidence, flag brokers that strip signal 2026-12-06 11:20:43 -05:00
MrAlders0n 3e96aabda5 perf(nodes): find reach packets through a first-hop index 2026-12-04 15:19:34 -05:00
MrAlders0n de03fa6007 perf(routes): read crossing reports by packet alone; log analysis stage times 2026-12-04 15:03:35 -05:00
MrAlders0n 23fcdadf2e feat(routes): crossings between two groups of areas and repeater reach, as endpoints and MCP tools 2026-12-04 14:19:57 -05:00
MrAlders0n d00322d7ad fix(ingest): fill missing rssi/snr from a later broker copy
Some brokers strip SNR and RSSI from the packet envelope. When their copy
of a hearing was stored first, the row kept no signal. A duplicate with the
same path now fills the fields the stored row lacks; stored values and the
rest of the row are left as they are.
2026-12-03 16:30:44 -05:00
MrAlders0n ec1984dda3 feat(routes): relays that carry traffic between two areas, as an endpoint and an MCP tool 2026-12-03 06:23:49 -05:00
MrAlders0n a62c652e05 feat(polling): store what a signed reading says of requested
The poller view returns it as latestReadingRequested, null when the reading does not say.
2026-12-02 14:07:38 -05:00
MrAlders0n a7c36e8e76 feat(polling): decode sensor channels from LPP and serve them with node telemetry
Humidity, pressure, gas and power monitor channels are decoded when a reading is stored. Positions and altitude are never decoded. Fixes the humidity size, which is one byte on the wire.
2026-11-29 21:09:23 -05:00
MrAlders0n 1ddd1e862f feat(alerts): telemetry alerts for any repeater with fresh readings, and a telemetry stopped alert
A repeater read by a poller this server does not assign now counts as polled while a trusted reading is under 36 hours old. gone_quiet takes 3 and 6 hours on every radio.
2026-11-29 20:51:32 -05:00
MrAlders0n 9820de5398 feat(api): say when an outside observer on a repeater has no claim at all
claimed is false for a stale claim too, so it cannot tell a local mode
observer from a foreign poller that went quiet.
2026-11-29 20:08:05 -05:00
MrAlders0n 2e88323a9a feat(api): tag an observer that sends readings and no claim a local poller
isLocalPoller on nodes, and its poller view lists the repeaters it sent
readings for in the last day.
2026-11-29 14:48:00 -05:00
MrAlders0n f738b024f1 feat(api): a foreign polling claim tags the node a poller
isPoller and the poller filter now count foreign claims; isForeignPoller says which kind.
2026-11-29 09:01:50 -05:00
MrAlders0n 7c8ec6dbd6 feat(api): poller view reports the latest reading's rssi and signature 2026-11-29 05:56:20 -05:00
MrAlders0n 6bc7877a05 feat(polling): check signed readings and store the reply rssi
A reading that carries a signature is dropped when it does not verify. Unsigned readings are handled as before. Signed claims and readings with a repeated key are refused.
2026-11-28 23:13:28 -05:00
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 f360fbe8db feat(ingest): read source brokers from a rebroadcaster over MQTT 5
MQTT_BROKER_n_REBROADCAST=true marks a broker that forwards from other
brokers and names each message's source in the source-broker and
source-host user properties. The worker then connects with MQTT 5 and
records packets, observations and observer brokers under the source
name. Without it the connection is 3.1.1 as before.

Each packet keeps the set of brokers it arrived through (brokers on
packet detail). Observer broker lists and the broker filter cover the
last 30 days, and GET /brokers/sources lists the names for the filter.
2026-11-28 20:15:44 -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
MrAlders0n 54ea8bdfdf feat(polling): store a claim's max_slots and poll_interval
The slot limit now follows the claim instead of a fixed 8 (default 8, ceiling 32), in the poller view and in the seat math. The poller view also reports pollIntervalMinutes.
2026-11-28 11:08:50 -05:00
MrAlders0n 24da3c187d fix(api): count a poller's free seats honestly and read it in one statement
slots.free is 0 when the claim is expired or takes no requests, and no longer
counts seats already handed to the observer that its claim does not name yet.

The claim and its targets were three statements, so a claim replaced between
them gave one claim's slots with the other's targets. They are one statement
now, as the Atlas read is.
2026-11-27 20:05:21 -05:00
MrAlders0n 9256f4911c revert(polling): readings need advert evidence again, keep evidence_window 2026-11-27 10:06:00 -05:00
MrAlders0n 47e6783ce7 feat(polling): trust self-configured readings without adverts, evidence_window setting
Readings of a repeater an observer polls on its own were hidden unless it heard a zero-hop advert in the last 24h. They are now trusted while no assignee of that repeater has advert evidence. The window is polling.evidence_window, default 7d.
2026-11-27 08:02:29 -05:00
MrAlders0n 5295b59440 feat(api): add the poller read for a node 2026-11-27 06:49:07 -05:00
MrAlders0n 564e904c3d feat(api): flag pollers on nodes and filter by them 2026-11-24 23:02:03 -05:00
MrAlders0n 098a86f59d fix: only count observers with recent status 2026-11-22 22:12:16 -05:00
MrAlders0n 50850f5314 feat: refuse telemetry requests on observers 2026-11-22 21:48:23 -05:00
MrAlders0n 70aeca21e7 perf(db): find a node's late hearings through an index on its packets' last hearing
Two bounded ranges instead of an OR across first and last hearing: migration 086
adds idx_packets_origin_last_heard. Planguard entries guard both ranges, and the
node activity test holds the clock still and runs in CI again.
2026-11-19 17:47:14 -05:00
n30nex 08a00ee993 fix(db): count late hearings of a node's older packets in its activity (#308) 2026-11-19 17:42:49 -05:00
n30nex d2baa10025 perf(db): check each regional neighbour once when reconfirming neighbours (#350) 2026-11-19 09:30:03 -05:00
n30nex 4d076b0bdb fix(db): count only the routes a timed-out reconfirm slice skipped (#349) 2026-11-19 09:30:01 -05:00
n30nex 4516e19695 fix(db): keep 16 clock drift samples per node, not 17 (#305)
The trim could not see the row inserted in the same statement.
2026-11-19 09:29:56 -05:00
MrAlders0n ee4ee046c5 fix(alerts): hold rate-limited pushes without counting an attempt
A rate_limited item or a whole-call 429 now holds only the push until the
relay's wait (the item's, else Retry-After, else a minute), and never
counts toward MaxAttempts or shrinks the batch. Batches go back to 100
with a 30s call limit, matching the relay.
2026-11-18 06:09:12 -05:00
MrAlders0n 275c532e23 fix(alerts): retry email and push apart, and fit push batches to the relay
Each channel now has its own attempts, delay and done mark, so a failing
or rate-limited push no longer holds back or drops unsent mail. Push
batches drop to 20 with a 50s call limit, a batch shrinks after each
failure, and a call that times out leaves the rest for the next pass.
2026-11-18 06:00:59 -05:00
MrAlders0n 90c2ece473 feat(alerts): email and push channels through the push server
Alerts go out by email, by push or both, as each user chooses. Push is
sent through the push server with the operator's Push ID and secret and
sealed per device, so this server no longer holds a Firebase key. The
outbox tracks each channel, so a retry of one never repeats the other.
2026-11-17 20:22:51 -05:00
MrAlders0n 4924f0310b Bound the latest readings target scan and run its test in CI 2026-11-15 20:39:07 -05:00
MrAlders0n eb913d6cce Add a route for the latest reading of every polled node 2026-11-15 20:15:58 -05:00
MrAlders0n 2819d60ca2 Accept a telemetry view and tiles on Atlas pins, add a 72h telemetry range and the atlasTelemetry flag 2026-11-15 19:41:23 -05:00
MrAlders0n cf9b690e03 Report the poller's own state on a telemetry request 2026-11-15 17:21:44 -05:00
MrAlders0n 1e52ddb983 Free the seat of a repeater nobody requests any more 2026-11-15 11:26:21 -05:00
MrAlders0n c3a0141bbf Index readings by repeater and observer 2026-11-15 11:12:50 -05:00
MrAlders0n a39c947668 Trust a working poll over a stale login failure 2026-11-15 11:07:10 -05:00
MrAlders0n 941eae24f1 Build the owners answer from one snapshot 2026-11-15 10:58:58 -05:00
MrAlders0n 7cf737ae49 Do not offer a seat to a target nobody requests any more 2026-11-15 10:07:57 -05:00
MrAlders0n 4562d45ff9 Keep failed and admin-stopped requests through the offline sweep 2026-11-15 09:45:31 -05:00
MrAlders0n 580f0d1065 Offer a replacement in the seat a withdrawn target frees 2026-11-15 09:39:45 -05:00
MrAlders0n 9a61f689a0 Renumber and update requests when cleanup drops assignments 2026-11-15 09:27:13 -05:00
MrAlders0n 2e87fb7a51 Send alert mail for finished passes only 2026-11-15 08:10:17 -05:00
MrAlders0n 39c10bb406 Stop repeater telemetry alerts when polling is off 2026-11-15 08:09:29 -05:00