Skip to content

Align runner lifecycle cancellation and prove lifecycle behavior across adapters - #95

Merged
woksin merged 2 commits into
mainfrom
specifications-77-lifecycle-proof
Oct 25, 2026
Merged

woksin merged 2 commits into
mainfrom
specifications-77-lifecycle-proof

Conversation

@woksin

@woksin woksin commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Changed

Fixed

  • The experimental native runner now reports a cancelled Establish, Because or Destroy the same way whether the specification uses generated or reflection-based lifecycle calls. Both raise SpecificationCancelledException with the phase and the original exception. (part of Graduate the native runner from experimental #77)

Generated lifecycle calls now wrap cancellation the same way as the
reflection path. CI runs twelve shared lifecycle cases through every
adapter and a Microsoft.Testing.Platform server-session stop with
concurrent classes, asserting cleanup runs once per started class.
@woksin woksin added the patch label Oct 25, 2026
@woksin woksin self-assigned this Oct 25, 2026
@woksin

woksin commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Reviewer notes

  • Closes the evidence gaps an independent review found on Graduate the native runner from experimental #77: a lifecycle cancellation mismatch between generated and reflection code (reproduced sync and async before the fix), no shared lifecycle matrix across adapters, and no real platform-level Stop coverage.
  • CI gains two steps in build.yml. Twelve shared setup, act, teardown and cancellation cases run through real xUnit v2/v3, NUnit 4/5, TUnit and runner consumers; verify.mjs asserts 148 terminal results, including the documented framework teardown-reporting differences. stop.mjs drives a real MTP server-session $/cancelRequest with two concurrent classes. The build workflow's path filter now includes Integration/Lifecycle/**.
  • The runner stays experimental. Graduate the native runner from experimental #77 stays open for graduation after Fundamentals NativeAOT (AddTypeDiscovery throws PlatformNotSupportedException under NativeAOT Fundamentals#1217).
  • Local: Release build 0 warnings/0 errors; nine non-integration suites, 1,009 specs passed; actionlint ok. The full trimmed/AOT CI matrix was not rerun locally.
  • Review: full round 1 passed (Opus and Sol), no blocking findings. I applied the path-filter advisory; the other advisory (verify.mjs counts only some phases for teardown-once) is left as is.

@woksin
woksin merged commit 991a749 into main Oct 25, 2026
4 of 5 checks passed
@woksin
woksin deleted the specifications-77-lifecycle-proof branch October 25, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant