From d6afb394135c72eeb3980ccf67809c37e3b00abd Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Fri, 9 Oct 2026 13:25:31 -0400 Subject: [PATCH] =?UTF-8?q?docs(historian):=20design=20=C2=A74=20AtTime=20?= =?UTF-8?q?=E2=80=94=20inside=20an=20outage=20returns=20the=20Bad=20neighb?= =?UTF-8?q?our's=20code=20(T10=20review)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe --- docs/plans/2026-10-09-pluggable-historian-design.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/plans/2026-10-09-pluggable-historian-design.md b/docs/plans/2026-10-09-pluggable-historian-design.md index c22d853c..758c0522 100644 --- a/docs/plans/2026-10-09-pluggable-historian-design.md +++ b/docs/plans/2026-10-09-pluggable-historian-design.md @@ -213,7 +213,10 @@ next call (not latched). value + status. Otherwise Double/Int64 linearly interpolated (status `Good` with the historian *Interpolated* info bits), Boolean/String/DateTime stepped from the previous sample (status keeps the previous sample's code + Interpolated bit); no previous sample ⇒ `BadNoData`. - If either neighbour is Bad, the result is `UncertainDataSubNormal`. + If the **previous** neighbour is Bad, the requested time lies inside an outage: the result is a null value + carrying that neighbour's Bad code (never better than its source, per the quality contract; corrected after the + T10 review). If the previous neighbour is usable and the **next** is Bad, the previous value is held (stepped, + not interpolated into the outage) with `UncertainDataSubNormal`. - **Events:** `TOP(@maxEvents)` from `{s}.Event` filtered by `SourceName = @source` (null ⇒ all) and `EventTimeUtc` range, ordered ascending. `HistoricalEvent(EventId, SourceName, EventTimeUtc, ReceivedTimeUtc, Message, (ushort)Severity)`.