feat(health): pack ZB.MOM.WW.Health 0.1.0 + README + register health component in indexes
- Added PackageTags to all 3 library csproj files (health-checks;aspnetcore/akka/efcore;scada;wonderware;zb-mom-ww) - Full solution dotnet test: 58 tests green (32 Akka + 20 core + 6 EFCore) - dotnet pack -c Release produces ZB.MOM.WW.Health.0.1.0.nupkg, ZB.MOM.WW.Health.Akka.0.1.0.nupkg, ZB.MOM.WW.Health.EntityFrameworkCore.0.1.0.nupkg; artifacts/ not committed - ZB.MOM.WW.Health/README.md: overview, packages table, consumer matrix, versioning, build/test/pack instructions, status note - components/README.md: Health row added to component registry - CLAUDE.md: Health row in Component-normalization table + Health paragraph; intro updated from "two pieces" to "three pieces" - upcoming.md: Health checks item checked off with pointer to components/health/ and ZB.MOM.WW.Health/ - components/health/README.md: status updated from "Draft / scaffolded / follow-on" to "Built @ 0.1.0"
This commit is contained in:
@@ -6,9 +6,10 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|||||||
|
|
||||||
`scadaproj` is primarily an umbrella/index workspace that aggregates a family of
|
`scadaproj` is primarily an umbrella/index workspace that aggregates a family of
|
||||||
related SCADA / OT / Wonderware / OPC UA "sister projects" that live as **sibling
|
related SCADA / OT / Wonderware / OPC UA "sister projects" that live as **sibling
|
||||||
directories under `~/Desktop/`**. It now also **hosts two pieces of source itself** —
|
directories under `~/Desktop/`**. It now also **hosts three pieces of source itself** —
|
||||||
the shared [`ZB.MOM.WW.Auth/`](ZB.MOM.WW.Auth/) library and the shared
|
the shared [`ZB.MOM.WW.Auth/`](ZB.MOM.WW.Auth/) library, the shared
|
||||||
[`ZB.MOM.WW.Theme/`](ZB.MOM.WW.Theme/) UI kit — both the realized output of their
|
[`ZB.MOM.WW.Theme/`](ZB.MOM.WW.Theme/) UI kit, and the shared
|
||||||
|
[`ZB.MOM.WW.Health/`](ZB.MOM.WW.Health/) health-check library — all the realized output of their
|
||||||
respective component normalizations (see [Component normalization](#component-normalization)).
|
respective component normalizations (see [Component normalization](#component-normalization)).
|
||||||
The point of this file is to give a high-level scan of each sister project — its purpose,
|
The point of this file is to give a high-level scan of each sister project — its purpose,
|
||||||
location, stack, and primary commands — so a fresh Claude Code session can orient across
|
location, stack, and primary commands — so a fresh Claude Code session can orient across
|
||||||
@@ -119,6 +120,7 @@ each project's **code-verified current state**, and the **gaps** between. See
|
|||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| Auth (login / identity / authz) | Built (lib `0.1.0`) | Shared `ZB.MOM.WW.Auth` lib | [`components/auth/`](components/auth/) | [`ZB.MOM.WW.Auth/`](ZB.MOM.WW.Auth/) |
|
| Auth (login / identity / authz) | Built (lib `0.1.0`) | Shared `ZB.MOM.WW.Auth` lib | [`components/auth/`](components/auth/) | [`ZB.MOM.WW.Auth/`](ZB.MOM.WW.Auth/) |
|
||||||
| UI Theme (layout / tokens / components) | Built (lib `0.1.0`) | Shared `ZB.MOM.WW.Theme` RCL | [`components/ui-theme/`](components/ui-theme/) | [`ZB.MOM.WW.Theme/`](ZB.MOM.WW.Theme/) |
|
| UI Theme (layout / tokens / components) | Built (lib `0.1.0`) | Shared `ZB.MOM.WW.Theme` RCL | [`components/ui-theme/`](components/ui-theme/) | [`ZB.MOM.WW.Theme/`](ZB.MOM.WW.Theme/) |
|
||||||
|
| Health (readiness / liveness / active-node) | Built (lib `0.1.0`) | Shared `ZB.MOM.WW.Health` lib | [`components/health/`](components/health/) | [`ZB.MOM.WW.Health/`](ZB.MOM.WW.Health/) |
|
||||||
|
|
||||||
The auth component is fully populated: a normalized [`spec`](components/auth/spec/SPEC.md), a
|
The auth component is fully populated: a normalized [`spec`](components/auth/spec/SPEC.md), a
|
||||||
proposed [`shared-contract`](components/auth/shared-contract/ZB.MOM.WW.Auth.md), three
|
proposed [`shared-contract`](components/auth/shared-contract/ZB.MOM.WW.Auth.md), three
|
||||||
@@ -149,6 +151,21 @@ The implementation plan is at
|
|||||||
Build/test from `ZB.MOM.WW.Theme/`: `dotnet test`. Consumer matrix: all three apps consume
|
Build/test from `ZB.MOM.WW.Theme/`: `dotnet test`. Consumer matrix: all three apps consume
|
||||||
the single `ZB.MOM.WW.Theme` package (OtOpcUa AdminUI, MxGateway Server, ScadaBridge Host + CentralUI).
|
the single `ZB.MOM.WW.Theme` package (OtOpcUa AdminUI, MxGateway Server, ScadaBridge Host + CentralUI).
|
||||||
|
|
||||||
|
The health component is fully populated: a normalized [`spec`](components/health/spec/SPEC.md), a
|
||||||
|
[`shared-contract`](components/health/shared-contract/ZB.MOM.WW.Health.md), three
|
||||||
|
[`current-state`](components/health/current-state/) docs, and an adoption [`GAPS`](components/health/GAPS.md)
|
||||||
|
backlog. Shared = three-tier endpoint convention (ready/active/healthz) + canonical JSON writer +
|
||||||
|
`IActiveNodeGate` seam + `GrpcDependencyHealthCheck` + `AkkaClusterHealthCheck` + `ActiveNodeHealthCheck`
|
||||||
|
+ `DatabaseHealthCheck<TContext>`; left per-project = which probes each app registers,
|
||||||
|
orchestrator wiring, and ScadaBridge's distributed health-monitoring pipeline.
|
||||||
|
|
||||||
|
The shared library is **built and lives in this repo** at [`ZB.MOM.WW.Health/`](ZB.MOM.WW.Health/)
|
||||||
|
(.NET 10; 3 packages — `ZB.MOM.WW.Health`, `ZB.MOM.WW.Health.Akka`, `ZB.MOM.WW.Health.EntityFrameworkCore`;
|
||||||
|
58 tests; `dotnet pack` → 3 nupkgs @ 0.1.0).
|
||||||
|
**Not yet adopted** by the three apps — that's the follow-on tracked in [`components/health/GAPS.md`](components/health/GAPS.md).
|
||||||
|
Build/test from `ZB.MOM.WW.Health/`: `dotnet test`. Consumer matrix: MxAccessGateway → core only;
|
||||||
|
OtOpcUa & ScadaBridge → all three packages.
|
||||||
|
|
||||||
## Per-project primary commands
|
## Per-project primary commands
|
||||||
|
|
||||||
Run these from inside each project directory (not from `scadaproj`).
|
Run these from inside each project directory (not from `scadaproj`).
|
||||||
|
|||||||
@@ -0,0 +1,84 @@
|
|||||||
|
# ZB.MOM.WW.Health
|
||||||
|
|
||||||
|
Health-check libraries for the **ZB.MOM.WW SCADA family** (OtOpcUa, MxAccessGateway, ScadaBridge). These are **libraries, not a service** — each package is linked directly into the consuming application at build time. There is no central health process or network hop; probes run in-process alongside the application.
|
||||||
|
|
||||||
|
The library normalizes the three-tier health endpoint convention (`/health/ready`, `/health/active`, `/healthz`) and provides reusable probe implementations so the three sister projects share a common surface without duplicating probe logic.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Packages
|
||||||
|
|
||||||
|
| Package | Description | Key Dependencies |
|
||||||
|
|---|---|---|
|
||||||
|
| `ZB.MOM.WW.Health` | Core tiers, `MapZbHealth` extension, canonical JSON writer (`ZbHealthWriter`), `IActiveNodeGate` seam, `GrpcDependencyHealthCheck` reachability probe, and tier-tag constants (`ZbHealthTags`). No Akka or EF dependency. | `Microsoft.AspNetCore.App` (framework ref), `Grpc.Net.Client` |
|
||||||
|
| `ZB.MOM.WW.Health.Akka` | `AkkaClusterHealthCheck` with a configurable `AkkaClusterStatusPolicy` (presets: `Default` three-way / `OtOpcUaCompat` two-way), `ActiveNodeHealthCheck` with an optional role filter, and `AkkaActiveNodeGate` that backs `IActiveNodeGate` from the cluster member state. | `ZB.MOM.WW.Health`, `Akka.Cluster` |
|
||||||
|
| `ZB.MOM.WW.Health.EntityFrameworkCore` | `DatabaseHealthCheck<TContext>` with `CanConnectAsync` by default and an optional `ProbeQuery` delegate for custom connectivity validation. | `ZB.MOM.WW.Health`, `Microsoft.EntityFrameworkCore` |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Consumer Matrix
|
||||||
|
|
||||||
|
| Consumer | `ZB.MOM.WW.Health` (core) | `ZB.MOM.WW.Health.Akka` | `ZB.MOM.WW.Health.EntityFrameworkCore` |
|
||||||
|
|---|:---:|:---:|:---:|
|
||||||
|
| **OtOpcUa** | yes (+ `GrpcDependencyHealthCheck` for the MxAccessGateway channel) | yes | yes |
|
||||||
|
| **MxAccessGateway** | yes (+ `GrpcDependencyHealthCheck` for the x86 worker IPC) | — | — |
|
||||||
|
| **ScadaBridge** | yes | yes | yes |
|
||||||
|
|
||||||
|
MxAccessGateway consumes the core package only — it has no Akka cluster and no EF DbContext. OtOpcUa and ScadaBridge consume all three packages.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Versioning
|
||||||
|
|
||||||
|
All three packages are versioned **lockstep** from `Directory.Build.props`. The current release is **0.1.0**. A single version bump in `Directory.Build.props` bumps all three packages simultaneously — consumers should reference the same version for all ZB.MOM.WW.Health packages.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Building and testing
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# from ZB.MOM.WW.Health/
|
||||||
|
dotnet build ZB.MOM.WW.Health.slnx
|
||||||
|
dotnet test ZB.MOM.WW.Health.slnx
|
||||||
|
```
|
||||||
|
|
||||||
|
All three test assemblies run with `dotnet test` and require no external dependencies (no running Akka cluster, no database):
|
||||||
|
|
||||||
|
| Assembly | Tests |
|
||||||
|
|---|---|
|
||||||
|
| `ZB.MOM.WW.Health.Tests` | 20 |
|
||||||
|
| `ZB.MOM.WW.Health.Akka.Tests` | 32 |
|
||||||
|
| `ZB.MOM.WW.Health.EntityFrameworkCore.Tests` | 6 |
|
||||||
|
| **Total** | **58** |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Packing
|
||||||
|
|
||||||
|
```bash
|
||||||
|
dotnet pack ZB.MOM.WW.Health.slnx -c Release -o ./artifacts
|
||||||
|
```
|
||||||
|
|
||||||
|
Produces three `.nupkg` files in `artifacts/`:
|
||||||
|
|
||||||
|
```
|
||||||
|
ZB.MOM.WW.Health.0.1.0.nupkg
|
||||||
|
ZB.MOM.WW.Health.Akka.0.1.0.nupkg
|
||||||
|
ZB.MOM.WW.Health.EntityFrameworkCore.0.1.0.nupkg
|
||||||
|
```
|
||||||
|
|
||||||
|
`GeneratePackageOnBuild` is off — pack explicitly as above.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
**Built at 0.1.0. NOT yet adopted by the three apps.** Adoption is tracked in the component backlog:
|
||||||
|
|
||||||
|
- `~/Desktop/scadaproj/components/health/GAPS.md`
|
||||||
|
|
||||||
|
Design documentation lives alongside that backlog:
|
||||||
|
|
||||||
|
- `~/Desktop/scadaproj/components/health/spec/SPEC.md` — normalized three-tier target
|
||||||
|
- `~/Desktop/scadaproj/components/health/shared-contract/ZB.MOM.WW.Health.md` — proposed API
|
||||||
|
- `~/Desktop/scadaproj/components/health/current-state/` — per-project current state (code-verified)
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
<PackageId>ZB.MOM.WW.Health.Akka</PackageId>
|
<PackageId>ZB.MOM.WW.Health.Akka</PackageId>
|
||||||
<Authors>ZB.MOM.WW</Authors>
|
<Authors>ZB.MOM.WW</Authors>
|
||||||
<Description>Akka.Cluster health-check extensions for the ZB.MOM.WW SCADA family.</Description>
|
<Description>Akka.Cluster health-check extensions for the ZB.MOM.WW SCADA family.</Description>
|
||||||
|
<PackageTags>health-checks;akka;akka-cluster;scada;wonderware;zb-mom-ww</PackageTags>
|
||||||
<PackageProjectUrl>https://gitea.dohertylan.com/dohertj2/zb-mom-ww-health</PackageProjectUrl>
|
<PackageProjectUrl>https://gitea.dohertylan.com/dohertj2/zb-mom-ww-health</PackageProjectUrl>
|
||||||
<RepositoryUrl>https://gitea.dohertylan.com/dohertj2/zb-mom-ww-health</RepositoryUrl>
|
<RepositoryUrl>https://gitea.dohertylan.com/dohertj2/zb-mom-ww-health</RepositoryUrl>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
+1
@@ -5,6 +5,7 @@
|
|||||||
<PackageId>ZB.MOM.WW.Health.EntityFrameworkCore</PackageId>
|
<PackageId>ZB.MOM.WW.Health.EntityFrameworkCore</PackageId>
|
||||||
<Authors>ZB.MOM.WW</Authors>
|
<Authors>ZB.MOM.WW</Authors>
|
||||||
<Description>Entity Framework Core health-check extensions for the ZB.MOM.WW SCADA family.</Description>
|
<Description>Entity Framework Core health-check extensions for the ZB.MOM.WW SCADA family.</Description>
|
||||||
|
<PackageTags>health-checks;entity-framework-core;efcore;scada;wonderware;zb-mom-ww</PackageTags>
|
||||||
<PackageProjectUrl>https://gitea.dohertylan.com/dohertj2/zb-mom-ww-health</PackageProjectUrl>
|
<PackageProjectUrl>https://gitea.dohertylan.com/dohertj2/zb-mom-ww-health</PackageProjectUrl>
|
||||||
<RepositoryUrl>https://gitea.dohertylan.com/dohertj2/zb-mom-ww-health</RepositoryUrl>
|
<RepositoryUrl>https://gitea.dohertylan.com/dohertj2/zb-mom-ww-health</RepositoryUrl>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
<PackageId>ZB.MOM.WW.Health</PackageId>
|
<PackageId>ZB.MOM.WW.Health</PackageId>
|
||||||
<Authors>ZB.MOM.WW</Authors>
|
<Authors>ZB.MOM.WW</Authors>
|
||||||
<Description>Core ASP.NET Core health-check extensions for the ZB.MOM.WW SCADA family.</Description>
|
<Description>Core ASP.NET Core health-check extensions for the ZB.MOM.WW SCADA family.</Description>
|
||||||
|
<PackageTags>health-checks;aspnetcore;scada;wonderware;zb-mom-ww</PackageTags>
|
||||||
<PackageProjectUrl>https://gitea.dohertylan.com/dohertj2/zb-mom-ww-health</PackageProjectUrl>
|
<PackageProjectUrl>https://gitea.dohertylan.com/dohertj2/zb-mom-ww-health</PackageProjectUrl>
|
||||||
<RepositoryUrl>https://gitea.dohertylan.com/dohertj2/zb-mom-ww-health</RepositoryUrl>
|
<RepositoryUrl>https://gitea.dohertylan.com/dohertj2/zb-mom-ww-health</RepositoryUrl>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ specs and analyses that *drive* changes made in the individual repos.
|
|||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| Auth (login / identity / authz) | Draft | OtOpcUa, MxAccessGateway, ScadaBridge | Path to shared code (`ZB.MOM.WW.Auth`) | [`auth/`](auth/) |
|
| Auth (login / identity / authz) | Draft | OtOpcUa, MxAccessGateway, ScadaBridge | Path to shared code (`ZB.MOM.WW.Auth`) | [`auth/`](auth/) |
|
||||||
| UI Theme (layout / tokens / components) | Draft | OtOpcUa, MxAccessGateway, ScadaBridge | Path to shared code (`ZB.MOM.WW.Theme`) | [`ui-theme/`](ui-theme/) |
|
| UI Theme (layout / tokens / components) | Draft | OtOpcUa, MxAccessGateway, ScadaBridge | Path to shared code (`ZB.MOM.WW.Theme`) | [`ui-theme/`](ui-theme/) |
|
||||||
|
| Health (readiness / liveness / active-node) | Draft | OtOpcUa, MxAccessGateway, ScadaBridge | Shared `ZB.MOM.WW.Health` lib (3 packages) | [`health/`](health/) |
|
||||||
|
|
||||||
> Add a row when you start normalizing a new component. Status: `Draft` → `Reviewed` → `Adopting` → `Converged`.
|
> Add a row when you start normalizing a new component. Status: `Draft` → `Reviewed` → `Adopting` → `Converged`.
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,8 @@ all three.
|
|||||||
|
|
||||||
## Component status
|
## Component status
|
||||||
|
|
||||||
**Status: Draft.** Spec and shared-contract written; current-state docs verified; GAPS backlog
|
**Status: Draft — library built at 0.1.0.** Spec and shared-contract written; current-state docs
|
||||||
populated. Library scaffolded at [`../../ZB.MOM.WW.Health/`](../../ZB.MOM.WW.Health/); source
|
verified; GAPS backlog populated. Library implemented and packed at
|
||||||
implementation is a follow-on (task #7 in the adoption backlog). Adoption by the three apps is
|
[`../../ZB.MOM.WW.Health/`](../../ZB.MOM.WW.Health/) (3 packages, 58 tests;
|
||||||
a further follow-on tracked in [`GAPS.md`](GAPS.md).
|
`ZB.MOM.WW.Health`, `ZB.MOM.WW.Health.Akka`, `ZB.MOM.WW.Health.EntityFrameworkCore`).
|
||||||
|
Adoption by the three apps is the next follow-on tracked in [`GAPS.md`](GAPS.md).
|
||||||
|
|||||||
+6
-3
@@ -82,6 +82,9 @@ cross-repo interop checks, distinct from the others.
|
|||||||
`AddZbDefaults()`-style call.
|
`AddZbDefaults()`-style call.
|
||||||
|
|
||||||
## Suggested order
|
## Suggested order
|
||||||
1. **Health checks** (cleanest duplication, bounded). 2. **Observability/telemetry** (completes the
|
1. ~~**Health checks** (cleanest duplication, bounded).~~ **Done** — `ZB.MOM.WW.Health` built @
|
||||||
operability cluster with Health). 3. **Audit model** (ties back to Auth). Then revisit the gRPC
|
0.1.0 (3 packages, 58 tests). Design: [`components/health/`](components/health/);
|
||||||
contract surface and the `Hosting` aggregator.
|
implementation: [`../ZB.MOM.WW.Health/`](../ZB.MOM.WW.Health/). Adoption tracked in
|
||||||
|
[`components/health/GAPS.md`](components/health/GAPS.md).
|
||||||
|
2. **Observability/telemetry** (completes the operability cluster with Health). 3. **Audit model**
|
||||||
|
(ties back to Auth). Then revisit the gRPC contract surface and the `Hosting` aggregator.
|
||||||
|
|||||||
Reference in New Issue
Block a user