Repository navigation
test(aot): smoke-check every public member under Native AOT, and guard it - #392
Merged
Merged
Conversation
…d it The AotSmoke app called each public method once, mostly on the happy path. It now runs 46 checks, each naming the PublicAPI member it covers: - both value-type and reference-type (plus a user-defined struct) instantiations of every generic member, since AOT compiles value-type generics separately; - the exception paths: argument guards, failures, a pre-canceled token on both RunAsync overloads, Value on a failed Result<T>; - the whitespace-message fallback, which reads ex.GetType().Name, the one place the library touches type metadata; - the protected Result(bool, string?) constructor, through a subclass; - the combinators' empty, null, false and multi-failure paths. AotSmokeCoverageTests (unit suite, net8.0+) reads every PublicAPI.*.txt, derives the member keys, and fails naming any member with no Check in the smoke app, so new public API cannot ship without an AOT smoke check. String parsing rather than [GeneratedRegex]: generated code would count against the 100% test-assembly coverage gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 27, 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
The Native AOT smoke app (
tests/Wolfgang.TryPattern.AotSmoke, run byaot-smoke.yamlon linux-x64) called each public method once, mostly on the success path. It now runs 46 checks, each naming the PublicAPI member it covers (Check("Result.Flatten", …)). Failures are listed by member.What's now covered under AOT that wasn't:
Run<T>,RunAsync<T>,Result<T>.*), including a user-definedrecord structRun<T>only ran withintandRunAsync<T>only withstring.RunAsyncoverloads,Valueon a failedResult<T>ErrorMessagebecomes the exception type name)ex.GetType().Name, the one place the library touches type metadata.Result(bool, string?)constructor, through a subclassFlattenjoining its messagesDrift guard: the new
AotSmokeCoverageTests(unit suite, net8.0+) reads everysrc/Wolfgang.TryPattern/**/PublicAPI.*.txt, derives the member keys, and fails naming any public member with noCheckin the smoke app. So a new public method can't ship without an AOT smoke check. It uses plain string parsing rather than[GeneratedRegex]: the generated code counted against the 100% test-assembly coverage gate (it measured 94.3% with regexes).Verification
OK: 46 AOT smoke checks passed.IL2xxx/IL3xxxwarnings, but linking needs the C++ build tools, which aren't installed here. The native build and run are verified byaot-smoke.yamlon this PR (linux-x64); its path filter includestests/Wolfgang.TryPattern.AotSmoke/**."Try.RunAsync<T>"check renamed it fails withActual: ["Try.RunAsync<T>"]; with"Result.AnyFailed"renamed it fails with["Result.AnyFailed"].Wolfgang.TryPattern.Tests.Unitis at 100% line coverage on the merged frameworks.ConcurrencyStressTestsones fixed by test(concurrency): clear the seven InspectCode alerts in ConcurrencyStressTests #391.This is test-only, with nothing in
src/, so no changelog fragment.🤖 Generated with Claude Code