mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-08-07 01:13:11 +02:00
1ba481483f
Adds a new nullable per-route knob that caps the total number of hops in a candidate packet's path. Packets whose path exceeds the cap are dropped from matching consideration entirely (before the subsequence matcher runs), so over-long paths never count toward packet_count_threshold. Complements the existing max_hop_span, which only constrains the gap between the first and last matched configured node. - Route model + migration (additive, nullable, default null = unlimited) - Threaded through matcher chain (_subsequence_indices early-return) - All 5 evaluate/preview/recent_matches call sites updated - API serializer/create/update/preview passthrough - CLI seed YAML import (update + create paths) - Frontend: distinct icons for span (<-o->) vs path-length (|<->|), always-rendered badges with infinity fallback, hover tooltips on every stats row item, i18n keys (en + nl) - Tests: matcher unit tests (within/exceeds cap), API round-trip, CLI seed import
32 lines
1.4 KiB
YAML
32 lines
1.4 KiB
YAML
# Routes seed file — route health monitoring definitions
|
|
#
|
|
# Loaded by `meshcore-hub seed` (and the compose `seed` profile).
|
|
# 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.
|
|
#
|
|
# 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).
|
|
|
|
routes:
|
|
- from: Ipswich
|
|
to: Norwich
|
|
description: A140 corridor route
|
|
visibility: community
|
|
match_width: 1
|
|
window_hours: 24
|
|
packet_count_threshold: 3
|
|
# clear_threshold: 10 # optional; omit/null = 2x threshold
|
|
# max_hop_span: 8 # optional; omit/null = unlimited
|
|
# max_path_length: 16 # optional; omit/null = unlimited (drops over-long packet paths)
|
|
enabled: true
|
|
reversible: true # match both directions (A->B and B->A)
|
|
path:
|
|
- a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2
|
|
- 9a8b7c6d5e4f9a8b7c6d5e4f9a8b7c6d5e4f9a8b7c6d5e4f9a8b7c6d5e4f9a8b
|
|
# observers: # optional; omit/empty = all observers
|
|
# - 0102030405060102030405060102030405060102030405060102030405060102
|