From 2fea619da33e60a9286c8fd363b2cc63b668f1e2 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Mon, 9 Nov 2026 14:09:39 -0500 Subject: [PATCH] docs(health): historiangw#87 fixed on main 5de3dd9 (not yet deployed) Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV --- components/health/GAPS.md | 4 ++-- .../health/current-state/historiangateway/CURRENT-STATE.md | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/health/GAPS.md b/components/health/GAPS.md index 31150d2..5de22d3 100644 --- a/components/health/GAPS.md +++ b/components/health/GAPS.md @@ -79,10 +79,10 @@ Checks that can only return **Degraded** (so never cause a 503): OtOpcUa `akka` which node is active. Same rule as the shared check; only the contract around it differs. Needs a ScadaBridge issue if the site tier should match central's (registering the shared `ActiveNodeHealthCheck` with the site role would close both). -- **HistorianGateway session-pool readiness latch — historiangw#87 (open, High/P1).** The +- **HistorianGateway session-pool readiness latch — historiangw#87 (FIXED on main `5de3dd9`, 2026-11-09; deployed boxes still run `d8d890c`).** The `historian-session-pool` / `historian-event-session-pool` checks go Unhealthy after 3 consecutive factory failures and reset only on a factory success, which needs an RPC, which a 503-ed pod never receives; - caller cancellation also counts. Unfixed on `4d6a9ad` and on by default. Detail: + caller cancellation also counted. Fixed on main `5de3dd9`: caller cancellation no longer counts and each keepalive tick probes one session while the count is non-zero; still present on deployed builds until historiangw#78 redeploys. Detail: [current-state/historiangateway](current-state/historiangateway/CURRENT-STATE.md). - **SPEC text is stale on §2.4.** It names OtOpcUa and MxGateway as `GrpcDependencyHealthCheck` users; **no app uses it** (HistorianGateway, once cited as a user, now probes the Historian through its diff --git a/components/health/current-state/historiangateway/CURRENT-STATE.md b/components/health/current-state/historiangateway/CURRENT-STATE.md index 375da27..be65507 100644 --- a/components/health/current-state/historiangateway/CURRENT-STATE.md +++ b/components/health/current-state/historiangateway/CURRENT-STATE.md @@ -33,7 +33,9 @@ Files under `src/ZB.MOM.WW.HistorianGateway.Server/Health/`. All tagged `ready`, | `historian-session-pool` | `SessionPoolHealthCheck("read", …)` | `HistorianSessionPool.Snapshot.ConsecutiveFactoryFailures` | 0 → Healthy; 1–2 → Degraded; ≥ 3 → **Unhealthy** | | `historian-event-session-pool` | `SessionPoolHealthCheck("event", …)` | same over `HistorianEventSessionPool` | same | -### Open finding: the session-pool check latches Unhealthy — historiangw#87 (open) +### Finding: the session-pool check latched Unhealthy — historiangw#87 (fixed on main `5de3dd9`) + +> **Fixed 2026-11-09 on `origin/main` `5de3dd9`** (after this audit's `4d6a9ad`): caller cancellation no longer counts, and while the failure count is non-zero each keepalive tick opens one probe session (success resets it). Deployed boxes still run `d8d890c` until historiangw#78. The analysis below describes the pre-fix code. historiangw#87 (Server-007, High/P1): `_consecutiveFactoryFailures` is reset only by a **successful factory call**, and the factory only runs when a real RPC needs a new lease (the keepalive sweep never @@ -67,6 +69,6 @@ ready-tier results), and the four Historian gRPC services. | §1 nothing on `live` | ✅ | | | §2.1 DB probe | 🟡 custom | `SqlConnectionHealthCheck` (no EF context to wrap) | | §2.4 downstream dependency probe | ✅ (custom) | Historian via the pool, not `GrpcDependencyHealthCheck` | -| Ready = "can this node serve its dependencies?" | 🟡 | correct while dependencies fail; **does not recover** after a session-pool outage (#87) | +| Ready = "can this node serve its dependencies?" | 🟡 | correct while dependencies fail; did not recover after a session-pool outage (#87 — fixed on main `5de3dd9`, not yet deployed) | | §3 canonical JSON writer | ✅ | | | §4 `IActiveNodeGate` | n/a | |