ci(aot): centralize NativeAOT smoke coverage - #11367
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The changes are focused, documented, and both new smoke-test matrix jobs pass successfully.
Review effort: Balanced
Findings: None
What changed in this PR
Extends the dependency-injection smoke test to validate selected constructor flows under NativeAOT and trimming.
Changes:
- Adds NativeAOT configuration and runtime verification.
- Runs both modes in CI and retains publish diagnostics.
- Documents local NativeAOT execution.
| File | Description |
|---|---|
Program.cs |
Verifies dynamic code is unavailable in NativeAOT. |
Orleans.DependencyInjection.TrimmedSmoke.csproj |
Enables NativeAOT through NativeAotSmoke. |
CONTRIBUTING.md |
Documents the native smoke workflow. |
.github/workflows/analyzer-audit.yml |
Adds the trimmed/NativeAOT CI matrix and binlogs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Code coverage
Report-only conclusion: current-main baseline stale. The newest successful coverage run tested 6bf11ad, not current main 3d84841. Coverage combines every CI test matrix job, including providers, CodeGen, .NET 8/10, Linux, Windows, and macOS, using canonical physical source and branch identities. The comparison remains report-only while normal line and branch variance is calibrated. Coverage details |
Problem
NativeAOT support needs native publish-and-execute coverage and precise diagnostic gates. A single reusable harness and centralized pipeline keep those checks consistent as independent feature PRs add scenarios.
Solution
Add
test/Orleans.NativeAotSmokeas the shared executable project.PublishAotis project-local, preserving managed build-time analyzers/source generators.NativeAotSmokeScenarioselects scenario source files, and a common entry check verifies runtime code generation is disabled. The default dependency-injection scenario shares the existing trimmed smoke's source and exercises keyed placement registrations, constructor dependency identity, and lifecycle-driven startup task activation.The existing static-analysis workflow hosts one native smoke matrix. Discovery reads every
*.smoke.jsonmanifest in the shared harness and creates Windows/Linux entries..github/scripts/run-native-aot-smoke.ps1is the common runner for publishing, diagnostic validation, and native execution, retaining a publish binlog and publish/runtime logs.Manifests declare strict warning-as-error coverage or a bounded
legacy-visiblerollout with mandatory supported-path rejection patterns. Detailed linker diagnostics remain visible. Invalid manifests, publish failures, new-path diagnostic violations, and execution failures fail the pipeline. Existing self-contained trimmed jobs retain their coverage.Feature PRs contribute scenario sources and policy manifests; all new native CI discovery, execution, and workflow configuration live in this infrastructure PR. Contributor guidance covers local execution and adding a scenario.
Scope
This PR covers shared native infrastructure and selected DI constructor flows. Private C# field access, default activation, metadata preservation, production grain references, serialization constructors, explicit closed-type contexts, and RPC response factories are independent support fixes which reuse the centralized pipeline.
Microsoft Reviewers: Open in CodeFlow