[WIP] Skip non-public types from ModelReaderWriterContext - #12047
Draft
Jorge Rangel (jorgerangel-msft) with Copilot wants to merge 10 commits into
Draft
Jorge Rangel (jorgerangel-msft) with Copilot wants to merge 10 commits into
Jorge Rangel (jorgerangel-msft) with Copilot wants to merge 10 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 14:53
View session
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
…exts Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Copilot stopped work on behalf of
Jorge Rangel (jorgerangel-msft) due to an error
September 25, 2026 15:13
Jorge Rangel (jorgerangel-msft)
left a comment
Contributor
There was a problem hiding this comment.
Copilot address the feedback I left
Copilot started work on behalf of
Jorge Rangel (jorgerangel-msft)
September 25, 2026 15:22
View session
…t attributes Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
commit: |
Copilot started reviewing on behalf of
Jorge Rangel (jorgerangel-msft)
September 25, 2026 15:43
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The implementation appears coherent, but the PR remains WIP with final build, Cop, and Spector validation incomplete.
Review effort: Balanced
Findings: None
What changed in this PR
Filters non-public C# types from generated ModelReaderWriterContext buildable attributes, including nested and restored contract types.
Changes:
- Adds accessibility checks across declaring-type chains.
- Filters framework, generated, customized, and restored types.
- Adds regression coverage and updates generated contexts.
| File | Description |
|---|---|
_TypePropertyAdditionalPropertiesContext.cs |
Removes internal discriminator types. |
_TypeModelInheritanceSingleDiscriminatorContext.cs |
Removes internal fallback models. |
_TypeModelInheritanceNestedDiscriminatorContext.cs |
Removes internal nested-discriminator models. |
_TypeModelInheritanceEnumDiscriminatorContext.cs |
Removes internal enum-discriminator models. |
SampleTypeSpecContext.cs |
Removes internal paging and fallback models. |
MethodSignatureHelperTests.cs |
Tests type and declaring-type accessibility. |
MethodSignatureHelper.cs |
Adds recursive public-type detection. |
NonPublicTypesAreNotRestoredFromLastContract/SampleContext.cs |
Provides previous-contract test data. |
NonPublicTypesAreNotRestoredFromLastContract(Custom)/Models.cs |
Provides customized accessibility cases. |
BuildableAttributesRespectCustomizedAccessibility/Models.cs |
Tests customized model visibility. |
ModelReaderWriterContextDefinitionTests.cs |
Adds accessibility regression coverage. |
ModelReaderWriterContextDefinition.cs |
Filters inaccessible buildable attribute targets. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Copilot started work on behalf of
Jorge Rangel (jorgerangel-msft)
September 25, 2026 15:49
View session
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Contributor
Author
Copilot started reviewing on behalf of
Jorge Rangel (jorgerangel-msft)
September 25, 2026 16:06
View session
Copilot started work on behalf of
Jorge Rangel (jorgerangel-msft)
September 25, 2026 16:10
View session
…revert last-contract filtering Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Copilot started work on behalf of
Jorge Rangel (jorgerangel-msft)
September 25, 2026 16:43
View session
…ta baselines Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Copilot started work on behalf of
Jorge Rangel (jorgerangel-msft)
September 25, 2026 16:50
View session
…xt attributes Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Copilot started work on behalf of
Jorge Rangel (jorgerangel-msft)
September 25, 2026 16:57
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 17:01
View session
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.

Uh oh!
There was an error while loading. Please reload this page.