fix(high-severity): close 9 of 10 open High findings across 8 modules
Comm-016: delete dead HandleConnectionStateChanged + _debugSubscriptions / _inProgressDeployments tracking + ConnectionStateChanged message record. Disconnect detection is owned by the transport layers (gRPC keepalive PING ~25s; Ask-timeout at CommunicationService). Updates the Component-Communication.md design doc to make that explicit. SnF-018: NotificationForwarder.DeliverAsync now discards a corrupt buffered payload (Warning log + return true) instead of returning false and parking the row — honoring the design's "notifications do not park" invariant. DM-018: reconciliation no longer force-sets Enabled, preserving an intentional Disabled state after central failover. ESG-018: DeliverBufferedAsync (both ExternalSystemClient + DatabaseGateway) catches JsonException and returns false, turning a corrupt buffered row into a parked operation instead of a retry-forever poison message. InboundAPI-022: register ActiveNodeGate as IActiveNodeGate in the Central DI branch so standby-node gating is actually wired up in production. NS-019: remove orphaned NotificationDeliveryService / INotificationDeliveryService / NotificationResult; central notification delivery now lives entirely in NotificationOutbox. SEL-016: normalise From/To filters to UTC before ISO-string compare so non-UTC DateTimeOffset clients no longer get spuriously excluded events. TE-017: include Description on attributes/alarms and a HashableConnections projection (protocol, endpoint JSON, failover count) in the revision hash and DiffService; staleness detection now catches description-only and connection-endpoint edits. Transport-001 and Transport-002 (also High) remain Open — they're being handled in a follow-up batch because both touch BundleImporter.cs and must serialise.
This commit is contained in:
@@ -843,9 +843,11 @@ resolves against the real parent module. Regression test:
|
||||
|--|--|
|
||||
| Severity | High |
|
||||
| Category | Design-document adherence |
|
||||
| Status | Open |
|
||||
| Status | Resolved |
|
||||
| Location | `src/ScadaLink.TemplateEngine/Flattening/RevisionHashService.cs:128`, `src/ScadaLink.TemplateEngine/Flattening/RevisionHashService.cs:156`, `src/ScadaLink.TemplateEngine/Flattening/RevisionHashService.cs:42`, `src/ScadaLink.TemplateEngine/Flattening/DiffService.cs:110`, `src/ScadaLink.TemplateEngine/Flattening/DiffService.cs:118` |
|
||||
|
||||
**Resolution** — Added `Description` to `HashableAttribute` and `HashableAlarm` (placed alphabetically per the determinism contract) and introduced a `HashableConnection` projection plus a `SortedDictionary<string, HashableConnection> Connections` field on `HashableConfiguration` that captures protocol, primary/backup JSON, and failover retry count for every deployed connection. `DiffService.AttributesEqual` and `AlarmsEqual` now compare `Description`, and a new public `ConnectionsEqual` helper covers connection-endpoint drift so callers can detect the change in the same shape used by the other entity comparators. Regression tests `ComputeHash_AttributeDescriptionEdit_ChangesHash`, `ComputeHash_AlarmDescriptionEdit_ChangesHash`, `ComputeHash_ConnectionEndpointEdit_ChangesHash`, and `ConnectionsEqual_EndpointEdit_ReturnsFalse` lock the behaviour in.
|
||||
|
||||
**Description**
|
||||
|
||||
The design states the revision hash is "computed from the resolved content" and
|
||||
@@ -891,7 +893,19 @@ it in `DiffService`. Add tests:
|
||||
|
||||
**Resolution**
|
||||
|
||||
_Unresolved._
|
||||
Resolved (commit `pending`): `RevisionHashService` now folds `Description` into
|
||||
the `HashableAttribute` / `HashableAlarm` projections (alphabetical placement
|
||||
preserved) and adds a sorted `Connections` map of `HashableConnection`
|
||||
(Protocol, ConfigurationJson, BackupConfigurationJson, FailoverRetryCount) on
|
||||
`HashableConfiguration`. `DiffService.AttributesEqual` / `AlarmsEqual` compare
|
||||
`Description`, and a public `ConnectionsEqual` helper covers connection drift
|
||||
in the same shape as the other entity comparators. Regression tests:
|
||||
`ComputeHash_AttributeDescriptionEdit_ChangesHash`,
|
||||
`ComputeHash_AlarmDescriptionEdit_ChangesHash`,
|
||||
`ComputeHash_ConnectionEndpointEdit_ChangesHash`,
|
||||
`ConnectionsEqual_EndpointEdit_ReturnsFalse`. The diff-shape extension that
|
||||
surfaces added/removed/changed connections in the UI remains tracked under
|
||||
TemplateEngine-018.
|
||||
|
||||
### TemplateEngine-018 — `DiffService` reports no entries for added/removed/changed connections
|
||||
|
||||
|
||||
Reference in New Issue
Block a user