fix: packet monitor uses server time for consistent ordering#2388
Merged
fix: packet monitor uses server time for consistent ordering#2388
Conversation
Incoming packets used meshPacket.rxTime (device clock) for the packet monitor timestamp, while outgoing packets used Date.now() (server clock). When the device clock drifts even slightly, this causes traceroute responses to appear before their requests in the packet monitor. Now both incoming and outgoing packets use server time consistently. The original rxTime is still preserved in packet metadata for debugging. Fixes timing comments in #2364 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @Yeraze's task —— View job PR Review AnalysisCompleted analysis of the timestamp consistency fix. This is a well-targeted improvement that addresses a real timing issue in the packet monitor. Todo List:
Review Findings✅ Code Quality & Best Practices
✅ Bug Analysis
✅ Performance Considerations
✅ Security Concerns
✅ Test Coverage
SummaryThis is an excellent fix that:
Recommendation: ✅ APPROVE - This is a well-implemented fix that addresses the timing issue described in #2364 without any apparent downsides. |
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
meshPacket.rxTime(device clock) for timestamps, while outgoing packets usedDate.now()(server clock)rxTimeis still preserved in packet metadata (rx_time) for debuggingAddresses timing comments in #2364
Test Plan
npx vitest run— 3070 tests pass, 0 failuresnpm run build— no TypeScript errors🤖 Generated with Claude Code