Live AggregateFilter PercentGood/DurationGood count Uncertain as Good, disagreeing with Part 13 and HistoryRead #809
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while fixing #796.
The OPC UA SDK 2.0.1 upgrade (#782 / PR #802) copied the 1.5.378.182 aggregate calculators into src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/Compatibility/Aggregates/, and OtOpcUaSdkServer.CreateAggregateManagerAsync registers them for live AggregateFilter monitored items. In that version StatusAggregateCalculator.ComputeDurationGoodBad counts Uncertain regions as Good when TreatUncertainAsBad=false (1.5.378.106 and SDK 2.0.1 itself count Good only).
Effect: live PercentGood / DurationGood include Uncertain time, while HistoryRead (SqlServer + QuestDB evaluators, Part 13 §5.4.3.31/§5.4.3.33, Mantis 0006166) excludes it. This contradicts ServerAggregateConfiguration's note that live subscriptions agree with history reads. Gateway does not serve PercentGood.
Blocked on an owner decision: the README next to the copied calculators records a 2026-11-10 (#782) decision to keep 1.5.378.182 live results exactly, and says any semantic change needs its own consumer-impact decision. ScadaBridge src uses neither AggregateFilter nor PercentGood/DurationGood, so exposure looks small.
If approved: override only the PercentGood/DurationGood calculators in app code (copied files stay untouched), exempt those cases from the 6,144-case golden test with a pinning test, and add a live-vs-history parity test with Uncertain samples.
zz-probe-delete-meto Live AggregateFilter PercentGood/DurationGood count Uncertain as Good, disagreeing with Part 13 and HistoryReadRelated, found by #810: the SDK TimeAverage/Total also diverge from Part 13 when an interval starts late with an Uncertain first sample — see #821. Worth deciding together with this one.
Findings from #821 (2026-11-11), same QP data over [0,20) (Uncertain 10 @+5, Good 11 @+12, Uncertain 12 @+25):
The Total/TimeAverage divergence is triggered by the Uncertain FIRST sample (Good-first data agrees everywhere) and an SDK upgrade would not change it. Pinned by
LiveAggregateLateStartFactsTestsandSdkAggregateParityTests; a decision here should cover both.Owner decision 2026-11-11: fix to match Part 13. Override only the live PercentGood/DurationGood calculators in app code (the copied files stay untouched). Exempt them from the 6,144-case golden test with a pinning test, and add a live-vs-history parity test with Uncertain samples. Unblocked.
Done. Live PercentGood/DurationGood count Good time only (Part 13), matching HistoryRead. An app-owned calculator replaces those two aggregates; the copied SDK files are untouched. 64 of the 6,144 golden cases changed, each pinned to the old SDK's own Good-only result. A live-vs-history parity test is added. Pushed to master in
e857135e..7a27ef1f; full suite green (20 projects, 0 failures, 0 warnings).