Repository navigation
.NET: Expand coverage for Microsoft.Agents.AI.Hosting.OpenAI - #10589
Merged
Merged
Conversation
…t validation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Vincent Biret (baywet)
temporarily deployed
to
integration
December 3, 2026 15:15 — with
GitHub Actions
Inactive
Vincent Biret (baywet)
temporarily deployed
to
integration
December 3, 2026 15:15 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The regression-test changes have no active review issues.
No open issues 🎉
What changed in this PR
Expands regression coverage for .NET OpenAI hosting wire contracts without changing production code or samples.
Changes:
- Tests image and audio normalization while preserving URLs and bytes.
- Verifies zero-token usage output, tool declaration mapping, and invalid response formats.
- Covers conversation reference normalization and invalid shapes.
| File | Description |
|---|---|
| dotnet/tests/Microsoft.Agents.AI.Hosting.OpenAI.UnitTests/OpenAIResponsesSerializationTests.cs | Tests conversation reference round trips and array rejection. |
| dotnet/tests/Microsoft.Agents.AI.Hosting.OpenAI.UnitTests/OpenAIChatCompletionsSerializationTests.cs | Tests media normalization, default usage, tool mapping, and response-format validation. |
Review effort: Balanced
Contributor
Code coverage overviewLanguages: C# C# / code-coverage/dotnet
View coverage of the 10 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. |
Vincent Biret (baywet)
marked this pull request as ready for review
December 3, 2026 17:04
Vincent Biret (baywet)
enabled auto-merge
December 3, 2026 17:05
SergeyMenshykh
approved these changes
Dec 3, 2026
This branch was previously deployed
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.
Motivation & Context
Protect the Chat Completions and Responses wire contracts for defaults, multipart message content, tools, and conversation references.
Description & Review Guide
Validated from the
dotnetdirectory withGITHUB_ACTIONS=truefor the test run ($rootis the worktree and$destis the results directory):dotnet test --project tests\Microsoft.Agents.AI.Hosting.OpenAI.UnitTests\Microsoft.Agents.AI.Hosting.OpenAI.UnitTests.csproj -f net11.0 -c Release --no-restore -p:CopilotSkipCliDownload=true --coverage --coverage-output-format cobertura --coverage-settings "$root\dotnet\tests\coverage.runsettings" --results-directory $dest— passed: 687 passed, 1 skipped, 0 failed.dotnet format tests\Microsoft.Agents.AI.Hosting.OpenAI.UnitTests\Microsoft.Agents.AI.Hosting.OpenAI.UnitTests.csproj --no-restore --verify-no-changes --severity warn --include tests\Microsoft.Agents.AI.Hosting.OpenAI.UnitTests\OpenAIChatCompletionsSerializationTests.cs tests\Microsoft.Agents.AI.Hosting.OpenAI.UnitTests\OpenAIResponsesSerializationTests.cs— passed.Related Issue
N/A - trivial change. This adds regression assertions for existing behavior without changing the product contract.
AI Assistance
AI assistance details: Copilot identified coverage gaps, wrote the tests, helped validate them, and prepared this description. The human contributor review and attestation remain pending.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.