feat: add context map pattern slice#411
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 the Context Map domain modeling slice to PatternKit, covering runtime fluent APIs, source generation, examples, docs, tests, catalog entries, and benchmark coverage for issue #403.
Changes:
- Introduces
ContextMapDescriptor, relationships, and generator attributes/source generator. - Adds commerce Context Map examples with DI registration and TinyBDD coverage.
- Updates pattern catalogs, documentation tables/TOCs, and benchmark coverage/result docs.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/PatternKit.Core/Application/ContextMaps/ContextMap.cs |
Adds runtime Context Map descriptor and relationship model. |
src/PatternKit.Generators.Abstractions/ContextMaps/ContextMapAttributes.cs |
Adds generator-facing Context Map attributes and enum. |
src/PatternKit.Generators/ContextMaps/ContextMapDescriptorGenerator.cs |
Generates Context Map descriptor factories from attributes. |
src/PatternKit.Generators/AnalyzerReleases.Unshipped.md |
Registers new generator diagnostics. |
src/PatternKit.Examples/ContextMapDemo/CommerceContextMapDemo.cs |
Adds fluent, generated, and DI commerce Context Map example. |
src/PatternKit.Examples/DependencyInjection/PatternKitExampleServiceCollectionExtensions.cs |
Registers the Context Map example in aggregate DI setup. |
src/PatternKit.Examples/ProductionReadiness/PatternKitPatternCatalog.cs |
Adds Context Map to the production pattern catalog. |
src/PatternKit.Examples/ProductionReadiness/PatternKitExampleCatalog.cs |
Adds the commerce Context Map example descriptor. |
benchmarks/PatternKit.Benchmarks/Application/ContextMapBenchmarks.cs |
Adds Context Map construction and execution benchmarks. |
test/PatternKit.Tests/Application/ContextMaps/ContextMapTests.cs |
Covers fluent Context Map behavior and validation. |
test/PatternKit.Generators.Tests/ContextMapDescriptorGeneratorTests.cs |
Covers Context Map generator output and diagnostics. |
test/PatternKit.Generators.Tests/AbstractionsAttributeCoverageTests.cs |
Adds attribute target/default/validation coverage. |
test/PatternKit.Examples.Tests/ContextMapDemo/CommerceContextMapDemoTests.cs |
Covers generated/fluent parity and DI importability. |
test/PatternKit.Examples.Tests/ProductionReadiness/PatternKitPatternCatalogTests.cs |
Updates catalog count/name assertions. |
test/PatternKit.Examples.Tests/ProductionReadiness/PatternKitBenchmarkCoverageTests.cs |
Updates benchmark route total assertion. |
README.md |
Updates pattern counts and benchmark table rows. |
docs/index.md |
Updates published pattern counts and table. |
docs/patterns/toc.yml |
Adds Context Map pattern TOC entry. |
docs/patterns/application/context-map.md |
Documents runtime and generated Context Map usage. |
docs/generators/toc.yml |
Adds Context Map generator TOC entry. |
docs/generators/context-map.md |
Documents generator usage and diagnostics. |
docs/examples/toc.yml |
Adds commerce Context Map example TOC entry. |
docs/examples/commerce-context-map-pattern.md |
Documents the commerce Context Map example. |
docs/guides/pattern-coverage.md |
Adds Context Map to coverage guide. |
docs/guides/benchmarks.md |
Adds Context Map benchmark rows. |
docs/guides/benchmark-results.md |
Updates benchmark result matrix and totals. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 5 => "OpenHostService", | ||
| 6 => "PublishedLanguage", | ||
| 7 => "SeparateWays", | ||
| _ => "SeparateWays" |
| .AddCommerceContextMapDemo(); | ||
|
|
||
| using var provider = services.BuildServiceProvider(); | ||
| var summary = provider.GetRequiredService<CommerceContextMapReporter>().Summarize(); |
Test Results 12 files 12 suites 6m 51s ⏱️ Results for commit a8d5f4b. |
🔍 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 #411 +/- ##
==========================================
+ Coverage 89.62% 95.69% +6.06%
==========================================
Files 547 551 +4
Lines 43943 44183 +240
Branches 6333 6357 +24
==========================================
+ Hits 39386 42282 +2896
+ Misses 2039 1901 -138
+ Partials 2518 0 -2518
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 |
Adds the next domain modeling slice for #403: Context Map.
Includes:
Local validation:
ContextMapDescriptorGeneratorTests|FullyQualifiedNameAbstractionsAttributeCoverageTests"ContextMapDemo|FullyQualifiedNameProductionReadiness"