Projected variables advertise Historizing + the HistoryRead access bit (never
HistoryWrite) only when the definition says so. The Raw/Processed/AtTime
overrides split authorized handles: local ones go to the H1 port unchanged,
projected ones to IProjectedHistoryAccess, each written back to its own slot;
nothing waits under Lock. HistoryCursorKind.Remote stores the projection's
cursor in the SDK session store; disposing the point (session close, eviction,
releaseContinuationPoints, faulted request) releases it at the origin. Mapped
HistoryRead is opened deliberately in DataPlaneAuthorizer; other mapped
operations outside the allowlist stay closed.
A caller cancel during a history call surfaced as RpcException(Cancelled); it now throws OperationCanceledException.
When an assembly is abandoned (timeout, communication failure, unsupported, cancel) after a follow-up, the origin chunk
tokens it carried are released best effort.
The history field still marks that the origin has a historian (negotiation rule unchanged), but a principal with no
HistoryRead export sees no aggregate names and resolution 0 (undisclosed).
Each node's Raw page is clamped from a per-value byte estimate of its catalog type (wide strings/arrays get small
pages plus a continuation) and sub-batches are sized by estimated bytes, so the in-flight read respects
MaxHistoryResponseBytes; AtTime/Processed whose values x estimate exceed the budget are refused per node with a
diagnostic. One deadline per request: nodes not started when it passes are deferred (transport) or BadTimeout
(direct). Every refusal releases the page cursor it was just given; releasing, invalidating or expiring a chunk
releases the page cursor behind it; results are disposed on the exception path. Chunk bindings use per-node details.
OpcUaServer IVT for Runtime.Tests/Host.Tests so tests can hold real page cursors.
A pre-cancelled token throws before taking a slot, and the port delegate is dispatched with Task.Run(None) so its
finally always releases (a Task.Run on a cancelled token never runs the delegate).
In-process loopback h2c host: IConnectionLifetimeFeature.ConnectionClosed is exposed on the HTTP/2 stream context,
two requests on one connection share one session, and disposing the client connection clears it.
With the mapping HistoryRead bit and a local HistoryRead grant, a real SDK HistoryRead on a projected variable is
refused (no HistoryRead access-level bit on projected nodes) with no data and no continuation.
Remote reads hold at most N - max(1, N/4) of the node manager's N process-wide history batch slots
(MaxConcurrentHistoryReadBatches); past that a remote request is BadTooManyOperations unsent, so local OPC UA clients
always keep at least one slot.
Metadata no longer rebuilds the history view per node x operation (and checks the ACL before the tagname, the
ingress order); OriginHistoryPort caches its served-aggregate set per historian source instance.
Origin advertises history whenever it has a historian, so a not-ready/demoted endpoint answers HistoryRead
Unavailable (ungranted: PermissionDenied) and the consumer fails over like v1 Read instead of 'unsupported'.
Client: malformed/undecodable answers are endpoint failures (fresh read moves on); a resumed item is
ContinuationPointInvalid while a fresh item of the same batch is BadNoCommunication; a fresh read tries the next
endpoint when one lacks history; discovery backoff honoured; origin Cancelled without a caller cancel is BadTimeout
(no RecordFailure); caller cancel throws. The deployment lease maps inner/scope faults to BadNoCommunication.
The UnaryTimeout cap is documented next to the AdminUI field and in DataConnections.md.
Nodes are read in sub-batches sized to the response budget and no sub-batch starts once it is spent: the rest are
DEFERRED chunk tokens (transport; read on resume from their original continuation) or BadTooManyOperations (direct
consumer). Processed intervals and AtTime times above MaxHistoryValuesPerPage are refused unsent. Remainder bytes are
charged to a per-principal budget across sessions (concurrent reads x max(response budget, one page)); sizes come
from the encoded CalculateSize; a single value above the response budget is a per-item BadTooManyOperations.
Sessions are capped per principal (own LRU evicted first) and globally (the heaviest principal pays); a release never
creates a session; channel-close registrations are unregistered on clear.
Connection/export/mapping editors offer HistoryRead (DataOperationAuthoring, never ahead of the validator) and the
HistoryTimeoutMilliseconds / MaxConcurrentHistoryReads / MaxHistoryValuesPerPage / MaxHistoryResponseBytes /
MaxHistoryAssemblyBytesPerRequest fields; an informational banner shows while a post-v1 bit is ticked (plan 4.3).
GrpcDataConnection implements IDataHistoryService (explicitly; ReadHistoryAsync/ReleaseHistoryAsync avoid an overload
clash with ReadAsync): the capabilities probe always asks for history, other calls send it only when the selected
endpoint advertised it; per-call deadline min(remaining, HistoryTimeoutMilliseconds); FAILED_PRECONDITION/UNIMPLEMENTED
=> BadHistoryOperationUnsupported; chunks assembled within the request budget (BadTooManyOperations past it); page
tokens wrapped with the issuing endpoint + serving incarnation so a resumed read never moves; release forwarded. The
deployment lease gates history on the row's HistoryRead bit and carries HistoryTimeout. Decoded capabilities drop
HistoryRead without the history field. X0 tests that used bit 32 as the unknown bit now use a still-reserved bit.
Both recorded-v1-client gates now run against origins that grant HistoryRead, advertise history capabilities and
carry HistoryInfo; header-less bytes stay identical to the goldens (not re-recorded). GrpcDataHistoryWireTests: probe
shapes, FAILED_PRECONDITION without the feature, denied/unhistorized/unknown byte-identical with no backend call,
admission, cancel, wiring fault, chunking + lost chunk, release, direct runtime consumer. Endpoint allowlist gains
HistoryRead (the auth middleware rejected it).
Replays recorded v1 requests against the real DataConnectionGrpcService over the
real origin stack (LocalExportCatalog.Compile from a DraftSnapshot with Raw + UNS
exports, DataCapabilitiesProvider, PartitionedSampleHub, LocalDataServices,
DataWriteExecutor, LocalSubscriptionService/DataSubscriptionSession). Only the
physical driver write dispatch, upstream acquisition, transport and clock are
faked. Goldens captured on pre-H2 master 1086593a; nothing normalised.
Runtime gains InternalsVisibleTo Host.Tests for the Subscribe/Write seams.
Class added to the X0 manifest; X0.md section 2 records real vs faked,
determinism, the perturbation proof and the rule for H2/A2/A3.
OriginHistoryPort (public, implements IOriginHistoryPort) keeps SDK types inside OpcUaServer instead of an
InternalsVisibleTo: runs the synchronous ReadHistory off the caller's thread, one PeerHistoryContinuationScope per
request, absent bounds -> port MinValue, miswired scope surfaced as WiringFault. Exposed through the SDK sink so
DeferredOriginHistoryPort resolves it after server start; aggregate wire table pinned to AggregateFunctionMap.
- a take computes its expectation only after consuming the record, so a
throwing incarnation source cannot leave a token replayable;
- a PeerHistoryContinuationScope is per request and reads the serving
incarnation once, so a request straddling a failover binds its next
token to the incarnation it started under (Save never answers null);
- a non-owner principal or a blank/throwing incarnation source raises
PeerHistoryContinuationWiringException, answered BadInternalError (not
BadHistoryOperationUnsupported); plan H2 note added;
- ConnectionIncarnation documented as identity only.
The realm folds mapped/raw into Raw (and every other index into Uns), so
(realm, identifier) alone could resume a raw node's cursor on the same
identifier in a mapped namespace. Items and cursor state now carry a
binding tag: the SDK adapter (and the events path) passes the node's
namespace URI, restoring the pre-port namespace-qualified binding; a peer
passes its view tag. The peer key binds it too.
The store used to build the expected key from its own fields, so the
principal/incarnation check could never fail. The scope now supplies the
caller's principal and reads the serving incarnation at save and at take, so
an in-process failover on a still-open connection invalidates its tokens; a
save for a non-owner principal is refused.
- ValidateDeployed ignores every bit outside Understood (understood subset still validated); P02's two
1<<30 rows become 'tolerated, grants nothing'.
- UnknownOperationDrops: Warning + counter tagged kind=connection|export|mapping, counted once per row per
accepted artifact change; collected under each lock, logged after release. Mappings masked at Stage.
- Surfaced via DataConnectionDiagnosticsSnapshot (DroppedUnknownOperations, MappingsWithDroppedOperations)
and NodeDiagnosticsSnapshot.DroppedExportOperations.
- End-to-end test: 1<<30 through parse -> catalog compile -> mapping stage -> runtime apply.
- DataConnectionProtoContract.Validate() now runs at AddOtOpcUaDataConnections.
Covers the deployment runtime (plan site) plus two node-side validator passes the plan missed:
DeploymentArtifact data-row parse and LocalExportCatalog.Compile now use DataConnectionValidator.ValidateDeployed.
Authoring (Validate) still rejects the reserved bits.