Skip to content

fix: announce interface identification when transport disabled#519

Merged
torlando-tech merged 1 commit intomainfrom
fix/announce-interface-lookup-main
Feb 22, 2026
Merged

fix: announce interface identification when transport disabled#519
torlando-tech merged 1 commit intomainfrom
fix/announce-interface-lookup-main

Conversation

@torlando-tech
Copy link
Copy Markdown
Owner

Summary

  • Announces were showing "Unknown" interface on devices with transport mode disabled
  • Root cause: announce_table in RNS is only populated when transport is enabled; interface extraction relied solely on it
  • Extracted interface lookup into python/interface_lookup.py that checks announce_table first, then falls back to path_table (always populated regardless of transport mode)

Changes

  • New: python/interface_lookup.py — minimal module with get_receiving_interface() and format_interface_name()
  • Changed: python/reticulum_wrapper.py — import and call the new module (removed duplicated inline extraction from _announce_handler and poll_received_announces)
  • Changed: python/test_announce_handler.py — updated existing tests, added test_path_table_fallback_when_announce_table_missing

Test plan

  • 52 Python unit tests pass (30 announce handler + 22 announce polling)
  • Deployed to device with transport disabled, verified announces now show correct interface icons
  • Verify no regression on device with transport enabled

🤖 Generated with Claude Code

…bled

The announce_table in RNS is only populated when transport mode is enabled.
On non-transport nodes, interface extraction always returned None, causing
announces to show "Unknown" interface.

Extract interface lookup into python/interface_lookup.py module that checks
announce_table first, then falls back to path_table (which is always
populated regardless of transport mode).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 21, 2026

Greptile Summary

Fixed interface identification for announces on devices with transport mode disabled by implementing a fallback mechanism that checks path_table when announce_table is empty.

Key changes:

  • Extracted interface lookup into dedicated interface_lookup.py module with get_receiving_interface() function
  • Eliminated duplicate interface extraction logic from _announce_handler() and poll_received_announces() in reticulum_wrapper.py
  • Added comprehensive test coverage for path_table fallback scenario

Technical context:
RNS only populates announce_table when transport mode is enabled, but path_table is always populated regardless of transport configuration. The original code relied solely on announce_table, causing interface detection to fail on non-transport nodes.

Confidence Score: 5/5

  • Safe to merge - well-tested bug fix with proper fallback logic and no behavioral changes for transport-enabled nodes
  • Clean refactoring with comprehensive test coverage (52 tests passing), proper error handling, backward compatibility maintained, and addresses a specific bug without introducing new complexity
  • No files require special attention

Important Files Changed

Filename Overview
python/interface_lookup.py New module extracts interface lookup logic; implements fallback from announce_table to path_table for non-transport nodes
python/reticulum_wrapper.py Removed duplicate interface extraction logic in two locations, replaced with centralized get_receiving_interface() call
python/test_announce_handler.py Added test for path_table fallback scenario; updated existing test to mock both tables for completeness

Last reviewed commit: 9b0d071

@sentry
Copy link
Copy Markdown
Contributor

sentry bot commented Feb 21, 2026

Codecov Report

❌ Patch coverage is 90.90909% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
python/interface_lookup.py 90.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@torlando-tech torlando-tech merged commit 450e8da into main Feb 22, 2026
14 checks passed
@torlando-tech torlando-tech deleted the fix/announce-interface-lookup-main branch February 22, 2026 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant