feat: add splitter aggregator generator#220
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Test Results 1 files 1 suites 1m 40s ⏱️ Results for commit 2e02d27. |
🔍 PR Validation ResultsVersion: `` ✅ Validation Steps
📊 ArtifactsDry-run artifacts have been uploaded and will be available for 7 days. This comment was automatically generated by the PR validation workflow. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #220 +/- ##
==========================================
+ Coverage 91.94% 96.65% +4.70%
==========================================
Files 261 263 +2
Lines 24557 24842 +285
Branches 3345 3390 +45
==========================================
+ Hits 22579 24010 +1431
+ Misses 877 832 -45
+ Partials 1101 0 -1101
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Code Coverage |
There was a problem hiding this comment.
Pull request overview
Adds source-generated Splitter and Aggregator factory support to the PatternKit messaging generators, plus an end-to-end example (including DI registration) and documentation/catalog updates to close issue #211.
Changes:
- Introduces
[GenerateSplitter]/[GenerateAggregator]attributes and a newSplitterAggregatorGeneratorwith deterministic diagnostics (PKSA001–PKSA006). - Adds generator/unit tests and a refreshed messaging example that compares fluent vs generated split/rejoin behavior and validates DI importability.
- Updates docs and production-readiness catalogs to mark Splitter/Aggregator as having generator coverage (removing the tracked gap).
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/PatternKit.Generators.Tests/SplitterAggregatorGeneratorTests.cs | Adds unit tests validating generated splitter/aggregator factories and diagnostics. |
| test/PatternKit.Generators.Tests/AbstractionsAttributeCoverageTests.cs | Extends attribute coverage checks to include the new splitter/aggregator attributes. |
| test/PatternKit.Examples.Tests/ProductionReadiness/PatternKitPatternCatalogTests.cs | Removes Splitter/Aggregator from the “tracked generator gap” list. |
| test/PatternKit.Examples.Tests/Messaging/MessageRoutingExampleTests.cs | Adds TinyBDD coverage comparing fluent vs generated paths and verifies DI import. |
| src/PatternKit.Generators/Messaging/SplitterAggregatorGenerator.cs | Implements the incremental generator emitting typed Splitter/Aggregator factories + diagnostics. |
| src/PatternKit.Generators/AnalyzerReleases.Unshipped.md | Registers new diagnostic IDs PKSA001–PKSA006. |
| src/PatternKit.Generators.Abstractions/Messaging/SplitterAggregatorAttributes.cs | Adds public attributes used to drive the generator contract. |
| src/PatternKit.Examples/ProductionReadiness/PatternKitPatternCatalog.cs | Updates pattern catalog entries to point to generator/docs/example paths for Splitter/Aggregator. |
| src/PatternKit.Examples/ProductionReadiness/PatternKitExampleCatalog.cs | Adds the “Generated Splitter and Aggregator” example descriptor. |
| src/PatternKit.Examples/Messaging/MessageRoutingExample.cs | Splits the existing flow into RunFluent vs RunGenerated, adds generated contracts and runner record. |
| src/PatternKit.Examples/DependencyInjection/PatternKitExampleServiceCollectionExtensions.cs | Registers the new DI-importable generated splitter/aggregator example. |
| docs/patterns/messaging/message-routing.md | Documents fluent and generated usage for Splitter and Aggregator. |
| docs/guides/pattern-coverage.md | Updates coverage table to reflect generator support for Splitter/Aggregator. |
| docs/generators/messaging.md | Documents the new generator and references PKSA diagnostics. |
| docs/generators/index.md | Adds Splitter/Aggregator to the generator index. |
| docs/examples/toc.yml | Adds the new example page to the docs TOC. |
| docs/examples/index.md | Lists the new generated Splitter/Aggregator example. |
| docs/examples/generated-splitter-aggregator.md | New example page documenting fluent vs generated + DI registration. |
| docs/examples/enterprise-messaging-workflows.md | Adds the generated splitter/aggregator workflow to the enterprise messaging workflow catalog. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Validation
Local targeted test build is blocked by this machine's existing Roslyn mismatch: PatternKit.Generators currently resolves Microsoft.CodeAnalysis 5.3.0 while the local test compiler references 5.0.0, which also prevents existing generated examples from compiling locally. CI should validate with the repository toolchain.
Closes #211