Skip to content

Conversation

@philipch07
Copy link
Contributor

Description

  • Adds a reference to RFC 9260 since it previously didn't refer to anything
  • Adds a guard for if raw is empty in unmarshal().
  • Adds tests for the guard

Reference issue

Resolves #422.

@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.85%. Comparing base (a69c6a2) to head (f8adf77).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #423   +/-   ##
=======================================
  Coverage   83.84%   83.85%           
=======================================
  Files          51       51           
  Lines        3448     3450    +2     
=======================================
+ Hits         2891     2893    +2     
  Misses        417      417           
  Partials      140      140           
Flag Coverage Δ
go 83.85% <100.00%> (+<0.01%) ⬆️

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.

@JoeTurki JoeTurki requested a review from Copilot November 2, 2025 05:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds validation for the Forward TSN Supported parameter to ensure it conforms to RFC 9260 requirements. The parameter must be header-only (length=4) with no payload data.

Key Changes:

  • Added validation in unmarshal to reject parameters with non-empty payloads
  • Introduced a new error type ErrForwardTSNSupportedParamInvalidLength for invalid length errors
  • Added comprehensive test coverage for both invalid unmarshal and marshal edge cases

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
param_forward_tsn_supported.go Added error constant and validation logic to enforce header-only parameter format
param_forward_tsn_supported_test.go Added two new test cases covering invalid length unmarshal and marshal behavior with pre-filled raw data

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update param_forward_tsn_supported.go tp RFC 9260

2 participants