From 962e1ffc105a87874792bd2fc7cbe3d85247d868 Mon Sep 17 00:00:00 2001 From: Audric Date: Mon, 20 Apr 2026 15:16:27 +0200 Subject: [PATCH] docs: surface SATELLITE_FILTER in /status + bump test count to 34 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit README: add an "Observability" paragraph noting that the active filter appears under /status.satellites[].filter — and by extension in the MQTT retained status topic and Redis live:satellite: snapshot, since those surfaces reserialize the same JSON. Omitted when no filter is set. DESIGN_SATELLITE_AND_CLUSTER: add an "Observable state" row to the TrunkLink vs SatelliteLink comparison table listing the fields in SatelliteLink::statusJson() including the new filter field. tests/TESTS.md: bump trunk test count 33 -> 34 and add a row for test_16c (satellite filter visible in /status). --- README.md | 6 ++++++ docs/DESIGN_SATELLITE_AND_CLUSTER.md | 1 + tests/TESTS.md | 5 +++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1bf2326..3f78920 100644 --- a/README.md +++ b/README.md @@ -376,6 +376,12 @@ parent also stops forwarding non-matching TGs back. Empty or absent means no filtering. The filter uses the shared TG-filter syntax (exact, `24*` prefix, `2427-2438` range, comma-separated). +**Observability.** The currently active filter appears under +`/status.satellites[].filter` on the parent — and therefore also in +the retained MQTT `status` topic and the Redis `live:satellite:` +snapshot, since those surfaces reserialize the same JSON. The key is +omitted when no filter is set. + Port `5303` is the default satellite port (separate from client port `5300` and trunk port `5302`). diff --git a/docs/DESIGN_SATELLITE_AND_CLUSTER.md b/docs/DESIGN_SATELLITE_AND_CLUSTER.md index d25965d..415fda8 100644 --- a/docs/DESIGN_SATELLITE_AND_CLUSTER.md +++ b/docs/DESIGN_SATELLITE_AND_CLUSTER.md @@ -85,6 +85,7 @@ Similar to `TrunkLink` but with different semantics: | Who initiates | Both sides connect to each other | Satellite connects to parent | | Audio path | Only prefix-matched + cluster TGs | All TGs active on either side | | `CLUSTER_TGS` config needed | Yes, must match on both sides | Not required | +| Observable state | `TrunkLink::statusJson` (per-peer) | `SatelliteLink::statusJson` with `id`, `authenticated`, `active_tgs`, and `filter` (when `SATELLITE_FILTER` is active) — same JSON feeds `/status`, MQTT retained status, and Redis | #### Parent-side changes (`Reflector.cpp`) diff --git a/tests/TESTS.md b/tests/TESTS.md index 420d3fb..4c473c2 100644 --- a/tests/TESTS.md +++ b/tests/TESTS.md @@ -5,7 +5,7 @@ The integration tests verify the trunk protocol, satellite links, twin (HA-pair) protocol, Redis-backed config store, and end-to-end audio routing by spinning up reflector meshes in Docker Compose and connecting fake peers and clients from a Python test harness. `run_tests.sh` runs in **two phases**: -1. A 3-reflector trunk mesh + a satellite-mode reflector exercising `test_trunk.py` (33 tests). +1. A 3-reflector trunk mesh + a satellite-mode reflector exercising `test_trunk.py` (34 tests). 2. A 4-reflector twin topology exercising `test_twin.py` (11 tests). A separate harness (`run_redis_tests.sh`) runs `test_redis.py` (13 tests) against a single-reflector + Redis stack. See [Redis Integration Tests](#redis-integration-tests) below. @@ -22,7 +22,7 @@ bash run_tests.sh This will: 1. Generate the default configs and `docker-compose.test.yml` from `topology.py` 2. Build and start the 3-reflector mesh -3. Run 33 automated trunk/satellite/MQTT tests (`test_trunk.py`) +3. Run 34 automated trunk/satellite/MQTT tests (`test_trunk.py`) 4. Enter an interactive prompt to manually test any TG number 5. Tear down the default mesh 6. Regenerate with `--topology twin` (4-reflector twin topology) @@ -173,6 +173,7 @@ Simulates a V2 SvxLink client. Performs the full TCP authentication handshake (P | 15 | Satellite audio to trunk peer | Satellite sends audio for a TG owned by another reflector; parent forwards via trunk | | 16 | Satellite disconnect cleanup | Abrupt satellite disconnect clears it from `/status` | | 16b | Satellite TG filter honored by parent | Satellite sends `MsgTrunkFilter` (type 122) after hello; parent forwards the matching cluster TG but drops the non-matching one | +| 16c | Satellite filter visible in `/status` | Active filter surfaces as `satellites[].filter`; key absent when unset, appears after send, clears after empty filter | ### Bidirectional Routing