columba/python
torlando-tech 218fdee976 fix(ble): prevent interface/fragmenter loss during MAC rotation
- Rewrite _validate_spawned_interfaces() with 3-pass approach:
  - Pass 1: Collect orphaned addresses
  - Pass 2: Clean up address mappings, track interfaces to detach
  - Pass 3: Only detach interfaces with zero connected addresses
  - Fragmenters only cleaned up when interface fully detached

- Enhance _spawn_peer_interface() reuse logic:
  - Update address_to_identity and identity_to_address when reusing
  - Cancel pending detach for the identity
  - Mark interface as online

- Fix disconnect callbacks to preserve fragmenters:
  - _device_disconnected_callback: defer fragmenter cleanup to grace period
  - handle_central_disconnected: same fragmenter preservation
  - _process_pending_detaches: clean up fragmenters on actual detach

- Rename _cleanup_stale_interface() to _cleanup_stale_address():
  - No longer detaches interface during MAC rotation
  - Only cleans up stale address-specific mappings
  - Interface preserved for reuse with new address

Fixes orphaned peer interfaces and "No fragmenter for peer" warnings
during BLE MAC address rotation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 13:31:42 -05:00
..
ble_modules fix(ble): prevent interface/fragmenter loss during MAC rotation 2026-01-01 13:31:42 -05:00
drivers initial commit 2025-11-30 19:59:14 -05:00
jnius fix: Correct TCP RNode config format and add stub modules 2025-12-14 00:10:49 -05:00
patches initial commit 2025-11-30 19:59:14 -05:00
usb4a fix: Correct TCP RNode config format and add stub modules 2025-12-14 00:10:49 -05:00
usbserial4a fix: Correct TCP RNode config format and add stub modules 2025-12-14 00:10:49 -05:00
android_ble_interface.py initial commit 2025-11-30 19:59:14 -05:00
columba_logo.py feat: display Columba logo on RNode OLED via external framebuffer 2025-12-08 21:58:48 -05:00
conftest.py test: Add comprehensive unit tests for reticulum_wrapper.py 2025-12-12 22:22:10 -05:00
logging_utils.py initial commit 2025-11-30 19:59:14 -05:00
requirements.txt fix: use Sideband-compatible telemetry format for location sharing 2025-12-29 16:10:33 -05:00
reticulum_wrapper.py fix(ble): identity timeout cleanup and UI improvements 2025-12-31 23:07:31 -05:00
rnode_interface.py fix: TDD fixes for BLE deduplication cooldown asymmetry and test stability 2025-12-09 18:56:16 -05:00
test_android_ble_driver.py test: add coverage tests for request_identity_resync method 2025-12-30 16:11:42 -05:00
test_announce_handler.py test: add comprehensive tests for msgpack-affected code paths 2025-12-28 23:57:45 -05:00
test_opportunistic_timeout.py fix: Distinguish propagated vs delivered status for relay messages 2025-12-13 00:50:04 -05:00
test_path_request.py feat: Auto-request path for unknown destinations 2025-12-12 19:18:48 -05:00
test_propagation_fallback.py feat: Add automatic relay fallback and manual retry for failed messages 2025-12-13 00:01:13 -05:00
test_rnode_interface.py fix: TDD fixes for BLE deduplication cooldown asymmetry and test stability 2025-12-09 18:56:16 -05:00
test_stub_modules.py test: Improve patch coverage from 20.94% to 80%+ with 61 new tests 2025-12-14 01:30:09 -05:00
test_telemetry_format.py test: add comprehensive telemetry format tests 2025-12-29 17:50:57 -05:00
test_wrapper_announce_polling.py test: Add Phase 2 tests for reticulum_wrapper.py coverage 2025-12-12 22:39:49 -05:00
test_wrapper_ble.py test: Add 30 tests to improve TCP RNode patch coverage to 80%+ 2025-12-14 01:58:19 -05:00
test_wrapper_config.py test: Add 30 tests to improve TCP RNode patch coverage to 80%+ 2025-12-14 01:58:19 -05:00
test_wrapper_destination.py test: Add comprehensive unit tests for reticulum_wrapper.py 2025-12-12 22:22:10 -05:00
test_wrapper_heartbeat.py test: add coverage for heartbeat, exception handler, and persistence fields 2025-12-28 22:03:19 -05:00
test_wrapper_identity.py test: Add comprehensive unit tests for reticulum_wrapper.py 2025-12-12 22:22:10 -05:00
test_wrapper_initialization.py fix: Enable async TCP startup to prevent initialization timeout 2025-12-15 10:08:37 -05:00
test_wrapper_messaging.py fix: Add fields mock to LXMF delivery tests 2025-12-27 17:34:10 -05:00
test_wrapper_path.py test: Add comprehensive unit tests for reticulum_wrapper.py 2025-12-12 22:22:10 -05:00
test_wrapper_peer_identity.py perf: Optimize peer identity restoration from minutes to milliseconds 2025-12-14 22:13:35 -05:00
test_wrapper_propagation.py test: Add comprehensive unit tests for reticulum_wrapper.py 2025-12-12 22:22:10 -05:00
test_wrapper_reactions.py auto-claude: subtask-4-3 - Add Python tests for reaction send/receive 2025-12-24 20:46:18 -05:00
test_wrapper_stamp_generator.py test: add Python tests for stamp generator callback 2025-12-16 18:52:21 -05:00
test_wrapper_utilities.py test: Add comprehensive unit tests for reticulum_wrapper.py 2025-12-12 22:22:10 -05:00