fix: prevent duplicate traceroute pending records (#2364)#2380
Merged
Conversation
When MeshMonitor sends a traceroute via sendTraceroute(), the request is recorded in the database. When the physical node echoes back the outgoing packet, the processMeshPacket else-if branch recorded it again as a second pending entry. The response only matches one, leaving the other as a permanent "No response received" entry that overwrites the correct one in the UI. Fix: skip recording in the echo path when the packet is from our own node, since sendTraceroute() already recorded it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @Yeraze's task —— View job PR Review Analysis ✅I've thoroughly analyzed this pull request fixing duplicate traceroute pending records. Here's my comprehensive review: Review Checklist:
🎯 Code Quality & Best Practices✅ Excellent Implementation
🐛 Bug Analysis✅ Root Cause Correctly Identified
✅ Edge Cases Handled
🚀 Performance Considerations✅ Minimal Performance Impact
🔒 Security Implications✅ No Security Concerns
📋 Test Coverage Assessment✅ Adequate Testing Coverage
📝 Note: While no specific test was added for this exact edge case, the existing test suite validates the core functionality and the fix is small/low-risk. 🎖️ Final Recommendation: APPROVEThis is a well-implemented, targeted fix that:
The implementation is solid and ready for merge. The fix elegantly prevents echo packet duplication without affecting legitimate virtual node traceroute functionality. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the remaining part of #2364 — traceroute history showed two entries per request, with the second being an empty "No response received" that overwrote the correct entry in the UI.
Root Cause
When MeshMonitor sends a traceroute:
sendTraceroute()records a pending traceroute in the database ✓processMeshPacket()catches the echo (undecodable TRACEROUTE_APP packet) and records it again as a second pending entryFix
Skip recording in the echo path when the packet originates from our own node (
fromNum === localNodeNum), sincesendTraceroute()already recorded it. Virtual node client traceroutes (differentfromnode) are still recorded correctly.Files Changed
src/server/meshtasticManager.tsTest plan
🤖 Generated with Claude Code