396 Commits
Author SHA1 Message Date
MrAlders0n 90c9ac5473 perf(routes): look for crossing packets in the newest hours first 2026-12-04 16:51:22 -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 6288a2d978 fix(nodes): reach reads back in slices and reports the window it covered 2026-12-04 14:46:58 -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 a6705a774e fix(alerts): telemetry stopped rules go inactive while polling is off 2026-11-29 23:35:34 -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 b8a954e908 fix(polling): a request's status change sets its updated time
A status that follows the poll, active when an observer has the
repeater and waiting when none does, was stored with the old
updated_at.
2026-11-28 21:38:50 -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 f607be2275 test: cover the poller read in the plan guard 2026-11-27 20:05:21 -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 705564b384 feat(atlas): accept the poller view on pins 2026-11-27 09:59:42 -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 5fb32926f7 test: rewrite the local plan baselines for the node queries 2026-11-25 09:18:21 -05:00
MrAlders0n 39ab93a404 test: cover the poller filter in the plan guard 2026-11-25 05:41:22 -05:00
MrAlders0n fcda9371c3 fix: put IsPollerByPubkey under its own comment 2026-11-24 23:05:56 -05:00
MrAlders0n 564e904c3d feat(api): flag pollers on nodes and filter by them 2026-11-24 23:02:03 -05:00
MrAlders0n 4fdb3f75dd feat(atlas): accept a 7d range 2026-11-22 22:58:09 -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 d9ffdf2cd1 test: cover wirePathBytes on a TRACE in packet detail and the live event's on-air path 2026-11-19 20:33:38 -05:00
n30nex 16e2a2a72b feat(api): send a TRACE observation's on-air path bytes as wirePathBytes (#307)
pathBytes keeps the payload's hop hashes for a TRACE, so the raw frame could not be rebuilt from it.
2026-11-19 20:32:42 -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
MrAlders0n c16864a853 fix(ingest): accept only signal values a LoRa receiver can report, and hide the old 0/0 placeholder
SNR from -32 to 32 dB, RSSI from -164 to -1 dBm. An SNR of exactly 0 counts only
beside a valid RSSI. Rows stored as 0/0 before this read as not measured.
2026-11-19 17:38:34 -05:00
n30nex 6cab18d5f3 fix(ingest): store a missing RSSI or SNR as missing, not as 0 (#303) 2026-11-19 17:35:59 -05:00
MrAlders0n b3b782bffd test(db): drop a deployment name from the empty region test 2026-11-19 09:36:39 -05:00
n30nex f3ec988d0b fix(api): keep a route evidence cursor on the path representation its first page matched (#304) 2026-11-19 09:35:00 -05:00
n30nex 14c3ad3e46 fix(api): return nothing for an empty region instead of every region (#337)
Lists of nodes, observers, packets, messages, trace tags and latest readings
treated a region with no IATAs as no filter.
2026-11-19 09:30:18 -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 c255001ff4 test(db): stop expecting the store to set the Atlas limit 2026-11-18 07:34:30 -05:00
MrAlders0n 95439b8492 fix(db): start unsent alert mail fresh when splitting the outbox retries 2026-11-18 06:24:24 -05:00