Commit Graph
98 Commits
Author SHA1 Message Date
MrAlders0n 22b10d18d5 Deliver alerts by email or push 2026-11-15 02:02:21 -05:00
MrAlders0n 6fa5e2c13e Evaluate alert rules 2026-11-15 01:56:20 -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 4708513cdd Close remaining credential races 2026-11-15 01:19:31 -05:00
MrAlders0n 87a2de2b87 Fix reset, resend and session lookup edge cases 2026-11-15 01:14:20 -05:00
MrAlders0n 24e3588e65 Serialise sign-in against credential changes 2026-11-15 01:08:02 -05:00
MrAlders0n 77cde9f66d Tighten who can take and stop a telemetry request 2026-11-15 01:04:42 -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 fd1d7de5f9 Tighten resend, username checks and throttle eviction 2026-11-14 23:33:26 -05:00
MrAlders0n 79386e9851 Close throttle and pending sign-up gaps 2026-11-14 23:28:10 -05:00
MrAlders0n 7fa0f4e8b1 Harden registration and account mail 2026-11-14 23:20:43 -05:00
MrAlders0n 2a22c6d1dd Add the accounts service 2026-11-14 23:10:39 -05:00
MrAlders0n 97b77298c9 Add users, sessions and one-time tokens 2026-11-14 22:56:04 -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 96f29f407e Make polling rate limits atomic, budget readings per observer and lock cleanup per target 2026-11-14 14:54:44 -05:00
MrAlders0n 4495e1c648 Add admin view of polling targets and show the effective pause 2026-11-14 14:21:45 -05:00
MrAlders0n 4bec5669ee Rate limit polling claims and readings and cap message sizes 2026-11-14 14:16:00 -05:00
MrAlders0n 5437a708a2 Serialize polling elections per target and trust only assigned pollers' readings 2026-11-14 14:11:10 -05:00
MrAlders0n 7ada6b8c5c Wire polling into startup, jobs and admin 2026-11-14 13:35:49 -05:00
MrAlders0n 4f7afa3ccc Base polling liveness on receive time 2026-11-14 13:17:14 -05:00
MrAlders0n 008d94a221 Add polling tables and store 2026-11-14 10:46:39 -05:00
MrAlders0n 7ede937a77 feat(api): hourly node activity from a rollup 2026-11-10 09:59:47 -05:00
MrAlders0n 80255119c1 perf(observers): serve the 24-hour activity chart from memory
The 24-hour observer chart (15-minute buckets) read every raw observation
of the day twice, once for the buckets and once for the type mix: 4.5 s
for a busy observer on prod, and the apps poll it every minute. It now
reads them in one pass, and the process that ingests keeps per-observer
15-minute sums of what it stores (25 hours), so the chart only reads raw
rows before counting began and for the slot still filling. Results match
the raw read exactly (integration test), including after retention
deletes.
2026-10-28 22:30:52 -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 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 c3350953e5 Re-hearing a hash-only channel with a nil fingerprint updates its row (#284) 2026-10-24 14:41:14 -04:00
MrAlders0n 1967573201 Gate the global hop page on the hop group's estimate (#278)
* Gate the global hop page on the hop group's estimate, keeping today's statement for large groups

* Decide the global hop branch in the store from cached hop statistics

* Planguard test corpora pass the global hop page's read_group

* Read hop statistics outside the lock on their own context; planner clamps; both branches in tests and corpus
2026-10-24 13:52:03 -04:00
MrAlders0n 4483c6de3d Sample the audit and verification slices by row; count payload-type progress in rows (#280)
* Sample the audit and verification slices by row; count payload-type progress in rows

* Read sample statistics outside the verify transaction; anchor payload-type progress at id 0
2026-10-24 13:28:15 -04:00
MrAlders0n 6c812c2b5c Slice the packet_sites fill by observations and count progress in rows (#274)
* Slice the packet_sites fill by observations and count progress in rows

* Keep one set of id statistics per fill; count new ids one row each
2026-10-24 12:45:11 -04:00
MrAlders0n 4bd1432d81 Run all-region top nodes as its own statement with two parallel workers (#275)
* Run all-region top nodes as its own statement with two parallel workers

* Check the parallel statement returns its own connection to the pool

* Rebaseline the pnw top-nodes entry for the probe without its all-region branch
2026-10-24 12:28:20 -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 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 5ded8d925f Channel messages by site: a read model that serves region and scope pages while trusted (#246)
* feat(db): channel_message_iatas table and indexes

* feat(ingest): record channel message sites at insert and on every later hearing

* feat(db): channel message site backfill and two-range reconcile

* feat(db): serve region and scope message pages from the site read model when trusted

* feat: boot repair, periodic reconcile and first-time verification for the message site read model

* test(planguard): channel message site statements, diff and storediff cases

* feat(background): log when a read-only server trusts the message site read model

* test(planguard): storediff vars in query values, and message cases read from the data

* fix(ingest): record a stored hearing's channel message site right after the observation insert

* fix: bounded message dispatch for filtered all-channel pages, fresher read-only trust, earlier invalidation

* fix: record a hearing's site after its path is marked and skip the backstop when the message was found; read-only trust ends at the writer's deadline
2026-10-19 21:20:21 -04:00
MrAlders0n d4e85cbf90 feat(background): mark the payload-type backfill done at once when no observation is untyped (#244) 2026-10-19 19:44:22 -04:00
MrAlders0n ded8708fec Stats, adverts, traces and telemetry: bounded statements, same results (#243)
* feat(db): observer adverts on a partial index once observations carry their payload type

* fix(db): keep today's adverts statement unguarded and rate-limit the gate's read warning

* feat(background): batched, resumable payload-type backfill for untyped observations

* fix(background): cap each payload-type backfill statement at 50,000 rows

* fix(db): reject a non-positive backfill row cap

* perf(db): probe rollups per hour and IATA for region-sized stats lists

* fix(db): keep the stats probes inside each rollup table's hour range

* test(db): push the far-future until to year 9999 so a missing path-stats end bound times out

* perf(db): row-comparison trace cursor and a since-only telemetry statement

* test(db): pin the empty trace cursor tag and run the trace pagination tests in CI

* test(planguard): stats, adverts, traces and telemetry statements leave pending; diff cases

* test(planguard): window-bounded advert roles, short quiet page, per-observer telemetry cursors
2026-10-19 19:18:45 -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 dba66cada7 Small tables: drop HOT-blocking indexes, channel write-through (#239)
* perf(db): drop small-table indexes that block HOT updates

* perf(db): touch known channels by id instead of upserting

* feat: preload channel ids at boot for ingest and maintenance
2026-10-19 08:28:15 -04:00
MrAlders0n 8e0fd4b535 Routes: one statement per filter shape, exact bounded retention, stamp-free reconfirm (#235)
* feat(db): background_state table and the (hop_count, iata) route index

* perf(db): one /routes statement per filter shape, hop pair on custom plans

* feat(db): keyset route retention and grace slices at exact cutoffs

* feat(background): hourly route retention with a bounded grace walk and watermark

* fix(background): bound the grace walk at microsecond cutoffs

* feat(db): stamp-free reconfirm sweep over the route primary key

* feat(background): pace route reconfirm at routes.reconfirm_rows_per_hour, no stamps

* test(routes): drive route retention end to end and tidy comments

* fix(profiling): sample during the hourly route retention run
2026-10-19 05:39:38 -04:00
MrAlders0n c27f721dd2 Route search hop order, node-types split, bounded migration lock waits (#234)
* perf(routes): keep hop_count indexes out of route search order

* perf(stats): count node types without node_iatas when unfiltered

* perf(db): drop the unused idx_known_routes_iata_last_seen

* fix(db): bound boot migration lock waits and name the blockers

* test(db): pin the lock-retry rebuild and tidy comments
2026-10-19 03:58:37 -04:00
MrAlders0n 632b83c4b9 feat(api): search packets by hash prefix (#227) 2026-10-14 17:04:22 -04:00
MrAlders0n 7297215555 feat(meshmapper): import repeater site details for node detail (#221) 2026-10-11 14:18:26 -04:00
MrAlders0n 9bbf8efee5 release: v2.0.4 (#217)
* perf(routes): batch cross-IATA and hash route search (#216)

One search fired a /routes/cross request per IATA pair (138k on 2026-10-08). Route search now takes an optional iatas list and runs a fixed number of index-backed queries. /info advertises built-in minimum client versions.

* chore: bump version to 2.0.4
2026-10-09 22:17:23 -04:00
MrAlders0n 041d9c1f45 release: v2.0.2
Release the changes on `dev` as v2.0.2: authenticated MeshMapper imports and the traffic-sorted observer directory, including rolling seven-day counts from available history. Bump the API version and regenerate Swagger.

MeshMapper integration requires an API key. Regional admins’ existing per-region or grouped-region coverage keys also work for these APIs. Deployments should set `MESHMAPPER_API_KEY` and restart Beacon.

Validation: `go build ./...`, `gofmt -l .` (empty), `go vet ./...`, `go test ./...`, `govulncheck ./...`, and race tests for MeshMapper and scopestore passed in a clean checkout. PostgreSQL integration tests require CI because Docker is unavailable locally.
2026-10-05 18:35:41 -04:00
MrAlders0n ff8758b932 fix(db): read observer activity raw rows back to the rollup watermark
Hourly activity read raw rows only 3h back, so a longer rollup backlog left
hours drawn as zero. The raw tail now starts at the newest complete rollup
hour, capped at the 24h raw holdback, and the response reports rolledUntil
and rawFrom so clients can show anything still uncovered.
2026-10-02 19:03:46 -04:00