Skip to content

Comments

System.Text.Json: transitive [JsonDerivedType] resolution + cross-assembly boundary semantics#124506

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/implement-json-polymorphism-feature
Draft

System.Text.Json: transitive [JsonDerivedType] resolution + cross-assembly boundary semantics#124506
Copilot wants to merge 4 commits intomainfrom
copilot/implement-json-polymorphism-feature

Conversation

Copy link
Contributor

Copilot AI commented Feb 17, 2026

  • Identify actionable new PR comments directed at @copilot.
  • Run required CI/workflow log checks for any mentioned build/CI context.
  • Execute a code review of the current PR changes using Opus 4.6 as requested.
  • Post the review analysis/results in a reply to the PR comment.
  • Verify no repository code changes are needed for this request.

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Copilot AI and others added 3 commits February 17, 2026 11:54
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Copilot AI changed the title [WIP] Add JSON polymorphism feature as discussed in #7245 System.Text.Json: transitive [JsonDerivedType] resolution + cross-assembly boundary semantics Feb 17, 2026
Copilot AI requested a review from stephentoub February 17, 2026 12:04
@stephentoub
Copy link
Member

@copilot invoke the code-review skill on opus 4.6 and post the analysis/results as a comment on this pr

Copy link
Contributor Author

Copilot AI commented Feb 17, 2026

@copilot invoke the code-review skill on opus 4.6 and post the analysis/results as a comment on this pr

I invoked the code-review skill and attempted to run it on Opus 4.6, but this environment rejected that model as unsupported. I then ran the same review with the available model and here are the results for commit f8b5adf2:

🤖 Copilot Code Review — PR #124506

Holistic Assessment

  • Motivation: The gap is real: direct-only [JsonDerivedType] discovery can miss valid leaf types in multi-hop/cross-assembly hierarchies.
  • Approach: Centralizing transitive discovery in JsonPolymorphismOptions.CreateFromAttributeDeclarations is the right place and keeps reflection/source-gen behavior aligned.
  • Summary: ⚠️ Needs Human Review (no clear blocker found, but one semantic edge case should be explicitly decided/tested).

Detailed Findings

  • ✅ Transitive resolution is implemented at the correct metadata boundary and shared by reflection/source-gen paths.
  • [JsonPolymorphic] boundary-stop behavior is explicit in code and covered by runtime + cross-assembly tests.
  • ⚠️ Potential semantic gap: when the same transitive type is discovered via different paths with different discriminators, current dedup is type-based and silently first-wins. Recommend explicit test and maintainer decision on expected behavior.
  • 💡 Coverage is strong overall; missing high-value test is the conflicting-transitive-discriminator case.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh gh pr view 124506 --repo dotnet/runtime --json number,title,body,author,labels,reviewRequests,reviews,comments,commits (http block)

If you need me to access, download, or install something from one of these locations, you can either:

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

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants