docs+code: close Theme 1 — 24 design-doc / XML-doc drift findings
Doc/XML-comment drift + small adherence fixes across 17 modules. Highlights: - Host-017: site CoordinatedShutdown ordering — SiteStreamGrpcServer gains CancelAllStreams() (refuse new streams, cancel active), wired into Program.cs site branch via ApplicationStopping. - InboundAPI-021: ParentExecutionId now travels on RouteToGet/SetAttributes symmetric with RouteToCallRequest; RouteHelper stamps from _parentExecutionId. - ClusterInfra-012: ClusterOptionsValidator now requires both seed nodes. - Comm-018: SiteCommunicationActor.HeartbeatMessage.IsActive derived from cluster leader check (was hardcoded true). - DM-020: reconciliation audit row attributes the current user, not prior deployer. - SEL-019: EventLogPurgeService early-exits on standby via active-node check. - Plus comment/XML-doc accuracy fixes across AuditLog, ConfigurationDatabase, NotificationOutbox, SiteRuntime, SiteCallAudit; doc refreshes for Component- Commons / -ManagementService / -CLI / -ExternalSystemGateway / -HealthMonitoring / -Transport / -ConfigurationDatabase; CD-023 index-name doc alignment. 11 new regression tests (RouteHelper x4, SiteStreamGrpcServer x2, ClusterOptionsValidator x1, SiteCommunicationActor x1, DeploymentService x1, EventLogPurgeService x3). Build clean (0 warnings); InboundAPI/Communication/ Host suites all green. README regenerated: 112 open (was 136).
This commit is contained in:
@@ -919,8 +919,8 @@ file a tracking item for the wiring. The current doc claim is misleading.
|
||||
|--|--|
|
||||
| Severity | Low |
|
||||
| Category | Design-document adherence |
|
||||
| Status | Open |
|
||||
| Location | `src/ScadaLink.SiteEventLogging/ServiceCollectionExtensions.cs:21`, `docs/requirements/Component-SiteEventLogging.md:45` |
|
||||
| Status | Resolved |
|
||||
| Location | `src/ScadaLink.SiteEventLogging/EventLogPurgeService.cs:57-95`, `src/ScadaLink.SiteEventLogging/ServiceCollectionExtensions.cs:30-39`, `docs/requirements/Component-SiteEventLogging.md:45` |
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -949,6 +949,21 @@ the design doc to "the purge runs on every node against its own local database;
|
||||
on the standby it is a no-op". Pick one; the current mismatch is a doc-vs-code
|
||||
defect.
|
||||
|
||||
**Resolution (2026-05-28):** Took option (a) at the loop level — registration
|
||||
stays unchanged on every host. Introduced a `SiteEventLogActiveNodeCheck`
|
||||
delegate that `EventLogPurgeService` consults at the top of every
|
||||
`RunPurge()` tick; standby returns early with a debug log. The DI factory
|
||||
resolves the delegate from the container so the Host can register the real
|
||||
check on a site node, and a null/unregistered delegate falls back to the
|
||||
prior "always run" behaviour (backward compatible for non-clustered hosts and
|
||||
existing tests). Defensive try/catch around the check defaults to "run" so a
|
||||
transient cluster-state read failure cannot stop the purge loop. Added tests
|
||||
`RunPurge_OnStandbyNode_SkipsAllWork`,
|
||||
`RunPurge_OnActiveNode_RunsTheRetentionPurge`, and
|
||||
`RunPurge_WithNullCheck_FallsBackToRunning`. Wiring the real check on the
|
||||
Host's site-role branch is left for the Host's review. Tests green (50/50 in
|
||||
SiteEventLogging.Tests).
|
||||
|
||||
### SiteEventLogging-020 — `severity` and `eventType` are unvalidated free-form strings; doc enumerates a set that is not enforced
|
||||
|
||||
| | |
|
||||
|
||||
Reference in New Issue
Block a user