Commit Graph
485 Commits
Author SHA1 Message Date
n30nex 84ac3c8781 feat(topology): serve bounded route links and identify decoded Public traffic 2026-10-04 01:03:08 -04:00
n30nex 53f2467864 test(traces): account for quality in legacy pagination fixtures 2026-10-04 00:05:18 -04:00
n30nex c554238485 fix(traces): validate trace frames and preserve ambiguous identities 2026-10-03 23:58:00 -04:00
n30nex 8c7fbb8423 Merge remote-tracking branch 'origin/main' into codex/post20-audit-server-20261003 2026-10-03 04:43:21 -04:00
MrAlders0n 001543032f Merge pull request #207 from MeshCore-Beacon/dev
release: v2.0.0
v2.0.0
2026-10-02 22:52:26 -04:00
MrAlders0n 1f83df8583 docs: move operator docs to beacon-docs (#206)
* docs: keep only server-specific contributor notes

* docs: trim README to the code and link to beacon-docs

* chore: strip tracking parameters from two airport website URLs
2026-10-02 21:43:03 -04:00
MrAlders0n be35b36679 docs: condense backup, README and contributor docs (#205) 2026-10-02 21:42:17 -04:00
n30nex fe4c4156c9 Merge remote-tracking branch 'origin/dev' into codex/post20-core-20261003 2026-10-02 21:20:16 -04:00
MrAlders0n af20bebfe5 docs: document route cursorId and activity coverage fields 2026-10-02 19:03:46 -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
MrAlders0n 4ad869d711 fix(db): page known routes by (last_seen, id)
The cursor was the last row's last_seen in ms, so routes sharing that
millisecond (common within one upsert batch) never came back. GET /routes
takes an optional cursorId, backed by keyset indexes; cursor alone keeps
working as before.
2026-10-02 19:03:46 -04:00
MrAlders0n a1aff810e9 fix(api): answer 404 only for missing rows
Lookups turned every error into a 404, and region filters into a 400, so a
transient database failure looked final to clients that don't retry 4xx.
Missing rows stay 404/400; anything else is a 500. Empty /regions and
/iatas lists are [] rather than null.
2026-10-02 19:03:46 -04:00
n30nex f946238d31 Merge remote-tracking branch 'origin/dev' into codex/post20-base-20261002 2026-10-02 18:15:13 -04:00
MrAlders0n 5b49356437 docs: update for 2.0.0 2026-10-02 16:53:32 -04:00
MrAlders0n 951e0b0de6 docs: regenerate swagger 2026-10-02 16:53:32 -04:00
MrAlders0n ec0ecd321b refactor(db): move the heard-IATA lookup into sqlc 2026-10-02 16:53:32 -04:00
MrAlders0n b30668bac4 fix(ws): keep the newest event on overflow and apply route/observer filters
A full send buffer dropped the oldest event and then the new one too while
reporting one drop. Subscribe accepted routeTypes and observerIds but never
applied them.
2026-10-02 16:53:32 -04:00
MrAlders0n 2f4f92e31e fix(db): tie-safe trace paging, atomic migrations and honest stats windows
GET /traces takes an optional cursorTag so tags sharing a millisecond survive
paging. Migrations run under an advisory lock and record each file in the
same implicit transaction, so a crash can't strand a fresh database.
Overview windowHours counts the hours it covers, hourly observer activity
fills unrolled hours from raw rows, and integration fixtures are UTC.
2026-10-02 16:53:32 -04:00
MrAlders0n ec0037860c fix(meshmapper): count cut-short requests and qualify groups by heard IATAs
Record each attempt before sending so a request lost to a deadline still
waits out MeshMapper's limit, and stop holding the directory lock across
HTTP. Groups now qualify only through heard or configured IATAs, and one
missing country list only skips pruning.
2026-10-02 16:53:32 -04:00
MrAlders0n 52fc3e1e48 fix(ingest): validate topic keys and harden against malformed input
A short topic pubkey panicked a lane worker and killed the process; keys must
now be 32 bytes and lane workers recover. Also reject non-finite radio values
before airtime, strip NULs from advert names and neighbour scopes, guard the
MQTT client pointer, and never stream a broker copy of a hearing as a repeat.
2026-10-02 16:53:32 -04:00
MrAlders0n 5ccb1a2ce3 fix(api): warn on untrusted proxies and tighten config validation
Warn at startup when limits are on without trusted_proxies, and once when a
request carries forwarding headers Beacon ignores. Reject short or whitespace
admin keys and negative durations. Key default-window stats by hour, return
500 for scope lookup failures, and validate IATA path params.
2026-10-02 16:53:32 -04:00
n30nex ced19727ea Merge remote-tracking branch 'origin/dev' into codex/post20-base-20261002 2026-10-02 16:34:31 -04:00
MrAlders0n 2042c1617f feat(stats): roll hourly scope observers and advertising nodes 2026-10-02 15:24:33 -04:00
MrAlders0n 53d9f86dd4 feat(stats): split /stats/scopes packet counts by hour 2026-10-02 13:57:54 -04:00
MrAlders0n 3e0b6c074c feat(stats): report the longest path per hour in /stats/paths 2026-10-02 13:57:54 -04:00
n30nex ae328cb6af Merge branch 'codex/post-20-route-evidence' into codex/topology-2-integration 2026-10-02 08:58:58 -04:00
n30nex 4fda8ed993 fix(routes): pin observation evidence to its path representation 2026-10-02 08:56:40 -04:00
n30nex 6ad59d3129 feat(topology): expose cached regional scope context for 2.0 2026-10-02 08:56:35 -04:00
n30nex 4ef27124cd Integrate upstream hourly rollups without changing the 2.0 schema 2026-10-02 08:43:56 -04:00
MrAlders0n 98006a9364 feat(stats): serve historical stats from hourly rollups
Stats endpoints read hourly rollup tables filled once per closed hour by one
advisory-locked task, instead of materialized views that re-scanned every
observation on each refresh. IATA-set tables give exact distinct counts for any
IATA set or region. Cleanup holds raw rows for unrolled hours (up to 24h).

Adds /stats/series; ingest keeps packet observation counts, observer last IATA,
channel message counts and trace tag summaries. 001_baseline.sql is rewritten,
so pre-release 2.0 databases must be recreated. See docs/historical-stats.md.
2026-10-02 07:43:56 -04:00
n30nex 88eb4289b7 Reconcile the preserved preview ancestry 2026-10-01 20:33:12 -04:00
n30nex 7891ccd687 Merge upstream MeshMapper discovery into the 2.0 experiment 2026-10-01 20:33:12 -04:00
MrAlders0n 6cd03e73da fix(db): refresh saved-route hash prefix on re-hearing 2026-10-01 12:14:36 -04:00
MrAlders0n 119be44c0d feat(channels): filter channel list by keyKnown
Also seed the cursor integration test with MeshMapper membership; it still
used channel_iatas after channel lists moved to region scoping.
2026-10-01 09:06:50 -04:00
MrAlders0n 27ca84f51e fix(meshmapper): allow MeshMapper's 60s request timeout 2026-10-01 06:05:42 -04:00
MrAlders0n 7392fdd2d6 fix(meshmapper): create group member IATAs and import zone names and centers 2026-09-30 23:21:44 -04:00
MrAlders0n f8ee1ac884 feat(meshmapper): import regional channels and scope channel lists by region 2026-09-30 23:09:40 -04:00
MrAlders0n 38b1a206b1 fix(meshmapper): respect MeshMapper's per-endpoint rate limits 2026-09-30 22:56:10 -04:00
MrAlders0n a970484b00 feat(meshmapper): import zone groups as regions 2026-09-30 22:56:10 -04:00
MrAlders0n bfda0d5281 feat(meshmapper): discover scope sources from the zone list 2026-09-30 22:46:00 -04:00
MrAlders0n 7267b8bca3 feat(meshmapper): accept scope sources outside configured regions 2026-09-30 22:27:36 -04:00
MrAlders0n 9a4e17b270 feat(meshmapper): import zones for every known IATA 2026-09-30 22:23:37 -04:00
MrAlders0n e2b64f2a36 chore: version bump v2.0.0 2026-09-30 22:14:11 -04:00
MrAlders0n 11e0ed7353 docs(config): surface MeshMapper integrations first 2026-09-30 22:13:31 -04:00
MrAlders0n 2f49ffb3a3 feat(api): filter scope lists by region and catalogue membership
Region-filtered /scopes and /stats/scopes now list manual scopes configured
for the region and imported scopes whose MeshMapper catalogue includes the
IATA, instead of inferring membership from observed traffic. Filtered
/scopes returns string[] like the unfiltered call.

Manual scopes now require a region in config.
2026-09-30 22:05:04 -04:00
n30nex 835d1cdd48 fix(nodes): include known default scope in list responses 2026-09-30 22:01:21 -04:00
n30nex 644960e4a6 fix(nodes): include known default scope in list responses 2026-09-30 22:00:12 -04:00
n30nex eda1f3c25e Keep node types explicit in baseline evidence fixtures 2026-09-30 21:56:24 -04:00
n30nex bcbc8b73c1 Adapt pinned-route fixtures to required baseline columns 2026-09-30 21:55:16 -04:00
n30nex be6360305c Merge upstream 2.0 baseline into isolated topology integration 2026-09-30 21:54:09 -04:00