From 0834414ba46cc03ab4a421dad72977eef9e2a830 Mon Sep 17 00:00:00 2001 From: Jack Kingsman Date: Thu, 12 Mar 2026 20:01:28 -0700 Subject: [PATCH] Remove redundant channel listing --- app/radio_sync.py | 4 ++-- app/routers/debug.py | 5 ----- tests/test_api.py | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/app/radio_sync.py b/app/radio_sync.py index d8fbdba..fc14a13 100644 --- a/app/radio_sync.py +++ b/app/radio_sync.py @@ -513,7 +513,7 @@ async def audit_channel_send_cache(mc: MeshCore) -> bool: return True logger.error( - "A periodic radio audit discovered that the channel send-slot cache fell out of sync with radio state. This indicates that some other system, internal or external to the radio, has updated the channel slots on the radio (which the app assumes it has exclusive rights to, except on TCP-linked devices). The cache is resetting now, but you should review the README.md and consider using the environment variable MESHCORE_FORCE_CHANNEL_SLOT_RECONFIGURE=true to make the radio use non-optimistic channel management and force-write the channel to radio before each send. This is a minor performance hit, but guarantees consistency. Mismatches found: %s", + "[RADIO SYNC ERROR] A periodic radio audit discovered that the channel send-slot cache fell out of sync with radio state. This indicates that some other system, internal or external to the radio, has updated the channel slots on the radio (which the app assumes it has exclusive rights to, except on TCP-linked devices). The cache is resetting now, but you should review the README.md and consider using the environment variable MESHCORE_FORCE_CHANNEL_SLOT_RECONFIGURE=true to make the radio use non-optimistic channel management and force-write the channel to radio before each send. This is a minor performance hit, but guarantees consistency. Mismatches found: %s", "; ".join(mismatches), ) radio_manager.reset_channel_send_cache() @@ -551,7 +551,7 @@ async def _message_poll_loop(): ) else: logger.error( - "Periodic radio audit caught %d message(s) that were not " + "[RADIO SYNC ERROR] Periodic radio audit caught %d message(s) that were not " "surfaced via event subscription. See README and consider " "setting MESHCORE_ENABLE_MESSAGE_POLL_FALLBACK=true to " "enable more frequent polling.", diff --git a/app/routers/debug.py b/app/routers/debug.py index 77f3c1e..9ca3ee3 100644 --- a/app/routers/debug.py +++ b/app/routers/debug.py @@ -39,7 +39,6 @@ class DebugRuntimeInfo(BaseModel): path_hash_mode_supported: bool channel_slot_reuse_enabled: bool channel_send_cache_capacity: int - channel_send_cache: list[dict[str, int | str]] remediation_flags: dict[str, bool] @@ -284,10 +283,6 @@ async def debug_support_snapshot() -> DebugSnapshotResponse: path_hash_mode_supported=radio_runtime.path_hash_mode_supported, channel_slot_reuse_enabled=radio_runtime.channel_slot_reuse_enabled(), channel_send_cache_capacity=radio_runtime.get_channel_send_cache_capacity(), - channel_send_cache=[ - {"channel_key": channel_key, "slot": slot} - for channel_key, slot in radio_runtime.get_channel_send_cache_snapshot() - ], remediation_flags={ "enable_message_poll_fallback": settings.enable_message_poll_fallback, "force_channel_slot_reconfigure": settings.force_channel_slot_reconfigure, diff --git a/tests/test_api.py b/tests/test_api.py index ab9b452..aa943f6 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -187,7 +187,6 @@ class TestDebugEndpoint: assert payload["application"]["commit_hash"] == "deadbeef" assert payload["runtime"]["channel_slot_reuse_enabled"] is True - assert payload["runtime"]["channel_send_cache"] == [{"channel_key": channel_key, "slot": 0}] assert any("support snapshot marker" in line for line in payload["logs"]) radio_probe = payload["radio_probe"]