Skip to content

fix(dotnet): harden Native AOT serialization - #416

Merged
Connor Peet (connor4312) merged 1 commit into
mainfrom
davidfowl-harden-dotnet-native-aot
Aug 24, 2026
Merged

fix(dotnet): harden Native AOT serialization#416
Connor Peet (connor4312) merged 1 commit into
mainfrom
davidfowl-harden-dotnet-native-aot

Conversation

@davidfowl

Copy link
Copy Markdown
Collaborator

Summary

  • preserve canonical AHP camel-case and null-emission wire settings when callers compose custom System.Text.Json metadata resolvers
  • serialize erased inbound handler results through runtime source-generated metadata, including reflection-disabled typed, raw, and null responses
  • exercise initialize, reconnect replay, subscriptions, reducers, generic traffic, and inbound requests in a deterministic Native AOT executable built from the packed NuGet packages
  • make CI pack before Native AOT validation and restore the consumer from an isolated local package cache

Validation

  • Release builds for net8.0 and netstandard2.0: 0 warnings, 0 errors
  • full .NET suite: 525 passed
  • dotnet format whitespace --verify-no-changes --no-restore
  • npm run verify:generated
  • npm run verify:change-fragments
  • npm test
  • dotnet pack for both .NET packages, with package layout and assembly metadata inspection
  • reflection-disabled win-x64 Native AOT publish and executable run from project references
  • reflection-disabled win-x64 Native AOT publish and executable run from a fresh-cache restore of the locally packed packages

Relationship to #414

This follow-up is intentionally complementary to #414. It does not change generators, generated discriminant initializers, or #414's tests/changelog, and it has no merge dependency on #414. If #414 merges first, the branches should remain non-overlapping.

Preserve canonical AHP wire settings with custom metadata resolvers and serialize erased inbound handler results using runtime metadata. Expand reflection-disabled Native AOT coverage across packed-package protocol flows.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@connor4312
Connor Peet (connor4312) merged commit b24e5a2 into main Aug 24, 2026
9 checks passed
@connor4312
Connor Peet (connor4312) deleted the davidfowl-harden-dotnet-native-aot branch August 24, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants