Commit Graph
85 Commits
Author SHA1 Message Date
Ben 007d538da9 Harden map privacy and telemetry displays 2026-03-13 19:21:48 +00:00
Ben ebb8fe55b4 Ship path history, site consolidation, and telemetry fixes 2026-03-12 23:12:33 +00:00
Ben 77dafab7db Fix Teesside node scope and add flasher nav 2026-03-09 21:54:28 +00:00
Ben c5c4053093 Prioritize repeater markers over client nodes 2026-03-09 19:03:28 +00:00
Ben 4793fb9a6e Label database clients by service 2026-03-09 02:48:59 +00:00
Ben ca94303fe9 Reduce website polling pressure 2026-03-09 02:41:48 +00:00
Ben 1f0e4addde Improve stats charts and path hash reporting 2026-03-09 02:20:00 +00:00
Ben 10136d5582 Add observer region stats cards 2026-03-08 21:25:28 +00:00
Ben f294b96592 Remove path simulation workers 2026-03-08 12:53:44 +00:00
Ben 9e25f876c9 Label control packets as CTL 2026-03-08 12:42:49 +00:00
BenandClaude Opus 4.6 b9a231ef36 Dedup relay copies per observer and increase DB connection limit
Drop duplicate MQTT packets when the same packet hash arrives at the
same observer with the same hop count within 120s. Increase TimescaleDB
max_connections to 300 to prevent connection exhaustion on startup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 12:26:09 +00:00
BenandClaude Opus 4.6 2de39a871a Multi-observer path resolution: anchor-constrained solving with corridor relaxation
- Add server-side multi-observer resolver that solves a shared backbone
  once (anchor observer), then constrains other observers to reuse the
  same nodes for shared path hash prefixes, branching only at divergence
- New GET /api/path-beta/resolve-multi endpoint returns consistent
  per-observer results in a single request
- Relax corridor filtering for multi-observer packets: candidates
  accepted if within ANY observer's corridor, not just the primary
- Strengthen observer hop hint weights (0.09→0.18 confirmed,
  0.11→0.22 reachable, 0.10→0.20 fallback) for better cross-observer
  candidate steering
- Enumerate permutations from fork point for divergent suffixes
- Frontend prefers multi endpoint when 2+ observers, with cache
  keyed by sorted observer IDs for automatic invalidation on new
  observations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 12:19:27 +00:00
Ben 8eadea466e Handle exact and invalid multibyte paths 2026-03-08 11:59:35 +00:00
BenandClaude Opus 4.6 954b3ce853 Harden MeshCore packet decoding: extract routeType, validate paths, guard compat rewrite
- Extract and persist routeType from wire header byte (was always undefined)
- Log warnings on truncated path data and reserved hash-size modes
- Guard buildCompatRawHex against pathByteLength > 63 overflow
- Extract transport codes (4 bytes) when present in FLOOD/DIRECT+codes packets
- Validate path hash hex lengths against wire-format hash size in resolver
- Add routeType to LivePacket type for downstream consumers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 11:49:49 +00:00
Ben f0c2248c18 Add cookie banner and raw test feed view 2026-03-08 04:04:22 +00:00
Ben f5fcd68105 Refresh README for current public features 2026-03-08 04:00:53 +00:00
Ben b908fee98f Cull map rendering and correct health CPU metric 2026-03-08 03:53:29 +00:00
BenandClaude Sonnet 4.6 7b9ac180a9 Performance: push dedup to SQL, periodic cache eviction, owner/live cache
- getOwnerNodeIdsForUsername/getMappedOwnerNodeIds: move dedup and format
  validation into SQL (SELECT DISTINCT + regex filter) instead of JS post-processing
- viableLinksCache: add setInterval to evict stale entries every 30s so unused
  network/observer combos don't persist in memory indefinitely
