Skip to content

refactor(engine): dedupe reflection generic discovery - #7183

Merged
thomhurst merged 1 commit into
mainfrom
fix/issue-7167-dedupe-generic-discovery
Oct 20, 2026
Merged

thomhurst merged 1 commit into
mainfrom
fix/issue-7167-dedupe-generic-discovery

Conversation

@thomhurst

@thomhurst thomhurst commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

Before: ReflectionTestDataCollector had two copies of the generic-class discovery logic: DiscoverGenericTests and DiscoverGenericTestsStreamingAsync. Every fix in this area (#7106, #7107, #7118) had to be made twice, and the copies had already drifted apart (cancellation checks, failure collection, error-message text).

After: one implementation. Behavior does not change.

Cause

DiscoverGenericTestsStreamingAsync was only reachable from CollectTestsStreamingAsync. That method is not part of ITestDataCollector and nothing calls it; it has been unused since the streaming interface member was removed (around #2872). So the "second copy" was dead code that still needed maintaining. The streaming chain also included DiscoverTestsInAssemblyStreamingAsync, DiscoverDynamicTestsStreamingAsync, ExecuteDynamicTestBuilderStreamingAsync and CreateFailedTestMetadataForDynamicTest, which were all unreachable too.

Fix

  • Removed the unreachable streaming discovery chain (about 570 lines).
  • In DiscoverGenericTests, the [GenerateGenericTest] loop and the class-row loop each built tests for one concrete instantiation with nearly identical code. Both now call a new AddTestsForInstantiation helper. The only differences between them were the class row sources and the method-row skip. Those are now parameters, and the skip already does nothing when methodRowTypeArguments is null, which is always the case on the class-row path. Exception handling is unchanged: tests added before a failure are kept, as before.
  • GroupClassRowsByTypeArgumentsAsync lost its CancellationToken parameter, which was only ever passed CancellationToken.None on the live path.

Tests

  • TUnit.Engine.Tests (Reflection mode, net10.0): Issue7106Tests 31/31, Issue7107Tests 28/28, GenericConstraintValidationTests 21/21, GenericMethodWithDataSourceTests 4/4.
  • Discovery equivalence: ran TUnit.TestProject --reflection --list-tests on origin/main and on this branch. The two lists of 18,924 lines are identical once GUIDs and numbers from random data sources are normalized.
  • Discovery perf (the same --list-tests --reflection over the whole TestProject, 10 alternating runs after warmup): median 1649 ms on main vs 1668 ms on this branch, which is within run-to-run noise (each set spans roughly 1450 to 1950 ms). The live path does the same work. The only change on it is one extra static call per instantiation.
  • Source-generated mode is untouched.

Note for open PRs: #7149, #7154 and #7079 also edit this file. Any changes they make to DiscoverGenericTestsStreamingAsync can be dropped when rebasing.

Fixes #7167

Summary by CodeRabbit

  • Bug Fixes
    • Improved reflection-based test discovery for generic classes and methods.
    • Prevented duplicate test cases when type information is inferred from method rows.
    • Improved handling and reporting of invalid generic test instantiations.
    • Ensured dynamically discovered tests are fully resolved before appearing in results.

…e generic instantiation code

DiscoverGenericTestsStreamingAsync and the rest of the CollectTestsStreamingAsync
chain had no callers, so every generic-discovery fix had to be duplicated into
unreachable code. Remove it, and share the per-instantiation test building of the
[GenerateGenericTest] and class-row loops in DiscoverGenericTests.

Fixes #7167
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T05:19:32.429617Z 00c74ed PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d08bd00c-b1e4-4148-9fe1-4236047662e8
📥 Commits

Reviewing files that changed from the base of the PR and between c4b9977 and 00c74ed.

📒 Files selected for processing: 1
  • src/TUnit.Engine/Discovery/ReflectionTestDataCollector.cs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 1 remain after this review.

📝 Walkthrough

Reflection test discovery removes the streaming assembly, generic-test, and dynamic-test paths. Generic instantiation handling now uses a shared helper. Class-row grouping no longer accepts or checks a cancellation token.

Changes: Reflection discovery

Layer / File(s) Summary
Generic instantiation handling
src/TUnit.Engine/Discovery/ReflectionTestDataCollector.cs
Generic test and class-row instantiations use AddTestsForInstantiation. Class-row grouping no longer accepts or checks a cancellation token.
Streaming assembly discovery removal
src/TUnit.Engine/Discovery/ReflectionTestDataCollector.cs
The streaming assembly and generic discovery methods are removed, along with the streaming-specific type-filtering distinction.
Streaming dynamic discovery removal
src/TUnit.Engine/Discovery/ReflectionTestDataCollector.cs
The streaming dynamic discovery and builder methods, and the individual failure metadata factory, are removed.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Refactor

Suggested reviewers: theluckystrike

Merge Risk: ⚪ Minimal · up to 00c74

This refactor removes unused streaming discovery code and merges duplicated generic-instantiation logic without changing how tests are discovered or how failures are reported. No merge-blocking risk was found.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 21.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title accurately identifies the refactor and the deduplication of reflection generic discovery, which is the primary change.
Linked Issues check Passed Issue #7167 is addressed. The diff removes the unused streaming discovery chain and leaves one live reflection path in DiscoverGenericTests. Both [GenerateGenericTest] instantiations and class-row…
Out of Scope Changes check Passed The changes are limited to ReflectionTestDataCollector. They remove the unreachable streaming discovery and dynamic-builder chain, consolidate generic instantiation handling, and remove a parameter …
Full details: Linked Issues check

Explanation

Issue #7167 is addressed. The diff removes the unused streaming discovery chain and leaves one live reflection path in DiscoverGenericTests. Both [GenerateGenericTest] instantiations and class-row instantiations call AddTestsForInstantiation. The helper handles concrete type creation, method-row duplicate skipping, method instantiation, and failed metadata. The reported reflection test results, normalized discovery-list comparison, and before/after hot-path measurements support the stated behavior and performance requirements.

Full details: Out of Scope Changes check

Explanation

The changes are limited to ReflectionTestDataCollector. They remove the unreachable streaming discovery and dynamic-builder chain, consolidate generic instantiation handling, and remove a parameter that only received CancellationToken.None. These changes directly support Issue #7167. No unrelated change is shown.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the test rows twice,
Then folds the stream away from sight.
Generic types now share one path,
Dynamic builders leave the math.
Discovery rests, the burrow’s bright.

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

Removes the unused streaming discovery chain and shares generic test construction through AddTestsForInstantiation.

  • Generic test types now share one path for building their tests.
  • Reflection discovery no longer carries a separate streaming path.

Reviews (1) · Last reviewed commit: "refactor(engine): remove dead streaming ..." · Reviewed by Greptile

@github-actions

Copy link
Copy Markdown
Contributor

Review

This is a clean dedup. I found no blocking issues.

  • Dead code removal: CollectTestsStreamingAsync and its chain no longer appear anywhere in the PR head. No remaining references exist, and it was not part of ITestDataCollector. Removing it means each future generic-discovery fix only needs to be made once.
  • AddTestsForInstantiation: It merges the [GenerateGenericTest] loop and the class-row loop. IsInferredFromMethodRows is a no-op when methodRowTypeArguments is null, so the class-row path behaves as before. Tests added before a throw are kept, as before.
  • Dropped CancellationToken: Only CancellationToken.None was ever passed on the live path, so this changes nothing.
  • Reflection-only change: It touches only the reflection collector. The source-generator path is unaffected, so the dual-mode rule doesn't require changes elsewhere.

Suggestion (optional): The classRowSources: null and methodRowTypeArguments: null arguments at the call sites are easy to misread. Named arguments are already used at one site, so using them at both would be more consistent.

I didn't run the tests myself. The PR description reports Issue7106, Issue7107, constraint and method-datasource suites passing, plus a discovery-equivalence check, which is good evidence.

LGTM.

@thomhurst
thomhurst merged commit 1816939 into main Oct 20, 2026
27 of 29 checks passed
@thomhurst
thomhurst deleted the fix/issue-7167-dedupe-generic-discovery branch October 20, 2026 09:11
github-actions Bot pushed a commit to BenjaminMichaelis/TrxLib that referenced this pull request Oct 26, 2026
Updated [TUnit](https://github.com/thomhurst/TUnit) from 1.75.0 to
1.76.28.

<details>
<summary>Release notes</summary>

_Sourced from [TUnit's
releases](https://github.com/thomhurst/TUnit/releases)._

## 1.76.28

<!-- Release notes generated using configuration in .github/release.yml
at v1.76.28 -->

## What's Changed
### Other Changes
* Remove legacy JSON output implementation by @​Saad-elnagar in
thomhurst/TUnit#7234
* fix(engine): drop row-scoped data sources from failed test metadata by
@​kenny-ish in thomhurst/TUnit#7079
* Merge the analyzer release tables under one New Rules section (RS2007)
by @​bfs2021 in thomhurst/TUnit#7174
* fix: release finished test instances before session end by @​thomhurst
in thomhurst/TUnit#7262
* fix: never hand out a disposed shared data-source instance by
@​thomhurst in thomhurst/TUnit#7248
### Dependencies
* chore(deps): update all non-major dependencies to 1.76.0 by
@​thomhurst in thomhurst/TUnit#7233
* chore(deps): bump follow-redirects from 1.16.0 to 1.16.1 in /docs by
@​dependabot[bot] in thomhurst/TUnit#7232
* chore(deps): bump launch-editor from 2.14.1 to 2.14.2 in /docs by
@​dependabot[bot] in thomhurst/TUnit#7231
* chore(deps): update all non-major dependencies to 1.20.1 by
@​thomhurst in thomhurst/TUnit#7235
* chore(deps): update dependency awssdk.sqs to 4.0.100.20 by @​thomhurst
in thomhurst/TUnit#7236
* chore(deps): update dependency microsoft.playwright to 1.64.0 by
@​thomhurst in thomhurst/TUnit#7237
* chore(deps): update all non-major dependencies by @​thomhurst in
thomhurst/TUnit#7238
* chore(deps): update dependency path-to-regexp to v9 by @​thomhurst in
thomhurst/TUnit#7241
* chore(deps): update all non-major dependencies by @​thomhurst in
thomhurst/TUnit#7242
* chore(deps): update dependency serialize-javascript to v7.1.3 by
@​thomhurst in thomhurst/TUnit#7243
* chore(deps): update dependency imposter to 1.0.4 by @​thomhurst in
thomhurst/TUnit#7244
* chore(deps): update dependency stackexchange.redis to 3.4.20 by
@​thomhurst in thomhurst/TUnit#7245
* chore(deps): update dependency serialize-javascript to v7.1.4 by
@​thomhurst in thomhurst/TUnit#7246
* chore(deps): update dependency imposter to 1.0.5 by @​thomhurst in
thomhurst/TUnit#7247
* chore(deps): update all non-major dependencies to 13.6.4 by
@​thomhurst in thomhurst/TUnit#7251
* chore(deps): update dependency imposter to 1.0.6 by @​thomhurst in
thomhurst/TUnit#7258
* chore(deps): bump fast-uri from 3.1.8 to 3.1.9 in /docs by
@​dependabot[bot] in thomhurst/TUnit#7253
* chore(deps): bump body-parser from 1.20.6 to 1.20.9 in /docs by
@​dependabot[bot] in thomhurst/TUnit#7252

## New Contributors
* @​Saad-elnagar made their first contribution in
thomhurst/TUnit#7234
* @​kenny-ish made their first contribution in
thomhurst/TUnit#7079
* @​bfs2021 made their first contribution in
thomhurst/TUnit#7174

**Full Changelog**:
thomhurst/TUnit@v1.76.0...v1.76.28

## 1.76.0

<!-- Release notes generated using configuration in .github/release.yml
at v1.76.0 -->

## What's Changed
### Other Changes
* chore: add OSS scanner config, threat model and SECURITY.md by
@​thomhurst in thomhurst/TUnit#7080
* fix(deps): patch MessagePack for Aspire and use per-TFM
Microsoft.Extensions.Http by @​Quattordici in
thomhurst/TUnit#7072
* fix: skip tests marked with an empty skip reason by @​thomhurst in
thomhurst/TUnit#7083
* fix(engine): report the engine mode actually selected in the banner by
@​thomhurst in thomhurst/TUnit#7085
* fix(engine): order keyed NotInParallel tests by priority, not hash
code by @​thomhurst in thomhurst/TUnit#7090
* fix: remove root causes of flaky tests and the broken Apple smoke jobs
by @​thomhurst in thomhurst/TUnit#7095
* fix(engine): run synchronous keyed NotInParallel tests concurrently by
@​thomhurst in thomhurst/TUnit#7087
* fix(sourcegen): run every [Arguments] row that infers the same generic
type by @​thomhurst in thomhurst/TUnit#7100
* fix: same filter path and display name for generic tests in both
engine modes by @​thomhurst in
thomhurst/TUnit#7110
* fix(engine): apply max parallelism cap to keyed NotInParallel tests by
@​thomhurst in thomhurst/TUnit#7084
* fix(ci): install only Chromium for Playwright and wait on dpkg lock by
@​thomhurst in thomhurst/TUnit#6994
* fix(core): keep the engine-selected execution mode when late
assemblies load by @​thomhurst in
thomhurst/TUnit#7091
* fix(engine): end fail-fast runs without crashing the test host by
@​thomhurst in thomhurst/TUnit#7115
* test: stop the AOT [EngineTest=Pass] run hitting its 5 minute budget
by @​thomhurst in thomhurst/TUnit#7125
* fix(engine): align reflection-mode data sources and hooks with
source-gen by @​thomhurst in
thomhurst/TUnit#7094
* fix(pipeline): stop skipping the NuGet package tester modules by
@​thomhurst in thomhurst/TUnit#7127
* ci: take AOT publishes and doc snippets off the Ubuntu critical path
by @​thomhurst in thomhurst/TUnit#7128
* fix(analyzers): TUnit0001 false positive for MethodDataSource on
generic type-parameter parameters by @​thomhurst in
thomhurst/TUnit#7109
* fix: report generic class constraint violations as failed tests in
both modes by @​thomhurst in
thomhurst/TUnit#7112
* ci: cut runner contention and the AOT publish off the critical path by
@​thomhurst in thomhurst/TUnit#7131
* fix(assertions): make cross-type IsEqualTo work for numeric and
nullable arguments on C# 12 by @​thomhurst in
thomhurst/TUnit#7086
* fix(engine): substitute class type arguments and array element types
in build-time constraint checks by @​thomhurst in
thomhurst/TUnit#7102
* ci: test the NuGet packages on Windows in their own job by @​thomhurst
in thomhurst/TUnit#7130
* fix(sourcegen): bind params T[] on generic test methods by @​thomhurst
in thomhurst/TUnit#7101
* fix(engine): run every [Arguments] row on generic test classes in both
modes by @​thomhurst in thomhurst/TUnit#7111
* fix(engine): use last inferred type for repeated generic parameters by
@​theluckystrike in thomhurst/TUnit#7134
* Make the test suite pass in every environment and run fully in CI by
@​Quattordici in thomhurst/TUnit#7129
* fix(assertions): skip using directive for global-namespace assertion
types by @​thomhurst in thomhurst/TUnit#7139
* fix(core): format numeric display-name arguments with the invariant
culture by @​thomhurst in thomhurst/TUnit#7138
* fix(engine): dispose data-source objects of rows that end as failed
tests by @​thomhurst in thomhurst/TUnit#7150
* Fix net472 compile gate failure in assertions source generator tests
by @​thomhurst in thomhurst/TUnit#7170
* fix(sourcegen): close generic methods of generic classes on every
class source by @​thomhurst in
thomhurst/TUnit#7152
* fix(engine): infer object for null rows on generic test methods in
reflection mode by @​thomhurst in
thomhurst/TUnit#7142
* fix(engine): report every test once on fail-fast runs by @​thomhurst
in thomhurst/TUnit#7145
* test(engine): stop whole-process budgets killing healthy scheduling
engine tests by @​thomhurst in
thomhurst/TUnit#7177
* feat(analyzers): report MethodDataSource Arguments that fit two
overloads equally (TUnit0076) by @​thomhurst in
thomhurst/TUnit#7181
* fix(sourcegen): render top-level dynamic as object so typeof compiles
by @​thomhurst in thomhurst/TUnit#7182
* fix(sourcegen): pair each GenerateGenericTest type only with its typed
ClassDataSource<T> by @​thomhurst in
thomhurst/TUnit#7188
* fix(engine): run untyped [Arguments(null)] rows on generic classes
instead of dropping them by @​thomhurst in
thomhurst/TUnit#7203
* fix(engine): report generic test classes by their generic type
definition in TRX by @​thomhurst in
thomhurst/TUnit#7200
* test(sourcegen): parse snapshot fixtures as a real build does by
@​thomhurst in thomhurst/TUnit#7189
* refactor(engine): dedupe reflection generic discovery by @​thomhurst
in thomhurst/TUnit#7183
* test: make TimeoutHelperTests deterministic under thread-pool load by
@​thomhurst in thomhurst/TUnit#7180
* fix(analyzers): accept null MethodDataSource arguments for nullable
parameters by @​thomhurst in
thomhurst/TUnit#7179
* test(assertions): make WaitsFor cancellation tests robust to slow CI
runners by @​thomhurst in thomhurst/TUnit#7176
* fix(assertions): support [AssertionFrom] with unbound generic types by
@​thomhurst in thomhurst/TUnit#7144
 ... (truncated)

Commits viewable in [compare
view](thomhurst/TUnit@v1.75.0...v1.76.28).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=TUnit&package-manager=nuget&previous-version=1.75.0&new-version=1.76.28)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
github-actions Bot pushed a commit to IntelliTect/CodingGuidelines that referenced this pull request Oct 26, 2026
Updated [TUnit.Core](https://github.com/thomhurst/TUnit) from 1.75.0 to
1.76.28.

<details>
<summary>Release notes</summary>

_Sourced from [TUnit.Core's
releases](https://github.com/thomhurst/TUnit/releases)._

## 1.76.28

<!-- Release notes generated using configuration in .github/release.yml
at v1.76.28 -->

## What's Changed
### Other Changes
* Remove legacy JSON output implementation by @​Saad-elnagar in
thomhurst/TUnit#7234
* fix(engine): drop row-scoped data sources from failed test metadata by
@​kenny-ish in thomhurst/TUnit#7079
* Merge the analyzer release tables under one New Rules section (RS2007)
by @​bfs2021 in thomhurst/TUnit#7174
* fix: release finished test instances before session end by @​thomhurst
in thomhurst/TUnit#7262
* fix: never hand out a disposed shared data-source instance by
@​thomhurst in thomhurst/TUnit#7248
### Dependencies
* chore(deps): update all non-major dependencies to 1.76.0 by
@​thomhurst in thomhurst/TUnit#7233
* chore(deps): bump follow-redirects from 1.16.0 to 1.16.1 in /docs by
@​dependabot[bot] in thomhurst/TUnit#7232
* chore(deps): bump launch-editor from 2.14.1 to 2.14.2 in /docs by
@​dependabot[bot] in thomhurst/TUnit#7231
* chore(deps): update all non-major dependencies to 1.20.1 by
@​thomhurst in thomhurst/TUnit#7235
* chore(deps): update dependency awssdk.sqs to 4.0.100.20 by @​thomhurst
in thomhurst/TUnit#7236
* chore(deps): update dependency microsoft.playwright to 1.64.0 by
@​thomhurst in thomhurst/TUnit#7237
* chore(deps): update all non-major dependencies by @​thomhurst in
thomhurst/TUnit#7238
* chore(deps): update dependency path-to-regexp to v9 by @​thomhurst in
thomhurst/TUnit#7241
* chore(deps): update all non-major dependencies by @​thomhurst in
thomhurst/TUnit#7242
* chore(deps): update dependency serialize-javascript to v7.1.3 by
@​thomhurst in thomhurst/TUnit#7243
* chore(deps): update dependency imposter to 1.0.4 by @​thomhurst in
thomhurst/TUnit#7244
* chore(deps): update dependency stackexchange.redis to 3.4.20 by
@​thomhurst in thomhurst/TUnit#7245
* chore(deps): update dependency serialize-javascript to v7.1.4 by
@​thomhurst in thomhurst/TUnit#7246
* chore(deps): update dependency imposter to 1.0.5 by @​thomhurst in
thomhurst/TUnit#7247
* chore(deps): update all non-major dependencies to 13.6.4 by
@​thomhurst in thomhurst/TUnit#7251
* chore(deps): update dependency imposter to 1.0.6 by @​thomhurst in
thomhurst/TUnit#7258
* chore(deps): bump fast-uri from 3.1.8 to 3.1.9 in /docs by
@​dependabot[bot] in thomhurst/TUnit#7253
* chore(deps): bump body-parser from 1.20.6 to 1.20.9 in /docs by
@​dependabot[bot] in thomhurst/TUnit#7252

## New Contributors
* @​Saad-elnagar made their first contribution in
thomhurst/TUnit#7234
* @​kenny-ish made their first contribution in
thomhurst/TUnit#7079
* @​bfs2021 made their first contribution in
thomhurst/TUnit#7174

**Full Changelog**:
thomhurst/TUnit@v1.76.0...v1.76.28

## 1.76.0

<!-- Release notes generated using configuration in .github/release.yml
at v1.76.0 -->

## What's Changed
### Other Changes
* chore: add OSS scanner config, threat model and SECURITY.md by
@​thomhurst in thomhurst/TUnit#7080
* fix(deps): patch MessagePack for Aspire and use per-TFM
Microsoft.Extensions.Http by @​Quattordici in
thomhurst/TUnit#7072
* fix: skip tests marked with an empty skip reason by @​thomhurst in
thomhurst/TUnit#7083
* fix(engine): report the engine mode actually selected in the banner by
@​thomhurst in thomhurst/TUnit#7085
* fix(engine): order keyed NotInParallel tests by priority, not hash
code by @​thomhurst in thomhurst/TUnit#7090
* fix: remove root causes of flaky tests and the broken Apple smoke jobs
by @​thomhurst in thomhurst/TUnit#7095
* fix(engine): run synchronous keyed NotInParallel tests concurrently by
@​thomhurst in thomhurst/TUnit#7087
* fix(sourcegen): run every [Arguments] row that infers the same generic
type by @​thomhurst in thomhurst/TUnit#7100
* fix: same filter path and display name for generic tests in both
engine modes by @​thomhurst in
thomhurst/TUnit#7110
* fix(engine): apply max parallelism cap to keyed NotInParallel tests by
@​thomhurst in thomhurst/TUnit#7084
* fix(ci): install only Chromium for Playwright and wait on dpkg lock by
@​thomhurst in thomhurst/TUnit#6994
* fix(core): keep the engine-selected execution mode when late
assemblies load by @​thomhurst in
thomhurst/TUnit#7091
* fix(engine): end fail-fast runs without crashing the test host by
@​thomhurst in thomhurst/TUnit#7115
* test: stop the AOT [EngineTest=Pass] run hitting its 5 minute budget
by @​thomhurst in thomhurst/TUnit#7125
* fix(engine): align reflection-mode data sources and hooks with
source-gen by @​thomhurst in
thomhurst/TUnit#7094
* fix(pipeline): stop skipping the NuGet package tester modules by
@​thomhurst in thomhurst/TUnit#7127
* ci: take AOT publishes and doc snippets off the Ubuntu critical path
by @​thomhurst in thomhurst/TUnit#7128
* fix(analyzers): TUnit0001 false positive for MethodDataSource on
generic type-parameter parameters by @​thomhurst in
thomhurst/TUnit#7109
* fix: report generic class constraint violations as failed tests in
both modes by @​thomhurst in
thomhurst/TUnit#7112
* ci: cut runner contention and the AOT publish off the critical path by
@​thomhurst in thomhurst/TUnit#7131
* fix(assertions): make cross-type IsEqualTo work for numeric and
nullable arguments on C# 12 by @​thomhurst in
thomhurst/TUnit#7086
* fix(engine): substitute class type arguments and array element types
in build-time constraint checks by @​thomhurst in
thomhurst/TUnit#7102
* ci: test the NuGet packages on Windows in their own job by @​thomhurst
in thomhurst/TUnit#7130
* fix(sourcegen): bind params T[] on generic test methods by @​thomhurst
in thomhurst/TUnit#7101
* fix(engine): run every [Arguments] row on generic test classes in both
modes by @​thomhurst in thomhurst/TUnit#7111
* fix(engine): use last inferred type for repeated generic parameters by
@​theluckystrike in thomhurst/TUnit#7134
* Make the test suite pass in every environment and run fully in CI by
@​Quattordici in thomhurst/TUnit#7129
* fix(assertions): skip using directive for global-namespace assertion
types by @​thomhurst in thomhurst/TUnit#7139
* fix(core): format numeric display-name arguments with the invariant
culture by @​thomhurst in thomhurst/TUnit#7138
* fix(engine): dispose data-source objects of rows that end as failed
tests by @​thomhurst in thomhurst/TUnit#7150
* Fix net472 compile gate failure in assertions source generator tests
by @​thomhurst in thomhurst/TUnit#7170
* fix(sourcegen): close generic methods of generic classes on every
class source by @​thomhurst in
thomhurst/TUnit#7152
* fix(engine): infer object for null rows on generic test methods in
reflection mode by @​thomhurst in
thomhurst/TUnit#7142
* fix(engine): report every test once on fail-fast runs by @​thomhurst
in thomhurst/TUnit#7145
* test(engine): stop whole-process budgets killing healthy scheduling
engine tests by @​thomhurst in
thomhurst/TUnit#7177
* feat(analyzers): report MethodDataSource Arguments that fit two
overloads equally (TUnit0076) by @​thomhurst in
thomhurst/TUnit#7181
* fix(sourcegen): render top-level dynamic as object so typeof compiles
by @​thomhurst in thomhurst/TUnit#7182
* fix(sourcegen): pair each GenerateGenericTest type only with its typed
ClassDataSource<T> by @​thomhurst in
thomhurst/TUnit#7188
* fix(engine): run untyped [Arguments(null)] rows on generic classes
instead of dropping them by @​thomhurst in
thomhurst/TUnit#7203
* fix(engine): report generic test classes by their generic type
definition in TRX by @​thomhurst in
thomhurst/TUnit#7200
* test(sourcegen): parse snapshot fixtures as a real build does by
@​thomhurst in thomhurst/TUnit#7189
* refactor(engine): dedupe reflection generic discovery by @​thomhurst
in thomhurst/TUnit#7183
* test: make TimeoutHelperTests deterministic under thread-pool load by
@​thomhurst in thomhurst/TUnit#7180
* fix(analyzers): accept null MethodDataSource arguments for nullable
parameters by @​thomhurst in
thomhurst/TUnit#7179
* test(assertions): make WaitsFor cancellation tests robust to slow CI
runners by @​thomhurst in thomhurst/TUnit#7176
* fix(assertions): support [AssertionFrom] with unbound generic types by
@​thomhurst in thomhurst/TUnit#7144
 ... (truncated)

Commits viewable in [compare
view](thomhurst/TUnit@v1.75.0...v1.76.28).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=TUnit.Core&package-manager=nuget&previous-version=1.75.0&new-version=1.76.28)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

This branch was successfully deployed

No deployments
Pull Requests — 00c74ed4 Deployed Oct 20, 2026 by thomhurst via modularpipeline (macos-latest) #20283
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.

Reflection discovery: DiscoverGenericTests and DiscoverGenericTestsStreamingAsync duplicate the generic-class logic

1 participant