refactor: replace route name with from/to endpoint labels

Route identity is now a (from_label, to_label) composite unique pair
instead of a single name column.  The three route migrations (create
tables, add reversible, replace name) are collapsed into one clean
migration since the feature hasn't shipped yet — 8f2a3c4d5e6f creates
all five tables with from_label/to_label + reversible from the start,
no intermediate steps.

Engine: recent_matches now returns the sliced subpath between the
matched endpoints, not the full path.  Diagnosis text moved to a hover
tooltip on the quality badge.  Cards sorted by from_label.  Seed YAML
switched to a list format with from/to keys; upsert by (from_label,
to_label).  Plan/tasks docs updated to present the final schema.
This commit is contained in:
Louis King
2026-07-13 13:35:58 +01:00
parent 6a4329b9d2
commit 1ee01a65fe
20 changed files with 511 additions and 243 deletions
+25 -21
View File
@@ -1,26 +1,30 @@
# Routes seed file — route health monitoring definitions
#
# Loaded by `meshcore-hub seed` (and the compose `seed` profile).
# Keyed by route name; each entry holds the route's knobs plus an ordered
# `path` of node public_keys (>= 2, distinct) and optionally an `observers`
# list of public_keys.
# A list under the top-level `routes:` key. Each entry has `from`/`to`
# endpoint labels, the route's knobs, and an ordered `path` of node
# public_keys (>= 2, distinct) plus an optional `observers` list of
# public_keys.
#
# Path nodes must already exist in the database (create them via
# node_tags.yaml or let the collector discover them). Observer nodes that
# don't exist yet are skipped with a warning (not an error).
# Entries are upserted by the (from, to) label pair. Path nodes must
# already exist in the database (create them via node_tags.yaml or let
# the collector discover them). Observer nodes that don't exist yet are
# skipped with a warning (not an error).
Ipswich ↔ Norwich:
description: A140 corridor route
visibility: community
match_width: 1
window_hours: 24
packet_count_threshold: 3
# degraded_threshold: 10 # optional; omit/null = 2x threshold
# max_hop_span: 8 # optional; omit/null = unlimited
enabled: true
reversible: true # match both directions (A->B and B->A)
path:
- a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2
- 9a8b7c6d5e4f9a8b7c6d5e4f9a8b7c6d5e4f9a8b7c6d5e4f9a8b7c6d5e4f9a8b
# observers: # optional; omit/empty = all observers
# - 0102030405060102030405060102030405060102030405060102030405060102
routes:
- from: Ipswich
to: Norwich
description: A140 corridor route
visibility: community
match_width: 1
window_hours: 24
packet_count_threshold: 3
# degraded_threshold: 10 # optional; omit/null = 2x threshold
# max_hop_span: 8 # optional; omit/null = unlimited
enabled: true
reversible: true # match both directions (A->B and B->A)
path:
- a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2
- 9a8b7c6d5e4f9a8b7c6d5e4f9a8b7c6d5e4f9a8b7c6d5e4f9a8b7c6d5e4f9a8b
# observers: # optional; omit/empty = all observers
# - 0102030405060102030405060102030405060102030405060102030405060102