feat: audit hosting integration coverage#406
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 an audit layer that maps every production-readiness catalog pattern to either a reusable PatternKit.Hosting.Extensions registration API or the example-level AddPatternKitExamples import, and extends benchmark/test/doc coverage to keep the audit honest.
Changes:
- New
PatternKitHostingIntegrationCatalog(with descriptor, enum, interface, andAddPatternKitHostingIntegrationCatalogDI extension) hard-coding the 9 reusable hosting APIs and falling back to example registrations for all other catalog patterns. - New
BenchmarkRoute.HostingIntegrationvalue, hosting-integration routes derived from the new catalog, aHostingIntegrationPatternMatrixBenchmarkscoverage class, and a dedicatedHostingExtensionsBenchmarksmeasuring registration / provider build / resolve-and-execute overhead. - TinyBDD scenarios validating the audit matrix and DI registration, plus benchmark-coverage tests that pin hosting routes against the published
benchmark-results.md/hosting-extensions.mdrows.
Reviewed changes
Copilot reviewed 7 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/PatternKit.Examples/ProductionReadiness/PatternKitHostingIntegrationCatalog.cs | Introduces the hosting integration descriptor/catalog/DI extension. |
| benchmarks/PatternKit.Benchmarks/Coverage/BenchmarkRoute.cs | Adds HostingIntegration enum member. |
| benchmarks/PatternKit.Benchmarks/Coverage/PatternBenchmarkCoverage.cs | Emits hosting-integration construction routes per reusable pattern. |
| benchmarks/PatternKit.Benchmarks/Coverage/PatternMatrixBenchmarks.cs | Adds the hosting-integration coverage benchmark class. |
| benchmarks/PatternKit.Benchmarks/Hosting/HostingExtensionsBenchmarks.cs | Dedicated benchmark measuring DI registration, provider build, and resolve/execute. |
| benchmarks/PatternKit.Benchmarks/PatternKit.Benchmarks.csproj | Adds project reference to PatternKit.Hosting.Extensions. |
| test/PatternKit.Examples.Tests/ProductionReadiness/PatternKitPatternCatalogTests.cs | TinyBDD scenarios auditing the hosting catalog and DI registration. |
| test/PatternKit.Examples.Tests/ProductionReadiness/PatternKitBenchmarkCoverageTests.cs | Ensures hosting routes exist and are published in benchmark-results.md. |
| docs/guides/hosting-extensions.md | Documents the current reusable hosting coverage table. |
| docs/guides/benchmark-results.md | Adds Hosting Extensions timing rows and a hosting-integration matrix table. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public ServiceProvider Construction_BuildProvider() | ||
| => CreateConfiguredServices().BuildServiceProvider(validateScopes: true); |
Test Results 12 files 12 suites 10m 11s ⏱️ Results for commit f677e93. |
🔍 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 #406 +/- ##
==========================================
+ Coverage 89.56% 95.63% +6.07%
==========================================
Files 530 531 +1
Lines 42899 42951 +52
Branches 6203 6204 +1
==========================================
+ Hits 38421 41078 +2657
+ Misses 2022 1873 -149
+ Partials 2456 0 -2456
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 |
Summary
Closes #390.
Closes #391.
Closes #394.
Next issues opened
Validation
dotnet restore PatternKit.slnx --use-lock-filedotnet format PatternKit.slnx --verify-no-changes --verbosity minimaldotnet build PatternKit.slnx --configuration Release --no-restore -m:1dotnet test PatternKit.slnx --configuration Release --no-build -p:TestTfmsInParallel=false --logger "console;verbosity=minimal"dotnet test test\PatternKit.Examples.Tests\PatternKit.Examples.Tests.csproj --configuration Release --framework net8.0 --filter "FullyQualifiedName~ProductionReadiness" --logger "console;verbosity=minimal"dotnet test test\PatternKit.Hosting.Extensions.Tests\PatternKit.Hosting.Extensions.Tests.csproj --configuration Release --no-build --framework net8.0 --logger "console;verbosity=minimal"dotnet build benchmarks\PatternKit.Benchmarks\PatternKit.Benchmarks.csproj --configuration Release --no-restoredocfx docs\docfx.json --warningsAsErrors