mirror of
https://github.com/n0mjs710/HBlink4.git
synced 2026-11-08 12:26:31 +00:00
Problem: - When we TX to a repeater (assumed stream) and it starts RX'ing - The repeater ignores our TX packets (hardware busy receiving) - We waste bandwidth sending packets to a busy repeater Solution: - Detect when repeater has assumed stream and receives real stream - Remove that repeater from all active route-caches - Stop sending to it immediately (bandwidth saved) - Real RX streams always win over assumed TX streams Implementation: - Added check in _handle_stream_start() for is_assumed flag - Iterate all streams and remove repeater from target_repeaters - O(R×S) efficiency (~10-20 operations typical) - Falls through to create real stream normally Testing: - Added test_assumed_stream_route_cache_removal() - 39 tests passing (38 existing + 1 new) - Validates route-cache removal logic Documentation: - Added section in stream_tracking.md - Added detailed diagrams in stream_tracking_diagrams.md - Explains real vs assumed stream priority - Includes performance analysis and examples