Skip to content

Add Runner.RunDiscoveredAsync; port describe-only tests as written - #2489

Merged
kblok merged 5 commits into
mainfrom
fix/2422-run-discovered
Nov 29, 2026
Merged

kblok merged 5 commits into
mainfrom
fix/2422-run-discovered

Conversation

@kblok

@kblok kblok commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Closes #2422

What

The describe-only tests (NUnit, xUnit v3, TUnit) checked only discovery and HostTestFilters.ExcludeAsync, under a Partial_ name, because the port had no function that runs discovered tests and reports them as upstream's runProject does. This adds Runner.RunDiscoveredAsync, which applies the host's selection, reports each kept test as passed (with its title path) and the left-out ones as skipped, and turns ONLY_IN_CI into exit code 2 with the error in run.errors. The two tests now assert what upstream's its assert (passed title paths, exit code 0 / 2, ONLY_IN_CI in run.errors, no passed result), and the Partial_ prefix is gone.

Upstream parity

Verdict: faithful for what the port can run. RunDiscoveredAsync is .NET-only (the host's framework runs each test, so a body delegate stands in); it sits in Runner, upstream's run/runner.ts owner. No other src/ symbols added. Upstream's describe names are the fixture class names here, so title paths read CheckoutFixture > Refunds > Refunds_a_card.

Upstream tests → local

  • describe-only.test.ts › "runs the focused groups and a test.only beside them, and nothing else" → DescribeOnlyTests.Runs_the_focused_groups_and_a_test_only_beside_them_and_nothing_else (x3 hosts)
  • "is refused in CI with ONLY_IN_CI" → DescribeOnlyTests.Is_refused_in_CI_with_ONLY_IN_CI (x3 hosts)

.NET-only symbol

Runner.RunDiscoveredAsync: upstream's run collects and runs files; a .NET host's framework runs the tests, so a body delegate (here invoking the fixture's method) stands in. Selection uses no filters, changed-since or last-failed (those have their own tests).

.NET-only symbol (2)

RunOutcome.Document: the report's report.json document, so a test can validate the schema (a typed Report does not round-trip to the wire).

Not ported

Nothing. The tests call ReportSchema.AssertValidReport on the run's report document (as upstream's assertValidReport), check the passed titles in order, and also assert the skipped, unselected results with the not focused by .only reason.

Local: three host test projects pass on net10.0. No agent change, so no real-model run.

https://claude.ai/code/session_01Ls2e237XAq9dQ22xQ7Rvs8


Generated by Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls2e237XAq9dQ22xQ7Rvs8
@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 32 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 125d743 and 14c2a12.

Files selected for processing: 7

  • COMPATIBILITY.md
  • src/E2E/Run/Runner.cs
  • tests/E2E.NUnit.Tests/DescribeOnly/DescribeOnlyTests.cs
  • tests/E2E.TUnit.Tests/DescribeOnly/DescribeOnlyTests.cs
  • tests/E2E.TUnit.Tests/E2E.TUnit.Tests.csproj
  • tests/E2E.XUnit.V3.Tests/DescribeOnly/DescribeOnlyTests.cs
  • tests/E2E.XUnit.V3.Tests/E2E.XUnit.V3.Tests.csproj
Pre-merge checks: Passed 1

Check name Status Explanation
Upstream Parity Passed The check applies. The PR body and linked issue #2422 name upstream packages/e2e/tests/integration/describe-only.test.ts. The primary PR is #2489 (hardkoded/e2e-dotnet, head `fix/2422-run-discovered…
Full details: Upstream Parity

Explanation

The check applies. The PR body and linked issue #2422 name upstream packages/e2e/tests/integration/describe-only.test.ts. The primary PR is #2489 (hardkoded/e2e-dotnet, head fix/2422-run-discovered, base main, author kblok). I checked the PR commits (8185c4e, 08d21a8, a1b9b1b, 712f67f) and the current tree. I read upstream describe-only.test.ts from tester-army/e2e main through raw.githubusercontent. I did not check the pinned commit ee901b3. Upstream has two its in this file. Point 1 (new src/ symbols): Pass. Runner.RunDiscoveredAsync (src/E2E/Run/Runner.cs:327) and RunOutcome.Document are new. Both are named .NET-only in the PR body with reasons. The Runner class and the RunOutcome record are internal. The PR body places the function in upstream's run/runner.ts owner. Upstream has no name for it. Point 2 (tests): Pass. The it texts match upstream in C# casing: - Runs_the_focused_groups_and_a_test_only_beside_them_and_nothing_else - Is_refused_in_CI_with_ONLY_IN_CI Each test sits in tests/E2E.{NUnit,XUnit.V3,TUnit}.Tests/DescribeOnly/DescribeOnlyTests.cs, one class for upstream's describe('describe.only'). The assertions match upstream: assertValidReport, exit code 0, the ordered passed title paths, and for CI exit code 2 with ONLY_IN_CI in run.errors and no passed results. The port adds an unselected-results check and an empty-errors check. These go beyond upstream and do not drop any upstream assertion. No Partial_ name remains in the three DescribeOnly folders. The upstream file has no other it that this PR needs to port. Point 3 (behavior upstream lacks): Pass. The runner behavior is named .NET-only in the PR body. Its reporting follows upstream's exit codes (0, 1, 2) and the same ONLY_IN_CI error. Point 4 (public API and docs): Not triggered. The new runner symbols are internal. The PR changes no shipped behavior or public surface. SKILL.md, docs-site, and COMPATIBILITY.md were not updated, and the rule does not require it here. Note (not a failure condition): COMPATIBILITY.md line 205 still says both its are Partial, that the exit code and report are not checked, and that a runner-level function is #2422. That text is now stale. Update it to record the full port. Prior failure: the prior run recorded no details. I re-checked every point against the current code. The Partial_ names are gone, RunDiscoveredAsync exists, and the tests assert the upstream it content. I treat the prior failure as addressed. I could not confirm the exact claim the prior run made. Prior failure addressed: The prior run's details are unavailable. Current state: commits 8185c4e, 08d21a8 and 712f67f add Runner.RunDiscoveredAsync (src/E2E/Run/Runner.cs:327) and RunOutcome.Document, both named .NET-only in the PR body. The three DescribeOnly/DescribeOnlyTests.cs files use the upstream it texts without Partial_ and assert the upstream checks (ordered passed titles, exit 0 and 2, ONLY_IN_CI in run.erro...

  • 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

…e fixtures

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls2e237XAq9dQ22xQ7Rvs8
…d check the order

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls2e237XAq9dQ22xQ7Rvs8
@kblok
kblok merged commit e050614 into main Nov 29, 2026
5 checks passed
@kblok
kblok deleted the fix/2422-run-discovered branch November 29, 2026 22:39
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.

Extract a runner-level run function so the describe-only tests port as written

2 participants