[http-client-csharp] Preserve error response names and isolate generic keep registrations - #12049
Draft
Jorge Rangel (jorgerangel-msft) with Copilot wants to merge 3 commits into
Draft
Jorge Rangel (jorgerangel-msft) with Copilot wants to merge 3 commits into
Jorge Rangel (jorgerangel-msft) with Copilot wants to merge 3 commits into
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Copilot started work on behalf of
Jorge Rangel (jorgerangel-msft)
September 25, 2026 20:59
View session
…neric keep keys Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
commit: |
Copilot
AI
changed the title
[WIP] Fix error response model names and resolve keep-key collision
[http-client-csharp] Preserve error response names and isolate generic keep registrations
Sep 25, 2026
Copilot started work on behalf of
Jorge Rangel (jorgerangel-msft)
September 25, 2026 21:20
View session
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Copilot started reviewing on behalf of
Jorge Rangel (jorgerangel-msft)
September 25, 2026 21:25
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation addresses both linked root causes with comprehensive regression coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes error-model renaming and generic keep-key collisions in the C# client generator.
Changes:
- Preserves
Responsesuffixes for error models. - Uses generic-arity-aware keep identities.
- Adds naming, pruning, visibility, factory, context, and arity regression tests.
| File | Description |
|---|---|
ModelProvider.cs |
Exempts error models from suffix normalization. |
CodeModelGenerator.cs |
Materializes arity-aware keep keys. |
ProviderReferenceMapAnalyzer.BodyReferences.cs |
Shares provider identity generation. |
ModelProviderTests.cs |
Tests error naming and customization. |
ProviderReferenceMapAnalyzerTests.cs |
Tests generic arity isolation. |
ClientBodyDependencyReferenceMapTests.cs |
Tests end-to-end pruning and helper isolation. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been 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.
Automatic
Response→Resultnormalization renamed error contracts and exposed a keep-key collision: preserving the internalErrorResult<T>helper also retained unrelated non-genericErrorResultmodels, introducing unintended public API.ErrorResultandErrorResult1` distinct while preserving lazy registration.