Commit Graph

5181 Commits

Author SHA1 Message Date
Joseph Doherty e7cacd2ac9 feat(grpc-data): H2 origin HistoryRead ingress, header gating, LocalDataConnection history
Service: HistoryRead rpc; history (field 16, Metadata.history, bit 32) emitted only on a call whose header requested
history AND whose origin can serve it, otherwise stripped to the v1 shape; un-negotiated HistoryRead is
FAILED_PRECONDITION. Origin: Implemented(target) grows by HistoryRead when a historian backend is configured;
per-item gate catalog -> export grant + origin ACL HistoryRead -> tagname, every refusal the same
BadHistoryOperationUnsupported; per-principal admission (BadTooManyOperations), per-page ceiling, response-byte chunking
with single-use chunk tokens; one session per (principal, credential, HTTP/2 connection) cleared on close; wiring
faults BadInternalError + error log; caller cancel never a backend outcome. DataOperationPolicy maps HistoryRead.
2026-11-23 20:42:51 -05:00
Joseph Doherty b6895c19d4 feat(grpc-data): H2 AddDataConnectionHistory schema; authoring accepts HistoryRead
Migration per plan 6 (HistoryTimeoutMilliseconds 30000; MaxConcurrentHistoryReads 4, MaxHistoryValuesPerPage
10000, MaxHistoryResponseBytes 4 MiB; MaxHistoryAssemblyBytesPerRequest 16 MiB) with non-null defaults and widened
check constraints. Validator known set grows by HistoryRead (mapping bits still subset of connection bits; history
limits positive); scope revision includes the history timeout.
2026-11-23 20:38:31 -05:00
Joseph Doherty 9d194a7e97 feat(grpc-data): H2 SDK-free origin history facade over the H1 port
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.
2026-11-23 20:36:02 -05:00
Joseph Doherty 619b0c378d feat(grpc-data): H2 history wire contract and codecs; HistoryRead understood
HistoryRead rpc + HistoryCapabilities (16) / HistoryInfo (14) per plan 4.2; DataHistoryProtoMapper keeps the full
uint32 status, ns Timestamps, absent start/end/sample timestamps, verbatim aggregate configuration, and BadTypeMismatch
for a value kind disagreeing with the catalog. DataOperationSets.Understood gains HistoryRead; X0 tripwire replaced.
2026-11-23 20:33:26 -05:00
Joseph Doherty 1086593ab6 Merge H1: origin history port at override level
v2-ci / unit-tests (push) Has been cancelled
Phase H1 of docs/plans/2026-11-23-grpc-data-connections-history-alarms-plan.md.
HistoryRead (Raw/Processed/AtTime) logic extracted from the SDK overrides into
HistoryReadPort; overrides become adapters; continuation binding re-keyed to
(realm, identifier, namespace tag); unwired PeerHistoryContinuationStore; SDK-free
IDataHistoryService contract. Zero local behaviour change (legacy history suites
unchanged), 10k-seed paging fuzz clean. Three Fable passes.
2026-11-23 20:20:46 -05:00
Joseph Doherty 4c29eaf266 docs(grpc-data): H1 evidence 2026-11-23 20:20:38 -05:00
Joseph Doherty efea401915 test(grpc-data): H1 override paging over a real Session, override-path cross-kind refusal, deterministic limiter holder (verification 4-6, 7a) 2026-11-23 20:10:18 -05:00
Joseph Doherty 100dd5ca44 fix(grpc-data): H1 peer takes consume before verifying, scopes snapshot the incarnation per request, wiring faults are BadInternalError (verification 1-3, 7b)
- 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.
2026-11-23 20:09:01 -05:00
Joseph Doherty 6c70c93c62 docs(grpc-data): H1 review notes for H2/H3 (details resend, store lifecycle, off-thread port, IVT/facade, transport chunking) 2026-11-23 19:54:08 -05:00
Joseph Doherty cfc051de21 test(grpc-data): H1 port coverage for index mapping, modified paging, limiter, deadline/cancel and the real session store (review 7) 2026-11-23 19:53:41 -05:00
Joseph Doherty 111c9c3566 fix(grpc-data): H1 history logs keep {NodeId} a NodeId on the local path (review 5) 2026-11-23 19:51:06 -05:00
Joseph Doherty 19a7c7af01 fix(grpc-data): H1 cursors bind an opaque namespace/view tag besides (realm, identifier) (review 2)
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.
2026-11-23 19:49:59 -05:00
Joseph Doherty 1bacabb24f fix(grpc-data): H1 peer cursors bind the caller's principal and the live serving incarnation (review 3)
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.
2026-11-23 19:47:17 -05:00
Joseph Doherty e04a8b419e fix(grpc-data): H1 details hash formats every field invariant-culture (review 4) 2026-11-23 19:45:55 -05:00
Joseph Doherty 561e6de52b test(grpc-data): H1 port fuzz holds every page to NumValuesPerNode, bounds included (review 6) 2026-11-23 19:45:14 -05:00
Joseph Doherty 7f32edf036 fix(grpc-data): H1 port outcome Status passes GoodNoData through (review 1) 2026-11-23 19:44:52 -05:00
Joseph Doherty b68c0a9af1 test(grpc-data): H1 unit-phase manifest key (new classes + existing history classes) 2026-11-23 19:36:21 -05:00
Joseph Doherty 4ac019754f feat(grpc-data): H1 SDK-free IDataHistoryService contract in Core.Abstractions 2026-11-23 19:36:21 -05:00
Joseph Doherty b530692abb test(grpc-data): H1 port-vs-override parity cases and 10k-seed paged-vs-unpaged port fuzz 2026-11-23 19:36:21 -05:00
Joseph Doherty 8f59c0c6bc test(grpc-data): H1 PeerHistoryContinuationStore binding, expiry, eviction and token tests 2026-11-23 19:36:21 -05:00
Joseph Doherty 4e6b1eb127 feat(grpc-data): H1 override-level history port; SDK HistoryRead overrides become adapters
Raw/modified, Processed and AtTime serving (aggregate refusals incl. #897 and
SupportsAggregateFor, non-default AggregateConfiguration, modified+bounds
BadInvalidArgument, batch limiter, deadline, continuation binding, value
normalisation) now runs through OtOpcUaNodeManager.ReadHistory, addressed by
(realm, identifier) instead of SDK node handles. Continuation cursors are
re-keyed from the NodeId string to (realm, identifier). Adds the production
PeerHistoryContinuationStore (per principal + incarnation, random 16-byte
single-use tokens, 60 s idle expiry, oldest-idle eviction) for H2.
2026-11-23 19:36:21 -05:00
Joseph Doherty a15912539f Merge X0: gRPC data tolerant readers, contract reservation, per-RPC feature header
v2-ci / unit-tests (push) Has been cancelled
Phase X0 of docs/plans/2026-11-23-grpc-data-connections-history-alarms-plan.md.
Unknown DataOperations bits are dropped fail-closed (and counted) at the runtime,
decoders, artifact parse and catalog compile; bits 32-512 reserved; proto fields
reserved with descriptor golden tests; x-otopcua-data-features parsed on every RPC
(effective set empty); recorded-v1-client gate byte-identical. Two Fable passes,
approve. Follow-ups #918, #919.
2026-11-23 19:12:04 -05:00
Joseph Doherty 4ded3b004b docs(grpc-data): X0 evidence — final review round results, follow-ups #918 #919 2026-11-23 19:11:59 -05:00
Joseph Doherty 87c9f9c0b4 fix(grpc-data): X0 inert all-unknown export rule no longer lowers the principal's limits; ValidateDeployed doc 2026-11-23 19:01:53 -05:00
Joseph Doherty 5453c20d94 fix(grpc-data): X0 report dropped mapping bits only for enabled mappings (every mapping is still masked) 2026-11-23 19:01:53 -05:00
Joseph Doherty 9b29a5f652 test(grpc-data): X0 v1 gate pins Write without a write grant (per-item RejectedBeforeDispatch bytes, recorded on the pre-X0 service) 2026-11-23 19:00:41 -05:00
Joseph Doherty ffa70287ac docs(grpc-data): X0 gate results on 981c60784 after review fixes 2026-11-23 18:55:55 -05:00
Joseph Doherty 981c60784c docs(grpc-data): X0 review - real vs faked layers of the v1 gate, extension rule, extra tolerance sites, drop counter semantics 2026-11-23 18:28:53 -05:00
Joseph Doherty 4c03d9025d test(grpc-data): X0 review - reservations pin message type, cardinality and oneof 2026-11-23 18:28:48 -05:00
Joseph Doherty dac185a963 test(grpc-data): X0 review - v1 gate drives the service from golden request hex and pins rejection statuses 2026-11-23 18:28:48 -05:00
Joseph Doherty 4d29d539d8 feat(grpc-data): X0 review - tolerate any unknown bit at the artifact/catalog seam; drop diagnostics for exports and mappings
- 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.
2026-11-23 18:28:48 -05:00
Joseph Doherty 59a1654dfe docs(grpc-data): X0 gate results 2026-11-23 18:14:06 -05:00
Joseph Doherty d89bc86194 docs(grpc-data): X0 evidence (rev-4 investigations + scratch harness) and mixed-version rollout note 2026-11-23 17:52:54 -05:00
Joseph Doherty f441549a9e test(grpc-data): X0 unit-phase manifest key 2026-11-23 17:52:54 -05:00
Joseph Doherty 75cf5eb8f7 fix(grpc-data): X0 node-side re-validation tolerates only the reserved bits; runtime logger via init property
P02 GrpcDataArtifactReadTests pins an arbitrary bit (1<<30) as a malformed row that fails closed; keep that and
tolerate only DataOperationSets.Reserved. P07 GrpcDataHotRouteContinuityTests reflects over the runtime constructor
shape, so the logger moves from a ctor parameter to an init property.
2026-11-23 17:52:54 -05:00
Joseph Doherty a5ef7ea6d8 feat(grpc-data): X0 node-side tolerant readers drop unknown operation bits per row (counted) instead of rejecting the snapshot
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.
2026-11-23 17:21:35 -05:00
Joseph Doherty d96eafd138 feat(grpc-data): X0 consumer derives x-otopcua-data-features per selected endpoint; never sent in X0 2026-11-23 17:21:35 -05:00
Joseph Doherty 331350e2f4 feat(grpc-data): X0 server parses x-otopcua-data-features on every RPC and records requested/effective (effective always empty) 2026-11-23 17:16:24 -05:00
Joseph Doherty 984b1e122a feat(grpc-data): X0 tolerant metadata decode, feature header contract, proto field reservations with golden tests 2026-11-23 17:15:32 -05:00
Joseph Doherty d3a2002db1 feat(grpc-data): X0 reserve DataOperations bits 32-512, DataOperationSets authority, DataFeatures; capabilities mask unknown bits 2026-11-23 17:15:32 -05:00
Joseph Doherty 3279a7f9db test(grpc-data): X0 recorded-v1-client compatibility gate, goldens captured on pre-X0 master 2e4e4063 2026-11-23 17:11:59 -05:00
Joseph Doherty 2e4e4063fd docs(plans): history+alarms plan rev 6-7 (F1-F6, G1-G5); Fable fifth pass
v2-ci / unit-tests (push) Waiting to run
RefreshEnd as the OpcUaClient known-signal with SequentialPublishing; signals
ordered behind alarm events incl. the deploy-deferral queue; real poll/document
signals for FOCAS/AbCip/Heidenhain/MTConnect; per-device signal scope (G1);
never-arriving signal stays Uncertain; activation marker on any un-ack edge;
EventId behaviour across origin failover made explicit. Fifth Fable pass:
X0 + H approved, A approved with one change (G1, now folded in).
2026-11-23 16:58:45 -05:00
Joseph Doherty 9a977a74fa docs(plans): history+alarms plan rev 5 (T1-T3, m-T4..m-T7); Fable fourth pass
v2-ci / unit-tests (push) Has been cancelled
MarkConditionsKnown delta, input/driver-signal-based known state with
per-driver timer backstop, origin activation marker, cluster-wide condition
key. Fourth Fable pass: X0 + H approved; A approved with changes (F1-F2 Major,
F3-F6) — small A1 edits.
2026-11-23 16:50:22 -05:00
Joseph Doherty 310b42e3fc docs(plans): history+alarms plan rev 4 — settle B5, node budget, state_known; Fable third pass
v2-ci / unit-tests (push) Has been cancelled
B5 settled: OtOpcUaNodeManager implements ICallAsyncNodeManager.CallAsync for
imported conditions, awaiting the owner with no Lock (verified against SDK
2.0.1). 48-49 nodes / ~157 KiB per imported condition; budgets recomputed.
state_known mechanism named; live measurements L1-L5 listed (§9.3). Third
Fable pass: X0 + H approved; A approved with changes (T1-T3). Pre-existing v1
defects: #916, #917.
2026-11-23 16:37:49 -05:00
Joseph Doherty 10a18ebd77 docs(plans): history+alarms plan rev 3 — fold in second Fable pass (N1-N8), settle Q1/Q2
v2-ci / unit-tests (push) Has been cancelled
Owner snapshot from live conditions (not the event callback); root-scoped
condition subscription; realm-local placement with a keyed condition_key;
NodeIds keyed on (connection, condition_key) so re-homing never changes them;
dedicated condition budgets; sixth mask site; repeated v1-client gates.
Q1: condition streams run under the connection service principal, re-gated per
local caller. Q2: re-home is NodeId-stable; unavoidable changes are accepted
as remove+add+RefreshRequired. Pre-existing v1 stable_source_id leak: #916.
2026-11-23 16:23:14 -05:00
Joseph Doherty 274d629fb4 docs(plans): gRPC data connections remote history + alarm forwarding plan, with Fable review
v2-ci / unit-tests (push) Waiting to run
Multi-phase plan (X0 preflight, H1-H4 remote HistoryRead, A1-A4 alarm/condition
forwarding); relay deferred to a separate design (§8). Two Fable review passes:
history approved, alarms approved with changes (N1-N5 to fold in before A1).
The 14-day v1 soak (G0) is a deferred, non-blocking deploy gate: #915.
2026-11-23 15:38:35 -05:00
Joseph Doherty 649f2ecd22 docs(index): bring docs/README.md up to date
v2-ci / unit-tests (push) Waiting to run
Full driver list (all 13 driver docs + fixtures) instead of Galaxy only and
'eight shipped drivers'; Raw/UNS dual namespace, roles, cluster mesh, data
connections and pluggable historian in the platform overview; index the
previously unlisted Raw, Telemetry, Historian, ui-consistency-validation and
v2 component docs; v1 archive links grouped.
2026-11-23 12:27:39 -05:00
Joseph Doherty 90ca3046c5 docs(readme): bring the top-level README up to date
v2-ci / unit-tests (push) Has been cancelled
Full driver set (Heidenhain, MTConnect, Sql, Calculation; Sparkplug B shipped),
Raw/UNS dual namespace, fused role-gated Host + Akka clusters, gRPC data
connections, pluggable historian backends (Gateway/SqlServer/QuestDb),
OpcUa:EnabledSecurityProfiles, docker-dev quick start, -Roles install, current
NodeId forms, and a complete docs index.
2026-11-23 12:26:21 -05:00
Joseph Doherty 1c3a500cd5 docs(plans): grpc data connections design status — merged 95c5e484, not deployed
v2-ci / unit-tests (push) Has been cancelled
2026-11-23 12:22:00 -05:00
Joseph Doherty 95c5e4843c Merge branch 'codex/grpc-data-connections': gRPC data connections between nodes and clusters (Raw/UNS mapped browse, read, write, subscribe)
v2-ci / unit-tests (push) Waiting to run
2026-11-23 12:20:16 -05:00