Commit Graph
216 Commits
Author SHA1 Message Date
MrAlders0n 364e78eb53 Keep a push token with one account 2026-11-15 01:50:46 -05:00
MrAlders0n 26ccf6d4db Add alert rules and device registration 2026-11-15 01:48:15 -05:00
MrAlders0n 35468cc7cc Add sign-in through the MeshMapper portal 2026-11-15 01:40:24 -05:00
MrAlders0n ab6c4e6686 Give telemetry request reasons a stable code 2026-11-15 01:34:40 -05:00
MrAlders0n 59bbee8baf Use real status readings for telemetry counters 2026-11-15 01:23:25 -05:00
MrAlders0n 87a2de2b87 Fix reset, resend and session lookup edge cases 2026-11-15 01:14:20 -05:00
MrAlders0n c34a20f2a5 Assign requested repeaters to observers 2026-11-15 00:56:28 -05:00
MrAlders0n 1c51a6b77d Add telemetry request storage and routes 2026-11-15 00:41:16 -05:00
MrAlders0n 49ea5e04e8 Add account Atlas storage and routes 2026-11-14 23:52:28 -05:00
MrAlders0n 81e7950705 Wire accounts into startup and add operator user management 2026-11-14 23:41:56 -05:00
MrAlders0n 2af2c5bad1 Add sign-in, account and session routes 2026-11-14 23:36:29 -05:00
MrAlders0n b58634d791 Add accounts config, mail sender and feature flags 2026-11-14 22:41:23 -05:00
MrAlders0n 82f9064252 Answer node telemetry as unpolled when polling is off 2026-11-14 22:34:54 -05:00
MrAlders0n 32083356af Compute repeater counter increments per pair of status readings 2026-11-14 22:33:39 -05:00
MrAlders0n 959e8318b0 Report the time span telemetry counters cover 2026-11-14 22:09:58 -05:00
MrAlders0n 87009f395a Add node polling endpoint and feature flags to info 2026-11-14 21:56:23 -05:00
MrAlders0n c4024f2d3a Add node telemetry endpoint 2026-11-14 21:50:50 -05:00
MrAlders0n b359972b34 Answer the retired key routes outside the firmware limiter 2026-11-14 14:56:31 -05:00
MrAlders0n 630f63cfb5 Refuse polling exclusions that do not fit with config and show config in admin 2026-11-14 14:55:38 -05:00
MrAlders0n 8d3dc24a22 Rank polling evidence before health and add approved authority 2026-11-14 14:47:15 -05:00
MrAlders0n 4495e1c648 Add admin view of polling targets and show the effective pause 2026-11-14 14:21:45 -05:00
MrAlders0n b886a40b6e Answer 503 when polling state cannot be read 2026-11-14 14:17:16 -05:00
MrAlders0n 7ada6b8c5c Wire polling into startup, jobs and admin 2026-11-14 13:35:49 -05:00
MrAlders0n 5e43753207 Add firmware polling routes 2026-11-14 13:28:06 -05:00
MrAlders0n 5476e9e628 perf(db): page node observations from the node's packets 2026-11-10 10:37:15 -05:00
MrAlders0n d29f1200ca fix(guards): class node activity as an aggregation 2026-11-10 10:03:08 -05:00
MrAlders0n 7ede937a77 feat(api): hourly node activity from a rollup 2026-11-10 09:59:47 -05:00
MrAlders0n 2021d2c306 feat(ws): optionally require an Origin or a server-issued ticket on /ws 2026-10-31 14:43:18 -04:00
MrAlders0n a39a830955 feat(ws): add a per-connection send budget and cap IPv6 per /64 2026-10-31 14:27:54 -04:00
MrAlders0n fea013234c feat(api): sort /nodes oldest heard first 2026-10-30 09:14:16 -04:00
MrAlders0n cb8f75fa73 feat(api): send lastSeen on node list rows 2026-10-30 09:08:42 -04:00
MrAlders0n 0084b90a12 refactor(api): read the sort cursor's null flag as text 2026-10-29 12:24:32 -04:00
MrAlders0n 49ddd63797 fix(api): report hash prefix search errors 2026-10-29 11:12:13 -04:00
MrAlders0n 5145f3f62c feat(api): require BEACON Mobile 2.1 2026-10-29 11:06:28 -04:00
MrAlders0n a6f7131821 feat(api): filter /routes by several IATAs
GET /routes takes iatas (comma list, at most 100) alongside the single
iata. Each listed IATA's page is read from its region keyset and the
pages are merged, so a region costs at most its IATA count times the
page and pages exactly like one IATA's list. Clients no longer have to
scan every IATA's routes and filter a region themselves.
2026-10-27 15:48:21 -04:00
MrAlders0n 4dee65ff62 feat(api): sort /nodes by name, type or neighbour count
GET /nodes takes sort=name|type|neighbors and order=asc|desc, paged with
pageCursor, so a client can page a sorted node list instead of loading
every node to sort it. Names sort in the web table's order (ICU root with
numeric digit runs, migration 061), unnamed nodes last; ties go newest
first. Pages echo sort and order so clients can tell the server sorted.
2026-10-27 15:47:20 -04:00
MrAlders0n c58774a69f perf(api): allow /nodes pages of up to 2000
The map and neighbour graph load every node of a region, 200 at a time:
391 paced requests (~105 s) on a 78k-node mesh. A node row is cheap
(2000 rows took 26-38 ms against 10-16 ms for 200 on a prod copy), so
/nodes now takes up to 2000 per page; every other list keeps 200.
Older clients are unaffected.
2026-10-27 08:08:16 -04:00
MrAlders0n 646c69fc96 feat(api): list regions with their member IATAs and detail
Each /regions item now carries what GET /regions/{id} returns, so a
client resolves every region in one call instead of one per region (41
calls per page load on a 40-region deployment). Additive: old clients
ignore the new fields. The list's cache key is renamed so a cached
summary-only list is never served.
2026-10-26 13:59:04 -04:00
MrAlders0n 826fa942e6 Count every timeout 503 in beacon_api_unavailable_total (#281)
* Count every timeout 503 in beacon_api_unavailable_total

* Check each model's timeout count; clarify respondReaderError
2026-10-24 15:29:11 -04:00
MrAlders0n 1b7539f2f3 Seek region and message pages from their window, drop the slow pool (#279)
* Seek region and message pages from their window, drop the slow pool

* Bound typed and scoped region pages and message since pages, migration 059

* Count the late rows in the zero-hit type pair read bound

* Cap typed window ranges, broader bounded cmi verification
2026-10-24 15:09:09 -04:00
MrAlders0n 885b7e60cb Answer statement timeouts with 503 on every read endpoint (#271)
* Answer statement timeouts with 503 on every read endpoint

* Keep the plan check on 500; log the cause on read-model pages too
2026-10-24 11:54:58 -04:00
MrAlders0n 080141145e Read-only scope lists, 503 on statement timeouts, log read-model restores (#264)
Read-only servers now restore the saved MeshMapper scope catalogues (a read-only
step), so region scope lists are no longer empty. A statement that hits the
pool's statement_timeout answers 503 with Retry-After on route evidence and the
read-model pages instead of 500. Read-model trust logs when it comes back after
a drop, and when repair runs drop it.
2026-10-21 11:28:55 -04:00
MrAlders0n d4b97cf440 Require Beacon Web 2.1 (#261) 2026-10-21 03:50:44 -04:00
MrAlders0n 3dd1dc1cd0 Log 503s that carry Retry-After at warn, not error (#251) 2026-10-20 07:31:42 -04:00
MrAlders0n 2b1ad1d6c6 feat(api): region, scope and advert pages answer 503 until their read model is ready, instead of falling back (#249) 2026-10-20 03:33:34 -04:00
MrAlders0n 0a41d935a0 End-state cleanup: slow pool, lookup-index and column drops, sequence headroom (#248)
* feat(db): drop six lookup-table indexes that no plan reads

* feat(db): drop known_routes.last_reconfirmed_at, which nothing reads

* feat(metrics): report how much of each database sequence is used

* refactor(db): retire the legacy API pool; slow region and message statements get their own two connections

* feat(config): database.slow_pool_size sizes the slow pool

* refactor(db): route the two former read-model fallbacks to the slow pool

* fix(metrics): sequence headroom reads any schema name and marks cycling sequences

* feat(metrics): count the 503s pages answer, by reason and model; warn about a busy slow pool once a minute

* refactor(db): expose the adverts page mapping and the original channel message pages for oracles

* refactor(db): name the read-model fallbacks the slow pool runs; count only what this tree refuses

* feat(config): the slow pool defaults to 8 connections while it also serves untrusted read-model pages
2026-10-20 03:19:49 -04:00
MrAlders0n 16fb706d17 Packet sites: a read model that serves region packet pages while trusted (#247)
* feat(db): packet_sites table and indexes

* feat(ingest): keep each packet's site row in the observation insert

* feat(db): packet_sites backfill, reconcile and audit

* feat(db): region packet pages from packet_sites when trusted, with an exact page cursor

* feat(db): packet_sites front sweeper with plan and liveness metrics

* feat: boot repair, reconcile, audit, sweep and first-time verification for packet_sites

* fix(db): read no site range when no packet was first heard in the window

* fix(db): read the window guard's maxima through indexes

* test(planguard): packet_sites statements active, data-derived cases, diff and storediff

* docs(api): pageCursor applies to region packet pages

* fix(db): drop packet_sites trust again after the unsited fallback write

* fix(db): the packet_sites audit refills a pair at its newest hearing

* fix(db): bounded region reads fill the page within the request, else today's statement answers

* fix(planguard): tie_cut needs both pages at the limit and members of other identities

* fix: packet_sites sweep without JIT, one verification VACUUM, read-only checks to the newest id

* docs(api): cursor and pageCursor on region pages served without nextPageCursor

* test: drop local baselines of entries the copy skips; plain race schedule names

* test(planguard): storediff walks of the bounded region shapes; local baselines after the overlay rebuild

* fix(db): drop message-site trust again after the unseeded insert

* fix(db): a region page cursor's fallback to today's statement continues from its exact position
2026-10-20 00:18:33 -04:00
MrAlders0n 232588c361 fix(api): reject list params with more than 1000 values (#245) 2026-10-19 19:47:01 -04:00
MrAlders0n 41baee9197 Packets: one statement per filter shape, exact pageCursor on packets, nodes and observers (2.1.0) (#241)
* feat(db): packet type domains, row-cursor indexes and the inverted-heard index

* feat(api): exact page cursors for packets, nodes and observers

* feat(db): normalise packet list filters before choosing a statement

* feat(db): one packets statement per filter shape with an exact row cursor

* fix(db): let the window statements decide since after until

* feat(db): exact keyset cursors for nodes and observers; observers page by last_seen

* feat(api): pageCursor on packets, nodes and observers; it wins over cursor

* test(planguard): packets statements and node/observer keysets leave pending; diff and storediff cases

* chore: bump version to 2.1.0

* test(db): turn off JIT in the keyset cursor tests
2026-10-19 15:59:55 -04:00
MrAlders0n 94b4b40f9b planguard: plan and result regression checks, fixture tier in CI, read-only mode (#240)
* feat(planguard): read sqlc statement text and load a strict plan corpus

* fix(planguard): fail on unextracted statements, keep fragments mode-neutral

* feat(planguard): plan assertions, scoped sort exemptions and narrow retired-index verdicts

* fix(planguard): an errored run always fails

* fix(planguard): keep subplan conds off their parent scan; fail on unanalyzed budgets

* feat(planguard): read-only plan runner, reports and the run command

* fix(planguard): validate identifiers in emitted scripts; prove read-only runs

* feat(planguard): end-state corpus, planted regressions and the generated cached-plan policy

* fix(planguard): derive observer cases from data; mark legacy generic plans

* fix(planguard): bound the dense-region route resolvers; test policy refusals

* fix(planguard): re-measure the dense-region route cases; cover every policy refusal

* feat(planguard): synthetic fixture built through the migrations, checked in CI

* ci(planguard): build the fixture once; guard fixture data for identifiers

* fix(planguard): hash every fixture generator input; harden the fixture guard

* feat(planguard): snapshot diff over every column, named result classes and cursor walks

* fix(planguard): bound the relaxed diff classes; derive the cursor tie from data

* fix(planguard): refuse multi-statement text in the corpus runner

* feat: read-only server mode and an HTTP page diff between two builds

* fix(planguard): refuse escape strings and psql meta-commands in corpus text

* fix: storediff follows each build's own cursor; prove read-only gates via the log

* fix(planguard): match the PostgreSQL lexer on high-bit bytes; check every emitted line

* feat(admin): daily read-only plan check on the maintenance pool, its metric and report

* feat(planguard): daily prod check behind planguard.daily_check

* fix(planguard): cancel fresh runs at shutdown; expose a never-ran check

* ci(planguard): pin the fixture server and collation; refresh baselines

* fix(planguard): calibrate route budgets on one dataset; skip entries whose index is absent
2026-10-19 13:45:39 -04:00