Repository navigation
feat(runtime)!: make generated UnsafeBlit ABI validation structural for 3.0 - #799
Merged
Merged
Conversation
Remove the arbitrary unmanaged reflection fallback for 3.0, per maintainer decision. Generated codecs validate explicit ABI requirements; standalone unregistered unmanaged types fail closed. Add ProjectReference partial trimming coverage and preserve mobile linker policy. Refs #762
SunSi12138
marked this pull request as ready for review
October 10, 2026 15:02
4 of 13 tasks
SunSi12138
added a commit
that referenced
this pull request
Oct 11, 2026
…dalone resolver and refine API retirement decisions
This was referenced Oct 11, 2026
This was referenced Oct 11, 2026
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.
Summary
Implements #762's structural generated UnsafeBlit path for 3.0.
Explicit 3.0 decision / migration
The maintainer explicitly chose to delete the unmanaged reflection fallback entirely and not ship an optional reflection package. This supersedes the original issue's request to preserve automatic untrimmed-JIT fallback. Unregistered arbitrary unmanaged types now fail in JIT too.
Standalone SharpLinkRuntimeContextBuilder.AddCodec / UseCodecResolver remain unchanged. They are not client/server AddCodec APIs and do not override generated RPC owner policy; generated custom encoding still uses compile-time RpcCodec/Adapter binding. See migration and ADR.
Package version is 3.0.0. Generated API increments once from published v2.0.3/API4 to API5, with exact identity
sharplink-3.0-api5-owner-bound-unsafe-blit-v1. The release calibration uses the actual published v2.0.3 commit and retains the original increment/unchanged guard policy. Different API5 development identities are rejected; this does not include #754's independent method-shape work. The new 3.0 public API baseline changes only Abstractions; seven other package surfaces are unchanged.Owner-provenance correction
The reviewed public-capability bypass is fixed: raw codec creation requires the exact admitted factory instance, snapshotted target Type and ABI, and receiving owner's active scope. Contract bindings shadow global bindings. The guard performs no factory callback, dependency lookup or fallback.
Generated raw factories are registered directly because they already carry the finalized CodecHash; an identity-only decorator must not replace the admitted instance. A compiled real-manifest regression checks the emitted identity hash and codec roundtrip through global and owner resolution, in addition to unregistered-type, forged-ABI, wrong-Type, cross-owner/generation, scope, mutation and disposal regressions. Independent source review found no remaining blocker.
Exact-head validation
Source head:
7027f8fbd6ffa30e10c27ac0c501ff22f7083144.Earlier failed runs were fixed without lowering gates. The previous-head arm64 verification timeout is superseded by this head's completed arm64 pass. Local sandbox IPC restrictions prevented full local transport/trim/format runs; hosted evidence above covers those checks. No global Runtime trimmability or trim suppression was added.
Review and integration
All listed gates passed on this source head. Simulator/emulator results are not physical-device coverage.
Before combining #754 and #762 into 3.0, coordinate one generated identity, generator contract and reviewed public API baseline; shared API5 numbering alone is not compatibility. This PR is ready for review. No merge or release is requested.