chore(historian): HistorianGateway Client/Contracts 1.1.0, typed error reason (#900)
v2-ci / unit-tests (push) Has been cancelled

Bump ZB.MOM.WW.HistorianGateway.Client + Contracts 1.0.0 -> 1.1.0 (historiangw#135,
release 6365f34). GatewayErrorReasons now reads Client 1.1.0's typed
HistorianGatewayException.StatusCode / ErrorReason / ErrorDomain (constants from
HistorianGatewayErrorReasons) instead of parsing grpc-status-details-bin itself; the
direct Grpc.StatusProto pin and reference are dropped (the client brings it). The
published client maps every RpcException to a HistorianGatewayException, so the
trailer fallback is not needed. Behaviour unchanged: FailedPrecondition +
AGGREGATE_NOT_SUPPORTED_FOR_TAG (domain historian_gateway.v1) ->
BadAggregateNotSupported, everything else keeps its handling.

Adds GatewayErrorReasonsTests (typed-property-only exceptions, so they fail against
the old trailer implementation); wire tests and docs/Historian.md updated.

Claude-Session: https://claude.ai/code/session_01GT67ACmpMR7b9LGRPLijMi
This commit is contained in:
Joseph Doherty
2026-11-13 07:17:10 -05:00
parent 97d513f7dc
commit 76e73e7dbf
7 changed files with 98 additions and 61 deletions
@@ -70,8 +70,8 @@ public sealed class DiscreteTagTimeWeightedWireTests
/// <summary>
/// lmxopcua#900: the residual #897 case — a node declared numeric whose AVEVA tag is discrete still reaches AVEVA. A
/// gateway at or after historiangw#135 answers FailedPrecondition + ErrorInfo <c>AGGREGATE_NOT_SUPPORTED_FOR_TAG</c>
/// (surfaced as Client 1.0.0 surfaces it: a <c>HistorianGatewayException</c> wrapping the <see cref="RpcException"/> and its
/// trailers), which is <c>BadAggregateNotSupported</c> for the node and no health failure. Control: an older gateway's
/// (surfaced as Client 1.1.0 surfaces it: a <c>HistorianGatewayException</c> built from the <see cref="RpcException"/>,
/// carrying the typed reason), which is <c>BadAggregateNotSupported</c> for the node and no health failure. Control: an older gateway's
/// <c>Internal</c> answer for the same read keeps today's handling (not BadAggregateNotSupported, counted).
/// </summary>
[Theory]
@@ -140,7 +140,7 @@ public sealed class DiscreteTagTimeWeightedWireTests
/// <summary>
/// true: answer the discrete tag's refused modes as a gateway at or after historiangw#135 does (FailedPrecondition +
/// ErrorInfo), wrapped the way Client 1.0.0's MapRpcException wraps it; false: the older Internal answer.
/// ErrorInfo), built the way Client 1.1.0's MapRpcException builds it; false: the older Internal answer.
/// </summary>
public volatile bool SendsAggregateRefusal;