Skip to content

Give the extension test projects a CI lane, and fix what it found - #4258

Merged
jeremydmiller merged 2 commits into
mainfrom
ci-lane-for-extension-tests
Sep 3, 2026
Merged

jeremydmiller merged 2 commits into
mainfrom
ci-lane-for-extension-tests

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Two commits: the CI lane you cannot see the value of until it runs, and the shipped bug it found in its first thirty seconds.

The gap

None of the extension test projects ran anywhere. TestExtensions gathers five of them, but only the Test and Full targets depend on it, and no workflow invokes either -- dotnet.yml runs ci (CoreTests + CIMessageRouting) and tests.yml runs its own CI* matrix. Wolverine.Protobuf.Tests is worse still: it is in wolverine.slnx so it compiles on every build, but it runs in no Nuke target at all, not even TestExtensions.

VerifyCITargetCoverage did not report this, and is not wrong to have missed it. It audits targets whose names begin with CI, which is the convention for "this is a lane". AiTests and its siblings never claimed to be lanes. Giving them one is the fix; the guard covers them from here on, and now walks 43 CI* targets reporting every one reachable.

What it found

One caveat worth reading

The AI failure surfaces in this lane as "1 passed on retry", not as a failure -- the flaky-retry harness absorbs it. So the lane alone would not have made that one obvious; it took running the suite directly. Worth knowing before treating a green lane as proof that everything under it is healthy.

Verification

./build.sh CIExtensions --framework net9.0, exit 0, 27 seconds:

Suite Result
Wolverine.AI.Tests 40 passed (1 on retry, see caveat)
Wolverine.DataAnnotationsValidation.Tests 12 passed (was 6 passed / 6 failed)
Wolverine.FluentValidation.Tests 24 passed
Wolverine.MemoryPack.Tests 3 passed
Wolverine.MessagePack.Tests 5 passed
Wolverine.Protobuf.Tests 1 passed

VerifyCITargetCoverage passes with the new lane registered. No docker services: none of these projects reference a persistence package or touch Servers, which is what keeps the lane cheap enough to be uncontroversial.

🤖 Generated with Claude Code

jeremydmiller and others added 2 commits September 2, 2026 18:52
#4244 fixed this for HTTP chains and stopped there. A message handler had the
identical defect and kept it, and six tests in
Wolverine.DataAnnotationsValidation.Tests had been failing on main to say so --
unseen, because the extension test projects run in no CI workflow.

Same shape as the HTTP half: Validate<T> takes an IServiceProvider to build its
ValidationContext, an unsupplied one is sourced from the service container and
reported to ServiceLocationPolicy, and under the Wolverine 6 default of
NotAllowed that made Wolverine's own validation middleware unusable on a message
handler at all -- InvalidServiceLocationException at bootstrap.

The policy supplies context.Runtime.Services itself, for the same reasons the
HTTP twin supplies httpContext.RequestServices: the only thing the
ValidationContext's provider ever does is answer GetService for a
ValidationAttribute or an IValidatableObject, and it runs before any handler
scope is relevant. Naming "context" directly is safe -- it is the generated
HandleAsync parameter, and ContextVariable.OverrideName is a deliberate no-op so
any other frame wanting that name is renamed instead.

Wolverine.DataAnnotationsValidation.Tests: 12 passed, from 6 passed 6 failed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
None of them ran anywhere. TestExtensions gathers five, but only the Test and
Full targets depend on it and no workflow invokes either -- dotnet.yml runs `ci`
(CoreTests + CIMessageRouting) and tests.yml runs its own CI* matrix.
Wolverine.Protobuf.Tests is worse: it is in wolverine.slnx so it compiles on
every build, but it runs in no Nuke target at all, not even TestExtensions.

VerifyCITargetCoverage did not report this and is not wrong to have missed it: it
audits targets whose names begin with CI, which is the convention for "this is a
lane". AiTests and its siblings never claimed to be one. Giving them a lane is
the fix, and the guard covers them from here on -- it now walks 43 CI* targets
and reports every one reachable.

What it cost, found the moment the lane first ran: six failing tests in
Wolverine.DataAnnotationsValidation.Tests, fixed in the previous commit, and
Wolverine.AI.Tests red on main with the first WolverineFx.AI release in flight
(#4257). Note that the AI failure surfaces here as "1 passed on retry" rather
than as a failure, because the flaky-retry harness absorbs it -- the lane alone
would not have made that one obvious.

No docker services: none of these projects reference a persistence package or
touch Servers, which is what keeps the lane cheap.

CIExtensions locally: AI 40, DataAnnotations 12, FluentValidation 24, MemoryPack
3, MessagePack 5, Protobuf 1 -- all green, 27 seconds.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jeremydmiller
jeremydmiller merged commit 8ea2b43 into main Sep 3, 2026
41 checks passed
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.

DataAnnotations Validation not compatible with ServiceLocationPolicy.NotAllowed

1 participant