Skip to content

feat: FluentValidation interceptor for stream queries#397

Merged
samtrion merged 2 commits into
mainfrom
copilot/add-fluentvalidation-stream-query-interceptor
Apr 16, 2026
Merged

feat: FluentValidation interceptor for stream queries#397
samtrion merged 2 commits into
mainfrom
copilot/add-fluentvalidation-stream-query-interceptor

Conversation

Copilot AI commented Apr 16, 2026

Copy link
Copy Markdown
Contributor
  • Create FluentValidationStreamQueryInterceptor<TQuery, TResponse> in src/NetEvolve.Pulse.FluentValidation/Interceptors/
  • Register IStreamQueryInterceptor<,>FluentValidationStreamQueryInterceptor<,> as Scoped in FluentValidationExtensions.AddFluentValidation()
  • Add unit tests for the new interceptor in tests/NetEvolve.Pulse.Tests.Unit/FluentValidation/Interceptors/FluentValidationStreamQueryInterceptorTests.cs
  • Add unit tests for the new registration in FluentValidationExtensionsTests.cs
  • Fix S4456: Split HandleAsync into non-iterator wrapper (parameter validation) + private HandleCoreAsync iterator (async validation + yield)
  • Build and verify: all tests pass

Copilot AI linked an issue Apr 16, 2026 that may be closed by this pull request
5 tasks
Copilot AI changed the title [WIP] Add FluentValidation interceptor for stream queries feat: FluentValidation interceptor for stream queries Apr 16, 2026
Copilot AI requested a review from samtrion April 16, 2026 04:50
@samtrion
samtrion force-pushed the copilot/add-fluentvalidation-stream-query-interceptor branch from 31a6b5c to 6e4a0e1 Compare April 16, 2026 06:12
@samtrion

Copy link
Copy Markdown
Contributor

@copilot fix pipeline errors/warnings

Copilot AI commented Apr 16, 2026

Copy link
Copy Markdown
Contributor Author

@copilot fix pipeline errors/warnings

Fixed in 75f90d7. The CI was failing due to SonarAnalyzer S4456 — HandleAsync was an async IAsyncEnumerable method that mixed parameter validation with iteration. Split it into a non-iterator HandleAsync wrapper (for ArgumentNullException.ThrowIfNull) that returns a private HandleCoreAsync async iterator (for validation + yield), matching the pattern used by HttpCorrelationStreamQueryInterceptor.

@samtrion
samtrion marked this pull request as ready for review April 16, 2026 07:29
@samtrion
samtrion requested a review from a team as a code owner April 16, 2026 07:29
Copilot AI and others added 2 commits April 16, 2026 09:29
@samtrion
samtrion force-pushed the copilot/add-fluentvalidation-stream-query-interceptor branch from 75f90d7 to b2dcd26 Compare April 16, 2026 07:29
@samtrion samtrion added state:ready for merge Indicates that a pull request has been reviewed and approved, and is ready to be merged into the mai type:feature Indicates a new feature or enhancement to be added. labels Apr 16, 2026
@codecov

codecov Bot commented Apr 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.83333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.42%. Comparing base (bb34053) to head (b2dcd26).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...rceptors/FluentValidationStreamQueryInterceptor.cs 94.44% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #397      +/-   ##
==========================================
+ Coverage   91.24%   91.42%   +0.17%     
==========================================
  Files         128      129       +1     
  Lines        4524     4548      +24     
  Branches      434      438       +4     
==========================================
+ Hits         4128     4158      +30     
+ Misses        275      268       -7     
- Partials      121      122       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@samtrion
samtrion merged commit a9c9ec2 into main Apr 16, 2026
11 checks passed
@samtrion
samtrion deleted the copilot/add-fluentvalidation-stream-query-interceptor branch April 16, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:ready for merge Indicates that a pull request has been reviewed and approved, and is ready to be merged into the mai type:feature Indicates a new feature or enhancement to be added.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: FluentValidation interceptor for stream queries

2 participants