[API] Handle empty tracestate value - #7756
Merged
Merged
Conversation
Avoid an internal `IndexOutOfRangeException` if a `tracestate` value was empty once trimmed.
Remove Debug.Assert() and instead just return false if it were null.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7756 +/- ##
==========================================
+ Coverage 91.85% 91.86% +0.01%
==========================================
Files 337 337
Lines 18399 18399
==========================================
+ Hits 16901 16903 +2
+ Misses 1498 1496 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
martincostello
commented
Sep 15, 2026
martincostello
commented
Sep 15, 2026
Add PR number and fix typo.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The fix is correct and adequately tested; the remaining feedback is cosmetic.
Pull request overview
Prevents empty trimmed tracestate values from causing internal exceptions.
Changes:
- Rejects empty values safely and clears partial results.
- Adds regression coverage for whitespace-only values.
- Documents the fix.
File summaries
| File | Description |
|---|---|
TraceStateUtils.cs |
Safely validates empty values. |
TracestateUtilsTests.cs |
Adds regression cases. |
CHANGELOG.md |
Records the behavioral fix. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
martincostello
commented
Sep 15, 2026
Fix typo in CHANGELOG entry.
martincostello
marked this pull request as ready for review
September 15, 2026 16:43
martincostello
enabled auto-merge
September 15, 2026 16:43
rajkumar-rangaraj
approved these changes
Sep 15, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to no response for status checks
Sep 15, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to no response for status checks
Sep 15, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Sep 15, 2026
Kielek
approved these changes
Sep 16, 2026
This was referenced Sep 18, 2026
This was referenced Sep 19, 2026
Open
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.
Found by Claude Code scan of the repository.
Changes
Avoid an internal
IndexOutOfRangeExceptionif atracestatevalue was empty once trimmed.Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changesChanges in public API reviewed (if applicable)