feat(kpi): K5 — Host central wiring + KpiHistoryRecorder cluster singleton + appsettings (not readiness-gated)

Wire the M6 KPI History recorder into the central composition path:
- Program.cs: call services.AddKpiHistory(configuration) on the central-only
  branch alongside AddNotificationOutbox/AddAuditLog/AddSiteCallAudit.
- AkkaHostedService.cs: register KpiHistoryRecorderActor as a central,
  non-role-scoped ClusterSingletonManager + ClusterSingletonProxy + a
  PhaseClusterLeave CoordinatedShutdown graceful-stop drain (singleton name
  'kpi-history-recorder'), copied/adapted from the audit-log-purge block.
- appsettings.Central.json (Host + docker + docker-env2 central nodes): add a
  ScadaBridge:KpiHistory section (SampleInterval 00:01:00, RetentionDays 90,
  PurgeInterval 1.00:00:00, DefaultMaxSeriesPoints 200).

KPI history is observability/best-effort and MUST NOT gate readiness: the
recorder is deliberately NOT added to RequiredSingletonsHealthCheck or any
other readiness gate.
This commit is contained in:
Joseph Doherty
2026-06-17 20:20:34 -04:00
parent 601cc6f594
commit e14433cd64
7 changed files with 93 additions and 0 deletions
@@ -61,6 +61,12 @@
"DispatchInterval": "00:00:05",
"DispatchBatchSize": 1000
},
"KpiHistory": {
"SampleInterval": "00:01:00",
"RetentionDays": 90,
"PurgeInterval": "1.00:00:00",
"DefaultMaxSeriesPoints": 200
},
"Transport": {
"SourceEnvironment": "docker-cluster-env2"
},
@@ -61,6 +61,12 @@
"DispatchInterval": "00:00:05",
"DispatchBatchSize": 1000
},
"KpiHistory": {
"SampleInterval": "00:01:00",
"RetentionDays": 90,
"PurgeInterval": "1.00:00:00",
"DefaultMaxSeriesPoints": 200
},
"Transport": {
"SourceEnvironment": "docker-cluster-env2"
},