Skip to content

Conversation

@debugmenot
Copy link

Description

  1. wrap all code paths that return errPacketTooShort so the error message now includes the packet or header type while keeping errors.Is compatibility

  2. add helper utilities (packetTooShortError, packetNameFromHeader) to centralize naming logic. packetNameFromHeader can be used later to fine-tune other errors with their origin

  3. update existing unmarshallers and size checks to use the helper, improving observability across RTCP packet types

  4. extend the test suite to cover the new behavior, including unit tests for the helper and a regression test on the existing invalid-header scenario

Reference issue

#Implements improvement #208

@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

❌ Patch coverage is 59.79381% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.03%. Comparing base (99b388f) to head (bd3c40c).

Files with missing lines Patch % Lines
packet.go 41.46% 24 Missing ⚠️
errors.go 79.16% 3 Missing and 2 partials ⚠️
transport_layer_cc.go 33.33% 4 Missing ⚠️
receiver_estimated_maximum_bitrate.go 0.00% 3 Missing ⚠️
full_intra_request.go 50.00% 1 Missing ⚠️
rfc8888.go 0.00% 1 Missing ⚠️
source_description.go 75.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (59.79%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #211      +/-   ##
==========================================
- Coverage   77.07%   77.03%   -0.04%     
==========================================
  Files          22       23       +1     
  Lines        2569     2086     -483     
==========================================
- Hits         1980     1607     -373     
+ Misses        493      381     -112     
- Partials       96       98       +2     
Flag Coverage Δ
go 77.03% <59.79%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant