feat: add bounded context pattern slice#410
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
Adds a new Domain Modeling “slice” for the DDD Bounded Context pattern, spanning runtime APIs, a source generator, an importable DI example, tests, docs, and benchmark coverage to meet the production-readiness catalog requirements tied to #403.
Changes:
- Introduces
BoundedContextDescriptorruntime API (capabilities + adapters) plus fluent builder validation/ordering. - Adds
BoundedContextDescriptorGenerator+ abstractions attributes + Roslyn tests/diagnostics entries. - Integrates a Fulfillment bounded-context example into DI, catalog coverage, docs, and BenchmarkDotNet scenario/docs count updates.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/PatternKit.Tests/Application/BoundedContexts/BoundedContextTests.cs | Adds TinyBDD coverage for fluent bounded context descriptor behavior and validation. |
| test/PatternKit.Generators.Tests/BoundedContextDescriptorGeneratorTests.cs | Adds generator tests for successful generation and expected diagnostics. |
| test/PatternKit.Generators.Tests/AbstractionsAttributeCoverageTests.cs | Extends attribute coverage suite for new bounded context generator attributes. |
| test/PatternKit.Examples.Tests/ProductionReadiness/PatternKitPatternCatalogTests.cs | Updates catalog expectations to include “Bounded Context” and family counts. |
| test/PatternKit.Examples.Tests/ProductionReadiness/PatternKitBenchmarkCoverageTests.cs | Updates expected published benchmark route result totals. |
| test/PatternKit.Examples.Tests/BoundedContextDemo/FulfillmentBoundedContextDemoTests.cs | Adds example tests for fluent vs generated descriptors and DI importability. |
| src/PatternKit.Generators/BoundedContexts/BoundedContextDescriptorGenerator.cs | Implements incremental generator emitting BoundedContextDescriptor factories + diagnostics. |
| src/PatternKit.Generators/AnalyzerReleases.Unshipped.md | Registers new generator diagnostic IDs in analyzer release notes. |
| src/PatternKit.Generators.Abstractions/BoundedContexts/BoundedContextAttributes.cs | Introduces generator-facing attributes for bounded context descriptor generation. |
| src/PatternKit.Examples/ProductionReadiness/PatternKitPatternCatalog.cs | Adds bounded context entry to the production-readiness pattern catalog. |
| src/PatternKit.Examples/ProductionReadiness/PatternKitExampleCatalog.cs | Adds the Fulfillment bounded context example descriptor to the example catalog. |
| src/PatternKit.Examples/DependencyInjection/PatternKitExampleServiceCollectionExtensions.cs | Wires the bounded context pattern example into the repo-wide DI registration surface. |
| src/PatternKit.Examples/BoundedContextDemo/FulfillmentBoundedContextDemo.cs | Adds fluent + generated descriptor demo, DI registration, and generator host type. |
| src/PatternKit.Core/Application/BoundedContexts/BoundedContext.cs | Adds runtime bounded context capability/adapter models and fluent descriptor builder. |
| README.md | Updates pattern counts/table and adds benchmark rows for bounded context (pending measurements). |
| docs/patterns/toc.yml | Adds bounded context to the patterns TOC. |
| docs/patterns/application/bounded-context.md | Adds bounded context pattern documentation with fluent and generator examples. |
| docs/index.md | Updates published pattern count/table to include bounded context. |
| docs/guides/pattern-coverage.md | Adds bounded context to the pattern coverage guide table. |
| docs/guides/benchmarks.md | Adds bounded context benchmark rows (pending measurements). |
| docs/guides/benchmark-results.md | Updates coverage matrix totals and includes bounded context in matrices and generator list. |
| docs/generators/toc.yml | Adds bounded context generator page to generators TOC. |
| docs/generators/bounded-context.md | Adds generator documentation and diagnostics list for bounded context generator. |
| docs/examples/toc.yml | Adds fulfillment bounded context example page to examples TOC. |
| docs/examples/fulfillment-bounded-context-pattern.md | Adds example documentation for DI and usage. |
| benchmarks/PatternKit.Benchmarks/Application/BoundedContextBenchmarks.cs | Adds BenchmarkDotNet scenario covering fluent and generated construction/execution routes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Test Results 12 files 12 suites 9m 1s ⏱️ Results for commit 175a64e. |
Code Coverage |
🔍 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 #410 +/- ##
==========================================
+ Coverage 89.63% 95.70% +6.07%
==========================================
Files 543 547 +4
Lines 43657 43943 +286
Branches 6297 6333 +36
==========================================
+ Hits 39131 42056 +2925
+ Misses 2034 1887 -147
+ Partials 2492 0 -2492
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:
|
Adds the next domain modeling slice for #403: Bounded Context.
Includes:
Local validation:
BoundedContextDescriptorGeneratorTests|FullyQualifiedNameAbstractionsAttributeCoverageTests"BoundedContextDemo|FullyQualifiedNameProductionReadiness"