- /owner/live: add 5s in-memory cache per nodeId to avoid 6 heavy parallel
  DB queries on every poll cycle

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-08 03:47:26 +00:00
BenandClaude Sonnet 4.6 0e8dba2b3d Fix low-severity security issues: headers, body limit, log redaction, telemetry validation
- Add X-Content-Type-Options, X-Frame-Options, and Referrer-Policy headers to all responses
- Cap express.json() body to 50kb to prevent memory exhaustion via large payloads
- Redact credentials from MQTT broker URL before logging (ws://user:pass@host pattern)
- Whitelist telemetry event kind field instead of accepting arbitrary strings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-08 03:44:09 +00:00
BenandClaude Sonnet 4.6 bbadebd761 Security hardening: input validation, bounded caches, and cookie secret enforcement
- Enforce OWNER_COOKIE_SECRET env var — throw on startup if unset rather than
  falling back to a weak derived secret
- Fix HTTPS detection to use exact string match instead of .includes()
- Cap and validate MQTT login credentials (32 char max, username format regex)
- Validate packetHash query param as hex before hitting the path resolver
- Validate node ID path params as 64-char hex in /nodes/:id/links and /nodes/:id/history
- Bound viableLinksCache to 50 entries with oldest-first eviction
- Bound countedAdvertHashes to 10,000 entries with oldest-first eviction

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-08 03:34:08 +00:00
Ben fca3de4bc1 Prefer rich packet rows for beta path resolution 2026-03-08 03:17:50 +00:00
Ben 7e4d9749ae Improve path resolution and backend connection handling 2026-03-08 03:03:58 +00:00
Ben 0d111e16c6 Tighten MQTT ingest and owner/path handling 2026-03-08 02:31:31 +00:00
Ben f84553bb3e Refactor path and packet helper modules 2026-03-08 02:06:00 +00:00
Ben 70d7b4c592 Improve beta path fallback and hide invalid map nodes 2026-03-08 01:56:45 +00:00
Ben bfafc8a4a5 Reduce live feed client retention 2026-03-08 01:28:08 +00:00
Ben a7503ef3f2 Refine coverage, owner links, and UK feed 2026-03-08 01:16:58 +00:00
Ben d2bac3317d Fix multi-observer packet path overlays 2026-03-08 00:09:40 +00:00
BenandClaude Sonnet 4.6 bf182b8ff9 Fix beta path hop ordering and suppress red segments overlapping purple paths
- Resolver now picks shortest-hop observation (ORDER BY hop_count ASC) instead of
  most recent arrival, matching what the live feed shows for flooding packets
- Red path segments that share an edge with any purple (high-confidence) path are
  filtered out so purple always takes visual precedence

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 23:32:55 +00:00
BenandClaude Sonnet 4.6 c9511d8eb9 Fix multi-observer path rendering, links flicker, stale node health, and login
- usePacketPathOverlay: don't cache null beta predictions; re-fetch pinned
  packet paths when new observers arrive after pin
- MapView: stable linkedNodesKey fingerprint so linkLines memo only recomputes
  when linked node positions/roles change, not on every heartbeat
- health/status + api/routes: exclude test-network-only nodes from stale count
  and mqttNodes stat so they don't inflate thresholds
- mosquitto/acl: add meshcore-test/# readwrite for backend user
- useNodes/PacketFeed/App: merge rx_count/tx_count from DB, ALL badge when all
  MQTT regions hear a packet, improved summary extraction
- db/index: getRecentPackets now deduplicates by packet_hash with observer
  aggregation; getLastNPackets adds rx_count/tx_count and _summary support

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 22:53:03 +00:00
Ben 41c01bb70b Add isolated test feed and fix live public stats 2026-03-07 21:27:59 +00:00
Ben cae0580609 Support multibyte path hashes across live pathing 2026-03-07 15:51:29 +00:00
Ben 814c94d01f Update README for owner portal and current coverage 2026-03-07 03:25:54 +00:00
Ben 05514fdc18 Add owner auth DB, website refresh, and coverage rollback 2026-03-07 03:23:52 +00:00
Ben 729a966e6a Add server-side beta path resolver and mobile layer controls
- move beta path resolution onto the backend with packet-level diagnostics and live API access
- add path simulation worker plumbing, health/schema updates, and compose wiring
- update app overlays to fetch server-computed beta paths with animated rendering and request caching
- refine mobile controls so map layers collapse behind a toggle and compact the links legend
2026-03-07 00:42:31 +00:00
Ben fe56f39007 Refine beta path rendering, confidence split, and adverts source anchoring 2026-03-06 00:44:07 +00:00
Ben 0d77a5027c feat: update owner auth and refresh stats visualizations 2026-03-05 23:05:29 +00:00
Ben 833ccd8de7 health: anonymize ingest staleness and simplify active wording 2026-03-05 22:22:48 +00:00
Ben b1631be659 Improve mobile map UX and scale node markers by zoom 2026-03-05 01:59:21 +00:00
Ben 64a5b6bdf8 Polish live feed anchoring and unify MQTT docs for single-feed setup 2026-03-05 01:52:18 +00:00
Ben cd3ff83029 Unify MQTT docs and single-feed IATA routing; enable UK global stats 2026-03-05 01:49:58 +00:00
Ben ec861c4332 Refine beta links UI and lock live feed behavior 2026-03-05 01:25:18 +00:00
Ben e86912db9e Improve owner dashboard layout and deduplicated live packets 2026-03-05 01:19:33 +00:00
Ben b61f7429df Clarify Phase 5 auto-claim via Ed25519 key without login 2026-03-05 00:50:28 +00:00
Ben eca35e0016 Add repeater owner portal roadmap phase and renumber planned phases 2026-03-05 00:49:03 +00:00
Ben 8951db1bad Restore phased roadmap format in README 2026-03-05 00:46:57 +00:00
Ben 7da3b6c54e Sanitize README to remove environment-specific deployment details 2026-03-05 00:43:46 +00:00
Ben 0e365479a6 Split workers, fix frontend proxy resilience, expand health UX/docs 2026-03-05 00:39:44 +00:00
Ben 6a1caef117 Refine health page: 1h worker throughput and cleaner server stats 2026-03-05 00:09:37 +00:00
Ben 2783ab0194 Add public health page and improve beta map UX/performance 2026-03-05 00:06:12 +00:00