Skip to content

ci(aot): centralize NativeAOT smoke coverage - #11367

Merged
ReubenBond merged 5 commits into
dotnet:mainfrom
ReubenBond:rb-nativeaot-support
Oct 1, 2026
Merged

ReubenBond merged 5 commits into
dotnet:mainfrom
ReubenBond:rb-nativeaot-support

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

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.NativeAotSmoke as the shared executable project. PublishAot is project-local, preserving managed build-time analyzers/source generators. NativeAotSmokeScenario selects 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.json manifest in the shared harness and creates Windows/Linux entries. .github/scripts/run-native-aot-smoke.ps1 is 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-visible rollout 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

Copilot AI balanced review requested due to automatic review settings October 1, 2026 15:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage

Metric Pull request
Lines 82.91% (115,479 / 139,284)
Branches 72.23% (33,522 / 46,407)

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

Copilot AI balanced review requested due to automatic review settings October 1, 2026 16:09
@ReubenBond ReubenBond changed the title test(aot): execute selected dependency injection flows natively test(aot): add reusable native smoke coverage Oct 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The harness, CI integration, shared scenario, and contributor documentation are consistent and complete.

Review effort: Balanced
Findings: None

Copilot AI balanced review requested due to automatic review settings October 1, 2026 17:23
@ReubenBond ReubenBond changed the title test(aot): add reusable native smoke coverage ci(aot): centralize NativeAOT smoke coverage Oct 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The reusable harness is coherent, documented, and successfully exercises the scenario on Windows and Linux.

Review effort: Balanced
Findings: None

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.

2 participants