docs(health): GrpcDependencyHealthCheck has no consumers - keep it, correct SPEC/README (scadaproj#28)
SPEC 2.4 named OtOpcUa and MxGateway as users; neither is (verified against every app's default branch; MxGateway worker IPC is named pipes, OtOpcUa deliberately does not gate readiness on gateway channels). Keep the check (removal is a breaking API change; small, tested building block), mark it as no-current-consumers in SPEC 2.4/6/7, both READMEs, the shared-contract doc and GAPS. Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
@@ -15,7 +15,7 @@ OtOpcUa and ScadaBridge; the `ClusterActiveNode` oldest-`Up`-member rule and the
|
||||
`OldestNodeActiveHealthCheck` — the two private replacements each app wrote after the original
|
||||
leader-based check proved wrong on a live rig; a generic
|
||||
`DatabaseHealthCheck<TContext>` that covers both apps' EF Core probe patterns; a
|
||||
`GrpcDependencyHealthCheck` for downstream gRPC reachability.
|
||||
`GrpcDependencyHealthCheck` for downstream gRPC reachability (shipped, currently no consumers - see §2.4).
|
||||
|
||||
**Explicitly NOT normalized** (domain-specific — keep per project): which probes each app
|
||||
registers and how it wires them to tags; orchestrator / Traefik routing rules and routing priorities;
|
||||
@@ -123,12 +123,17 @@ payload alone.
|
||||
|
||||
Checks that a downstream gRPC channel is reachable by invoking a caller-supplied probe
|
||||
delegate (`Func<GrpcChannel, CancellationToken, Task<bool>>`). The default probe calls
|
||||
`GrpcChannel.ConnectAsync`. Used by:
|
||||
`GrpcChannel.ConnectAsync`.
|
||||
|
||||
- OtOpcUa — checks the MxAccessGateway gRPC channel.
|
||||
- MxGateway — checks the x86 worker gRPC channel.
|
||||
**Current consumers: none** (verified 2026-11-09 against every app's default branch). Earlier drafts
|
||||
named OtOpcUa (MxAccessGateway channel) and MxGateway (x86 worker channel) as users, but neither adopted it:
|
||||
MxGateway's worker IPC is named pipes, not gRPC, and workers exist only per session; OtOpcUa creates its
|
||||
gateway channels per driver from DB config and deliberately keeps serving last-known-good when a source is
|
||||
down, so it does not gate readiness on them (see `GAPS.md`, "Downstream dependency probes"). The check is
|
||||
retained in the library as an available, unit-tested building block for a future gRPC dependency; it is not
|
||||
part of any app's convergence target.
|
||||
|
||||
Registered to the `ready` tag.
|
||||
If used, register it on the `ready` tag.
|
||||
|
||||
## 3. Response-writer contract
|
||||
|
||||
@@ -219,14 +224,14 @@ predicates and response writer.
|
||||
|---|---|---|---|
|
||||
| **OtOpcUa** | All three tiers present (`/health/ready`, `/health/active`, `/healthz`); `DatabaseHealthCheck`, `AkkaClusterHealthCheck`, `AdminRoleLeaderHealthCheck` inline. | Inline probes diverge from the shared policy model; no `IActiveNodeGate`. | Replace inline `AkkaClusterHealthCheck` with shared + `OtOpcUaCompat` preset; replace `AdminRoleLeaderHealthCheck` with shared `ActiveNodeHealthCheck(role: "admin")`; replace inline `DatabaseHealthCheck` with shared generic; call `app.MapZbHealth()`. |
|
||||
| **ScadaBridge** | `/health/ready` + `/health/active` present; no `/healthz`; `DatabaseHealthCheck`, `AkkaClusterHealthCheck`, `ActiveNodeHealthCheck`, `ActiveNodeGate` inline. | Missing `/healthz` live tier; inline implementations. | Add `/healthz` via `MapZbHealth()`; replace inline probes with shared equivalents (Default policy); replace inline `ActiveNodeGate` with `AkkaActiveNodeGate`. |
|
||||
| **MxGateway** | Only `/health/live` (custom `GatewayHealthReply`); `AddHealthChecks()` called but zero probes registered. | Missing `ready` and `active` tiers; no probes; not using standard health middleware. | Replace custom endpoint with `app.MapZbHealth()`; register `GrpcDependencyHealthCheck` for the x86 worker channel on the `ready` tag. |
|
||||
| **MxGateway** | Only `/health/live` (custom `GatewayHealthReply`); `AddHealthChecks()` called but zero probes registered. | Missing `ready` and `active` tiers; no probes; not using standard health middleware. | Replace custom endpoint with `app.MapZbHealth()`; no gRPC-dependency probe (the worker IPC is named pipes - see §2.4 / GAPS). |
|
||||
|
||||
## 7. Acceptance (what "converged" means)
|
||||
|
||||
A project is converged when: (a) it calls `app.MapZbHealth()` and exposes all three canonical
|
||||
endpoints; (b) its Akka probes (if applicable) use the `AkkaClusterHealthCheck` + `ActiveNodeHealthCheck`
|
||||
from `ZB.MOM.WW.Health.Akka` with the Default policy; (c) its DB probe uses `DatabaseHealthCheck<TContext>`
|
||||
from `ZB.MOM.WW.Health.EntityFrameworkCore`; (d) its gRPC-dependency probe (if applicable) uses
|
||||
from `ZB.MOM.WW.Health.EntityFrameworkCore`; (d) its gRPC-dependency probe (if it has one; none currently do) uses
|
||||
`GrpcDependencyHealthCheck`; (e) its `IActiveNodeGate` implementation is `AkkaActiveNodeGate`
|
||||
(or a project-specific implementation of the shared interface); (f) all health endpoints return the
|
||||
canonical JSON shape defined in §3.
|
||||
|
||||
Reference in New Issue
Block a user