From 5949ae7f5837b4e6b20704ba1665a49dfff99e16 Mon Sep 17 00:00:00 2001 From: dmduran12 Date: Tue, 7 Apr 2026 16:09:25 -0700 Subject: [PATCH] fix: allow TRACE packets to reach engine for MQTT/LetsMesh publishing TRACE packets were short-circuited by processed_by_injection=True (fa0261d), preventing them from reaching the engine's storage/MQTT/LetsMesh publishing path. This meant trace responses with per-hop SNR data were consumed locally by the trace helper but never published to telemetry platforms. Fix: replace processed_by_injection with mark_do_not_retransmit(), matching the existing pattern used by ControlHandler. The trace helper still processes the packet for local terminal display (RTT/SNR). The engine records it to storage and publishes to MQTT/LetsMesh, but does not re-broadcast over RF. Co-Authored-By: Oz --- repeater/packet_router.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/repeater/packet_router.py b/repeater/packet_router.py index 187eeef9..71e7dce1 100644 --- a/repeater/packet_router.py +++ b/repeater/packet_router.py @@ -164,11 +164,15 @@ async def _route_packet(self, packet): # Route to specific handlers for parsing only if payload_type == TraceHandler.payload_type(): - # Process trace packet + # Process trace packet for local display (terminal RTT/SNR) if self.daemon.trace_helper: await self.daemon.trace_helper.process_trace_packet(packet) - # Skip engine processing for trace packets - they're handled by trace helper - processed_by_injection = True + # Allow the engine to record + publish this packet to MQTT/LetsMesh. + # mark_do_not_retransmit prevents RF re-broadcast (same pattern as + # ControlHandler at line 180). The trace request and response have + # different packet hashes, so the response won't be flagged as a + # duplicate of the request by the engine's seen-cache. + packet.mark_do_not_retransmit() # Do not call _record_for_ui: TraceHelper.log_trace_record already persists the # trace path from the payload. record_packet_only would treat packet.path (SNR bytes) # as routing hashes and log bogus duplicate rows.