docs(health): align shared-contract to shipped API + per-lib CLAUDE.md + cleanup

- Contract: DatabaseHealthCheck<TContext> ctor now shows IServiceProvider (resolves
  IDbContextFactory<TContext> when registered, else a scoped TContext; pool-safe)
- Contract: RequireActiveNode gains retryAfterSeconds = 5 default parameter
- Packages: remove dangling AspNetCore.HealthChecks.UI.Client PackageVersion (no
  csproj referenced it)
- Tests: fix CS8625 in RoleLessCases — use object?[] so null role rows compile
  warning-free under Nullable=enable
- Add ZB.MOM.WW.Health/CLAUDE.md (packages, responsibilities, consumer matrix,
  build/test/pack commands, status + pointer to components/health/)
This commit is contained in:
Joseph Doherty
2026-06-01 07:17:18 -04:00
parent 0c087d150d
commit 76295695ee
4 changed files with 81 additions and 8 deletions
@@ -91,7 +91,8 @@ public interface IActiveNodeGate
public static class ActiveNodeGateExtensions
{
public static IEndpointConventionBuilder RequireActiveNode(
this IEndpointConventionBuilder builder);
this IEndpointConventionBuilder builder,
int retryAfterSeconds = 5);
}
/// Checks that a downstream gRPC channel is reachable.
@@ -221,8 +222,9 @@ namespace ZB.MOM.WW.Health.EntityFrameworkCore;
public sealed class DatabaseHealthCheck<TContext> : IHealthCheck
where TContext : DbContext
{
// Resolves IDbContextFactory<TContext> when registered, else a scoped TContext; pool-safe.
public DatabaseHealthCheck(
IDbContextFactory<TContext> factory,
IServiceProvider serviceProvider,
DatabaseHealthCheckOptions<TContext>? options = null);
public Task<HealthCheckResult> CheckHealthAsync(