Remove redundant channel listing

This commit is contained in:
Jack Kingsman
2026-03-12 20:01:28 -07:00
parent df538b3aaf
commit 0834414ba4
3 changed files with 2 additions and 8 deletions

View File

@@ -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.",

View File

@@ -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,

View File

@@ -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"]