Skip to content

Networking: Stop logging handled voice frames as unknown packets - #319

Open
Kheartz wants to merge 1 commit into
developfrom
fix/voice-packet-log-spam
Open

Kheartz wants to merge 1 commit into
developfrom
fix/voice-packet-log-spam

Conversation

@Kheartz

@Kheartz Kheartz commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Voice relay frames (ID_RAKVOICE_RELAY_DATA, packet 48) were logged as unknown before the server's fallback handler processed them, flooding server logs during voice chat.

Run the fallback handler before logging and let it return whether it recognized the packet. Handled voice frames continue through the relay without trace spam; unclaimed packets retain their diagnostics.

Validation: builds\build.bat RunFrameworkTests 64 passed all 660 framework tests and the client scripting test. The new regression check verifies that a burst of 100 voice frames reaches the handler without unknown-packet logs, while declined packets and packets with no handler still get logged.

Summary by CodeRabbit

  • Bug Fixes
    • Voice network packets are now recognized and handled without being reported as unknown.
    • Packets that aren’t recognized continue to be logged as unknown. Voice packets are also logged as unknown when no handler is available to process them, making it easier to distinguish handled traffic from unclaimed packets.

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 514fa91d-3afb-4fbd-aaab-7adee5f74ac1

📥 Commits

Reviewing files that changed from the base of the PR and between eb8c84f and 2c76559.


📒 Files selected for processing (4)
  • code/framework/src/integrations/server/instance.cpp
  • code/framework/src/networking/network_peer.cpp
  • code/framework/src/networking/network_peer.h
  • code/tests/modules/network_packets_ut.h

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.



Walkthrough

Unknown-packet handlers now return whether they recognize a packet. The networking layer skips unknown-packet logging for recognized packets. The server handler recognizes voice relay packets, and a packet-dispatch test checks recognized and declined packets.

Changes

Packet Recognition

Layer / File(s) Summary
Boolean packet recognition
code/framework/src/networking/network_peer.h, code/framework/src/integrations/server/instance.cpp, code/framework/src/networking/network_peer.cpp, code/tests/modules/network_packets_ut.h
The unknown-packet callback now returns a boolean. The server handler claims voice relay packets, and dispatch logs only packets that the handler declines. The test covers claimed voice frames, an unclaimed user packet, and a voice frame when no handler is set.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: segfaultd

Merge Risk: ⚪ Minimal · up to 2c765

The packet test observes logs synchronously, and no merge-blocking issue remains.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: handled voice relay frames no longer produce unknown-packet logs.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR


🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checked the packets in the night
Voice frames passed without a log in sight
Unclaimed packets left a trace
The callback marked each case
Then I hopped home, pleased with the dispatch rite

Comment @coderabbitai help to get the list of available commands.

@Kheartz

Kheartz commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Kheartz

Kheartz commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Kheartz
Kheartz requested a review from Segfaultd October 10, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants