One API project owns the domain; health checks per house pattern (ADR-0009)#6
Merged
KaliCZ merged 2 commits intoJul 16, 2026
Conversation
Merge ProductReviews.Domain into ProductReviews.Api so a feature folder owns its whole slice (entities, handlers, controller, DTOs), and fold ProductReviews.ServiceDefaults into Infrastructure/ (Observability.cs = OTel, Health.cs = health checks). Resilience moves onto the userinfo client instead of ConfigureHttpClientDefaults. Health follows the house pattern: /alive = commit-hash check only, no dependencies; /health = EF Core DbContext check + Zitadel discovery probe (Degraded, not Unhealthy). Both answer "<status> <commit>" from the assembly SourceRevisionId. Wire-level tests cover both endpoints. Domain.Tests becomes Api.UnitTests. Migration IDs are untouched. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two things, per request: the health-check setup used in DemoPage/hampap, and the collapse of the Domain + ServiceDefaults projects into the API project.
Single API project (ADR-0009, supersedes ADR-0001)
A feature folder now owns its whole slice — entities, handlers + error enums, controller, DTOs, mapping — instead of being split across
ApiandDomain:ProductReviews.ServiceDefaultsis gone: OTel lives inInfrastructure/Observability.cs, health inInfrastructure/Health.cs; service discovery was dropped (nothing used it) and HTTP resilience moved onto the Zitadel userinfo client — per-client, notConfigureHttpClientDefaults(rule Bump the nuget group with 1 update #14).ProductReviews.Domain.Tests→ProductReviews.Api.UnitTests.Health checks (house pattern)
/alive— liveness only: theversioncheck (commit hash from the assemblySourceRevisionId, embedded by the SDK), no dependencies — a shared Postgres/Zitadel outage never reads as a dead process./health— full readiness: EF CoreAddDbContextCheck<ReviewsDbContext>(database, the Aspire integration''s duplicate check disabled) +zitadelprobing the OIDC discovery document with a 5 s timeout. Zitadel failures report Degraded, not Unhealthy: reads survive an identity-provider outage."<status> <commit>"— greppable by a blue/green deploy gate, no per-check detail leaked.Verification
dotnet build: 0 warnings, 0 errorsdotnet test: 43/43 (13 unit + 30 integration, incl. two new wire-level health tests:/alive→Healthy <commit>with no Zitadel configured;/health→Degraded <commit>with DB up and no identity provider)🤖 Generated with Claude Code