feat: add health endpoint monitoring pattern#306
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Test Results 1 files 1 suites 2m 11s ⏱️ Results for commit dfaa499. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #306 +/- ##
==========================================
+ Coverage 90.31% 96.00% +5.68%
==========================================
Files 428 432 +4
Lines 35980 36236 +256
Branches 5100 5137 +37
==========================================
+ Hits 32497 34788 +2291
+ Misses 1536 1448 -88
+ Partials 1947 0 -1947
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:
|
🔍 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. |
There was a problem hiding this comment.
Pull request overview
Adds the Health Endpoint Monitoring pattern across runtime, generator, example/demo, tests, and documentation, integrating it into the PatternKit pattern/example catalogs and production-readiness coverage.
Changes:
- Introduces a fluent
HealthEndpoint<TContext>runtime API and accompanying report/check result types. - Adds a Roslyn incremental generator (
[GenerateHealthEndpoint]/[HealthEndpointCheck]) plus generator tests and abstractions attribute coverage. - Adds a production-shaped DI + ASP.NET Core minimal API example (and tests), plus docs and catalog/toc updates.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/PatternKit.Tests/Cloud/HealthEndpointMonitoring/HealthEndpointTests.cs | Adds TinyBDD runtime coverage for fluent health endpoint evaluation and validation behavior. |
| test/PatternKit.Generators.Tests/HealthEndpointMonitoringGeneratorTests.cs | Adds generator tests validating emitted factory code ordering, escaping, and diagnostics. |
| test/PatternKit.Generators.Tests/AbstractionsAttributeCoverageTests.cs | Extends attribute coverage tests for new generator attributes and their defaults/guards. |
| test/PatternKit.Examples.Tests/ProductionReadiness/PatternKitPatternCatalogTests.cs | Updates production-readiness catalog assertions for the newly added cloud pattern. |
| test/PatternKit.Examples.Tests/HealthEndpointMonitoringDemo/FulfillmentHealthEndpointDemoTests.cs | Adds end-to-end tests for fluent vs generated endpoints, DI import, and ASP.NET Core mapping. |
| src/PatternKit.Generators/HealthEndpointMonitoring/HealthEndpointMonitoringGenerator.cs | Implements the incremental generator that produces a HealthEndpoint<TContext> factory from static check methods. |
| src/PatternKit.Generators/AnalyzerReleases.Unshipped.md | Registers new generator diagnostics (PKHEM001-003). |
| src/PatternKit.Generators.Abstractions/Cloud/HealthEndpointMonitoringAttributes.cs | Adds generator attribute definitions for endpoint generation and check methods. |
| src/PatternKit.Examples/ProductionReadiness/PatternKitPatternCatalog.cs | Registers the new pattern and its runtime/generator/example/doc/test artifacts in the catalog. |
| src/PatternKit.Examples/ProductionReadiness/PatternKitExampleCatalog.cs | Registers the new fulfillment health endpoint monitoring example descriptor. |
| src/PatternKit.Examples/HealthEndpointMonitoringDemo/FulfillmentHealthEndpointDemo.cs | Adds the demo: fluent + generated endpoints, DI registration, and minimal API route mapping. |
| src/PatternKit.Examples/DependencyInjection/PatternKitExampleServiceCollectionExtensions.cs | Wires the new demo into the aggregate examples registration surface. |
| src/PatternKit.Core/Cloud/HealthEndpointMonitoring/HealthEndpoint.cs | Adds the runtime implementation (endpoint, builder, report, check result). |
| docs/patterns/toc.yml | Adds the new cloud pattern to the docs table of contents. |
| docs/patterns/cloud/health-endpoint-monitoring.md | Adds the pattern doc page with fluent + generated usage pointers. |
| docs/guides/pattern-coverage.md | Updates pattern coverage guide table with the new pattern/generator. |
| docs/generators/toc.yml | Adds generator doc entry to TOC. |
| docs/generators/index.md | Adds generator entry to the generator index table. |
| docs/generators/health-endpoint-monitoring.md | Adds generator documentation and lists diagnostics. |
| docs/examples/toc.yml | Adds example doc entry to TOC. |
| docs/examples/index.md | Adds the example to the examples index list. |
| docs/examples/fulfillment-health-endpoint-monitoring.md | Adds the example documentation page with DI + ASP.NET Core usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Code Coverage |
Closes #302.
Adds Health Endpoint Monitoring runtime, generator, TinyBDD coverage, production-shaped IServiceCollection/ASP.NET Core example, docs, and catalog entries.
Local validation passed for focused core and generator builds/tests across net8/net9/net10. Local full examples tests still hit the known analyzer/compiler mismatch before this slice runs; hosted CI validates the full examples graph.