Merge branch 'master' into worktree-agent-aad6291e992ef79ba
This commit is contained in:
@@ -121,6 +121,8 @@ otopcua-cli read -u opc.tcp://localhost:4840/OtOpcUa -n "ns=3;s=DEV.ScanState" -
|
||||
| Flag | Description |
|
||||
|------|-------------|
|
||||
| `-n` / `--node` | Node ID to read (required) |
|
||||
| `--max-age` | Maximum cached value age in milliseconds (0–2147483647; default 0). Value attribute only |
|
||||
| `-a` / `--attribute` | Attribute to read instead of the value (case-insensitive): `Value` (default), `Historizing`, `AccessLevel`, `UserAccessLevel`, `DataType`, `ValueRank`, `ArrayDimensions`, `MinimumSamplingInterval`, `NodeClass`, `BrowseName`, `DisplayName`, `EventNotifier`. The output gains an `Attribute:` line. Used by the #921 gate to show a projected variable's `Historizing` is False when its origin lacks the history feature |
|
||||
|
||||
Output:
|
||||
|
||||
|
||||
+40
-6
@@ -194,11 +194,35 @@ advertisement and a per-call request header, `x-otopcua-data-features`, whose va
|
||||
- The new RPCs (`HistoryRead`, `CallConditionMethod`) answer `FailedPrecondition("feature not negotiated")`. A
|
||||
history-only call is also refused `CallConditionMethod`.
|
||||
- Header-less goldens (`*Goldens.cs`) and the recorded-v1-client gates (`GrpcDataV1CompatibilityTests`,
|
||||
`GrpcDataV1RealOriginCompatibilityTests`) pin the v1 bytes. Every phase ran them with an empty goldens diff.
|
||||
`GrpcDataV1RealOriginCompatibilityTests`) pin the v1 bytes. Every phase ran them with an empty goldens diff. The two
|
||||
pre-deploy corrections below are the only deliberate differences. The real-origin gate applies them to the recorded
|
||||
goldens in `GrpcDataV1RealOriginCorrections`; the goldens are never re-recorded.
|
||||
|
||||
Fix two v1 defects before any v1 deploy. #916: `stable_source_id` leaks the driver id and RawPath to UNS-only peers.
|
||||
#917: v1 exports alarm-bearing raw tags as variables that never get a value. G0, the v1 deploy and soak (#915), is still
|
||||
open; see the plan's §1.1.
|
||||
### What an origin exports (v1 corrections #916, #917)
|
||||
|
||||
v1 was merged but not deployed (#915), so two defects were fixed in v1 itself. Header-less callers get the fix too.
|
||||
Neither change alters the wire shape: one drops an optional field, the other drops a page item. Evidence: `docs/plans/evidence/grpc-data-ext/V1-916-917.md`.
|
||||
|
||||
- **No `Metadata.stable_source_id` (#916).** The origin never sends field 10. It used to carry the internal acquisition key,
|
||||
which for a driver tag is `<len>:<driverInstanceId><RawPath>`. That disclosed driver ids and RawPaths to peers holding
|
||||
only a UNS export.
|
||||
- No consumer used the field except for byte accounting, so it was dropped rather than replaced by an opaque id. A
|
||||
stable opaque id would only let a peer correlate Raw and UNS nodes.
|
||||
- The field is `optional`. Old consumers decode its absence as null, so every version mix works.
|
||||
- Conditions dedupe on the keyed `condition_key` instead.
|
||||
- Internally the origin still keys acquisition on the unchanged `BackingSourceKey`.
|
||||
- **Alarm-bearing raw tags are not exported as values (#917).** A tag with an alarm config never gets a value: the driver
|
||||
host keeps it out of the value fan-out, and #896 gives it no UNS variable.
|
||||
- The origin compiles it as an unsupported value node. GetMetadata, Read, Subscribe and HistoryRead on it answer
|
||||
`Unsupported`, and writes are refused.
|
||||
- **Browse does not list it**, and the same holds for any unsupported value node, such as a data type v1 cannot carry.
|
||||
Every consumer build applies a browse page all or nothing and cannot materialise an `UnsupportedVariable`. Listing one
|
||||
made the whole folder unbrowsable on the consumer (`BadNoCommunication`); the live gate found this.
|
||||
- The node stays in the catalog, so an export rooted at it still compiles. Such a root grants nothing: the values are unsupported, and the condition sits under the tag's folder, not under the tag.
|
||||
- The alarm itself is forwarded as a **condition** (A1–A4, see "Condition forwarding end to end"). Condition placements
|
||||
do not depend on the value node.
|
||||
|
||||
G0, the v1 deploy and soak (#915), is still open; see the plan's §1.1.
|
||||
|
||||
## Remote history (runtime consumers)
|
||||
|
||||
@@ -224,6 +248,10 @@ the bit (see "Mixed versions" below); the AdminUI editor shows a reminder.
|
||||
**Negotiation.** The capabilities probe always asks for `history`; an origin advertises it only when a historian backend
|
||||
is configured. Other calls carry the header only toward an endpoint that advertised it. An origin without a historian, a
|
||||
pre-H2 origin, or a call without the header answers unsupported — the v1 responses are unchanged.
|
||||
Live-gated against a real pre-H2 origin (#921, `docs/plans/evidence/grpc-data-ext/H05-v1-origin.md`): a pre-H2 origin
|
||||
ignores the probe's header (capabilities byte-identical with and without it), so the consumer's projected variables have
|
||||
`Historizing` False, HistoryRead answers `BadHistoryOperationUnsupported` locally, and no HistoryRead or feature-headed data
|
||||
call is sent. (Sent anyway, a HistoryRead is refused `PERMISSION_DENIED` by the old data listener's v1 method allowlist.)
|
||||
|
||||
**Limits.**
|
||||
|
||||
@@ -503,8 +531,14 @@ refresh, EventIds) is documented in [Alarm tracking § Imported conditions](Alar
|
||||
is raised on the hub.
|
||||
- `DataConnections:ConditionKnownSettle:OpcUaClient` (default 60 s) is the only backstop timer. It exists for upstreams
|
||||
without ConditionRefresh.
|
||||
- Open gaps: #924 (L4 latency for Galaxy, Heidenhain and real Logix ALMD), #925 (Galaxy deploy-added conditions stay
|
||||
unknown) and #926 (an OpcUaClient RefreshEnd can signal known over lost events).
|
||||
- Open gaps: #924 (L4 latency for Galaxy, Heidenhain and real Logix ALMD) and #925 (Galaxy deploy-added conditions stay
|
||||
unknown).
|
||||
- An OpcUaClient RefreshEnd signals only for a lossless refresh bracket (#926). Loss inside the bracket — queue
|
||||
overflow, RefreshRequired, a skipped publish gap, or a missing RefreshStart — suppresses the signal and re-runs
|
||||
ConditionRefresh, at most 3 times per episode. If every retry is lossy, the conditions stay unknown and the timeout
|
||||
diagnostic reports them. A loss after the signal **withdraws** "known" for that subscription's conditions
|
||||
(`AlarmInitialStateEventArgs.Withdrawn` ⇒ `MarkConditionsKnown(Known: false)`, F5 re-armed, no backstop) until a
|
||||
clean refresh signals again. See `docs/drivers/OpcUaClient.md`.
|
||||
|
||||
### Condition key (`DataConnections:ConditionKeySecret`)
|
||||
|
||||
|
||||
@@ -206,6 +206,17 @@ The session-less alarm feed (`GatewayGalaxyAlarmFeed`) and alarm acknowledger (`
|
||||
|
||||
Every (re)open of `StreamAlarms` replays the gateway's active-alarm snapshot. `GatewayGalaxyAlarmFeed` maps each entry to a transition flagged `IsRestatement` (#656): `Active` → `Retrigger` (upstream's unack is authoritative), `ActiveAcked` → `ActiveAcknowledged` (one atomic active+acked projection — the old `Acknowledge` mapping projected an acked alarm **inactive** on a cold host), `Inactive` → `Clear`. The host writes no `/alerts` row for a replayed entry that changes nothing the condition shows, so a gateway reconnect no longer duplicates history; live `Transition` messages are never flagged. The gateway folds UnackRtn and AckRtn into `Inactive`, so an inactive-unacked alarm cannot be distinguished at reconnect (gateway contract limit).
|
||||
|
||||
**Establishing a changed alarm subscription without a stream reopen (#925).** The driver turns each `snapshot_complete` sentinel into `IAlarmInitialStateSignal.InitialAlarmStateDelivered` (grpc-data A1) for the live alarm subscription, but a sentinel only comes when `StreamAlarms` opens. A subscription that becomes live while the stream is already past its sentinel (a re-subscribe with a changed alarm set, a reconnect that kept the session-less feed, or a change during the snapshot phase, which the sentinel cannot vouch for) would otherwise stay "unknown" (Uncertain on gRPC-data consumers) until the stream happened to reopen. The driver now re-reads the active-alarm set with the gateway's `QueryActiveAlarms` RPC instead. That RPC serves the same monitor cache as the stream's opening snapshot and needs the same `EventsRead` scope.
|
||||
- **How a re-read is applied.** The entries are replayed exactly like snapshot entries: as restatements, with the same kind mapping. The signal follows the replay, and only if the subscription the re-read was made under is still the live one.
|
||||
- **Why there are no phantom transitions.** The stream stays open. Live dispatch and the replay are serialised, so each check below and its replay happen as one step.
|
||||
- An entry is skipped when the live stream delivered a full-state message for the same alarm after the query was issued (a snapshot entry, `Raise`, `Retrigger` or `Clear`), because that message is at least as new as the query's view of it (counter `galaxy.alarm_feed.snapshot_refresh.superseded`).
|
||||
- An `Acknowledge` carries only the ack, so it is merged, not treated as superseding: an `Active` entry replays as `ActiveAcked`. Skipping it would have marked a cold condition known while it still showed inactive.
|
||||
- If a stream (re)opened while the query was in flight, the whole re-read is discarded and does not signal. An alarm that cleared in the reopen gap is simply absent from the new snapshot, so the query's entry for it would be a phantom `Active`. The reopened stream's own sentinel covers the subscription.
|
||||
- A re-read is not started while the current stream has not yet delivered its sentinel.
|
||||
- **Bounded.** One re-read runs at a time. Requests that arrive while it runs collapse into one follow-up run. A failure is retried 3 times, 5 s apart. A gateway without the RPC (`Unimplemented`) is not retried. A re-read that fails never signals: the conditions stay unknown, F5 diagnoses them, and the next stream sentinel signals as before.
|
||||
- **Residuals.** The query can be *ahead* of the stream: it can show a raise whose live `Raise` is still queued. That `Raise` then lands on an already-active condition, and the host treats it as the re-statement it is. Like every snapshot replay, the query lists active alarms only. An alarm that cleared while no subscription was live, so that its live `Clear` was dropped, is not cleared by it. This is a pre-existing limit of every snapshot replay.
|
||||
- **In practice.** A deploy that changes a Galaxy driver's alarm tags also changes its config, so the driver respawns and its fresh feed's first sentinel covers the new set (#665: there is no in-place path). The re-read is the safety net for the paths where the feed outlives the subscription.
|
||||
|
||||
## Testing
|
||||
|
||||
- **Unit tests**: `tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Tests/` — fakes the gateway gRPC surface; covers Browse, Runtime, Health, and Config in isolation.
|
||||
|
||||
@@ -449,8 +449,33 @@ initialise (the AdminUI form drops them on the next save). Pinned by
|
||||
> `Unspecified` the host wrote as "Activated", and a retained-Active host condition stayed Active). So the host writes no
|
||||
> duplicate row when its condition already shows that state (see `docs/AlarmTracking.md`). Condition **branch** events (non-null `BranchId`) are ignored.
|
||||
> **`ConditionRefresh`** is called after the event item is created, after a keep-alive outage the session survived, and on a
|
||||
> `RefreshRequired` event, so a condition already active upstream is reported at subscribe; `RefreshStart`/`RefreshEnd`
|
||||
> markers are dropped. A server without it (`BadNotSupported`/`BadMethodInvalid`/…) is logged once and tolerated.
|
||||
> `RefreshRequired` event, so a condition already active upstream is reported at subscribe. The `RefreshStart`/`RefreshEnd`
|
||||
> markers are never projected as alarms. A server without ConditionRefresh (`BadNotSupported`/`BadMethodInvalid`/…) is logged once and tolerated.
|
||||
>
|
||||
> **A RefreshEnd signals "initial alarm state delivered" only for a lossless bracket (#926).** That signal is grpc-data
|
||||
> A1's known-state signal. The driver tracks RefreshStart…RefreshEnd per alarm subscription, and the RefreshEnd does
|
||||
> not signal when any of these happened:
|
||||
>
|
||||
> - no RefreshStart was seen;
|
||||
> - the server sent an `EventQueueOverflowEventType`. That notice comes from the Server object, so it is matched before
|
||||
> the source filter, and it is never projected as an alarm;
|
||||
> - a `RefreshRequired` arrived;
|
||||
> - a delivered publish message skipped a sequence number. This catches the gap the SDK gives up on after a failed
|
||||
> republish, which the SDK reports nowhere else.
|
||||
>
|
||||
> A RefreshStart that arrives while a bracket is still open is a loss too.
|
||||
>
|
||||
> Any loss logs a Warning and re-runs ConditionRefresh on that subscription. That includes an overflow or sequence gap
|
||||
> outside a bracket, which can hold a lost live transition, and a failed ConditionRefresh call.
|
||||
>
|
||||
> - **Withdraw on a later loss:** a loss after the subscription signalled also **withdraws "known"**
|
||||
> (`AlarmInitialStateEventArgs.Withdrawn`). The host takes known back for those conditions (`Uncertain` on a
|
||||
> consumer), keeps them out of the backstop, and diagnoses them if no signal follows.
|
||||
> - **Retry bounds:** at most 3 re-refreshes run per episode, backing off 2 s, 4 s and 8 s. A clean RefreshEnd resets
|
||||
> the budget. Once the budget is spent, a further loss gets a new budget only after a 5-minute cool-down.
|
||||
> - **RefreshRequired:** its sweeps are coalesced while one is queued. The alarm event item asks for a
|
||||
> queue of 10,000 (previously 1,000); the server may revise it down. Counters on `otopcua.driver.opcuaclient.events`:
|
||||
> `alarm_event_queue_overflow` and `alarm_refresh_lossy`.
|
||||
> Last-told state survives a re-initialise (the host re-subscribes the same set over nodes it did not rebuild) and is
|
||||
> forgotten when the subscribed set changes (the host rebuilt, recreating the nodes inactive). Index keys are server-stable (`nsu=`), so a namespace reorder across a re-initialise keeps
|
||||
> matching. docker-dev seeds an opc-plc driver (`MAIN-opcua`); the alarm tag is
|
||||
|
||||
@@ -88,7 +88,7 @@ found while verifying M1 (row M1).
|
||||
| Galaxy one-shot signal per feed instance | Accepted (verified `GatewayGalaxyAlarmFeed.cs:69,140-152,168`) | §5.1: signal raised on **every** sentinel (not the one-shot task), and drivers re-signal each complete cycle, so conditions become known again after a reopen or a deploy that adds them; A1 test (vii) |
|
||||
| **Fifth pass (revision 7)** | | |
|
||||
| G1 driver-wide signal scope | Accepted (verified `FocasAlarmProjection.cs:253-276`, `AbCipAlarmProjection.cs:211`, `HeidenhainAlarmProjection.cs:214`) | §5.1: `AlarmInitialStateEventArgs.ConditionIds`; `MarkConditionsKnown` takes a condition-id set; per-host / per-node hooks in the driver table; MTConnect excludes `Unavailable`; A1 test (viii) |
|
||||
| G2 RefreshEnd ordering across publish responses | Accepted; **settled by decompiling** `Opc.Ua.Client` 2.0.1: not ordered by default (`SequentialPublishing` false; parallel workers) | §5.1: `SequentialPublishing = true` on the alarm subscription (`OpcUaClientDriver.cs:2445`); gap ⇒ no signal; A1 test (ix) |
|
||||
| G2 RefreshEnd ordering across publish responses | Accepted; **settled by decompiling** `Opc.Ua.Client` 2.0.1: not ordered by default (`SequentialPublishing` false; parallel workers) | §5.1: `SequentialPublishing = true` on the alarm subscription (`OpcUaClientDriver.cs:2445`); A1 test (ix). Loss inside the refresh bracket (EventQueueOverflow, RefreshRequired, a publish-sequence gap the SDK skipped, or a missing RefreshStart) ⇒ that RefreshEnd does not signal and ConditionRefresh is re-run, bounded (#926) |
|
||||
| G3 deferred signal outliving a dropped alarm | Accepted (verified `OpcUaPublishActor.cs:1048-1051`, `:1106-1112`) | §5.1 loss rule: a drop or skip discards that source's deferred `MarkConditionsKnown`; A1 test (x) |
|
||||
| G4 re-bind rarely holds across failover | Accepted | §5.6 step 3: client-visible behaviour stated (`BadEventIdUnknown` → `RefreshRequired` → ConditionRefresh → Good); A03 corrected |
|
||||
| G5 suppression gate | Accepted (verified `DriverInstanceActor.cs:184-188,1144-1148,2536-2541`) | §5.1: signal attached/gated with `OnAlarmEvent`; A1 test (xi) |
|
||||
@@ -476,7 +476,7 @@ conditions re-report (`NM:5639-5651`). Some state changes never produce an event
|
||||
|
||||
| Driver | Exact hook | Signal raised |
|
||||
|---|---|---|
|
||||
| Galaxy | `GatewayGalaxyAlarmFeed.cs:168`, where the gateway's `snapshot_complete` sentinel is handled in `Dispatch` on the feed thread after the snapshot entries (`:155-169`) | On **every** sentinel, covering every condition of the feed's current subscription. The existing `InitialSnapshotCompleted` task (`:69`) stays for its current users but is not the signal: it is one-shot per feed instance (the reopen loop `:140-152` does not reset it), and its `RunContinuationsAsynchronously` continuation could overtake queued transitions. After a gateway stream reopen, the reopened stream's sentinel signals again |
|
||||
| Galaxy | `GatewayGalaxyAlarmFeed.cs:168`, where the gateway's `snapshot_complete` sentinel is handled in `Dispatch` on the feed thread after the snapshot entries (`:155-169`) | On **every** sentinel, covering every condition of the feed's current subscription. The existing `InitialSnapshotCompleted` task (`:69`) stays for its current users but is not the signal: it is one-shot per feed instance (the reopen loop `:140-152` does not reset it), and its `RunContinuationsAsynchronously` continuation could overtake queued transitions. After a gateway stream reopen, the reopened stream's sentinel signals again. **#925:** a subscription that becomes live after the current stream's sentinel (or changes during its snapshot phase) is established by a `QueryActiveAlarms` re-read instead: the entries are replayed as restatements, except where a newer live message already arrived, and then the signal is raised (`docs/drivers/Galaxy.md`) |
|
||||
| OpcUaClient (**F1**, **G2**) | The per-event route that today drops `RefreshEndEventType` as a marker (`OpcUaClientDriver.cs:3066-3067`, `IsRefreshMarker` `:2860-2864`), reached from `OnEventNotification` (`:2749-2762`) | On receipt of `RefreshEndEventType`, covering every condition of that alarm subscription, after the refreshed events delivered before it were projected. **Not** when `TryConditionRefreshAsync` returns (`:2881-2900`). See G2 below for ordering across publish responses |
|
||||
| FOCAS | `FocasAlarmProjection.PollOnceAsync` per-host loop (`:243-276`): after `NoteAlarmReadSucceeded(host)` (`:273`) and that host's `Tick` (`:274`). The `continue` path for a failed host (`:253-272`) raises nothing | **Per host**: the condition ids of that host's alarm tags, after its read succeeded and its transitions were emitted. Raised again on each later successful read |
|
||||
| AbCip ALMD/ALMA | `AbCipAlarmProjection.Tick` (`:195`), called from `RunPollLoopAsync` (`:251`); a node whose `InAlarm` read is non-Good is skipped (`:211`) | **Per node**: at the end of each `Tick`, the condition ids of the nodes whose `InAlarm` (and, for ALMA, all plan refs) read Good in that tick. Skipped nodes are excluded |
|
||||
@@ -492,11 +492,39 @@ conditions re-report (`NM:5639-5651`). Some state changes never produce an event
|
||||
- So the RefreshEnd of a multi-response replay could be processed before an earlier response. A1 therefore sets
|
||||
**`SequentialPublishing = true` on the alarm subscription** (`OpcUaClientDriver.cs:2445`). The data subscriptions
|
||||
are unchanged.
|
||||
- **As implemented (A1):** there is no gap-based suppression. The SDK 2.0.1 surface the driver sees (the per-item
|
||||
`Notification` callback) exposes no per-message gap or republish failure. With `SequentialPublishing` the worker
|
||||
waits for a missing sequence number (republish) before it delivers later ones, so an ordinary gap still orders the
|
||||
RefreshEnd last. **Residual:** a gap the SDK gives up on could let a RefreshEnd signal over a lost refreshed event.
|
||||
The mitigation for notification-queue overflow and abandoned gaps is tracked in #926.
|
||||
- With `SequentialPublishing` the worker waits for a missing sequence number (republish) before it delivers later
|
||||
ones, so an ordinary (recovered) gap still orders the RefreshEnd last.
|
||||
- **As implemented (#926): a RefreshEnd signals only for a lossless RefreshStart…RefreshEnd bracket.** The driver
|
||||
tracks the bracket per alarm subscription. It does **not** signal when:
|
||||
- no RefreshStart opened the bracket (the head of the replay was discarded);
|
||||
- an `EventQueueOverflowEventType` arrived since the RefreshStart. That notice comes from the Server object, so it
|
||||
is matched by EventType **before** the source filter;
|
||||
- a `RefreshRequired` arrived since the RefreshStart;
|
||||
- a **publish-sequence gap** was seen inside the bracket. That is a delivered message whose sequence number is
|
||||
neither the previous one nor its successor; the SDK sets `EventFieldList.Message`, and the alarm subscription has
|
||||
one monitored item. This is how a gap the SDK gave up on is detected. SDK 2.0.1 reports that skip to nothing
|
||||
else: its `PublishStateChangedMask.Republish` callback fires only in a worker pass that also delivers a message,
|
||||
which the blocking gap prevents (verified by decompiling, and pinned by a real-SDK test).
|
||||
- A RefreshStart that arrives while a bracket is still open is itself a loss. It never erases the open bracket's
|
||||
loss.
|
||||
- **A loss after the signal withdraws "known"** (review r1). This covers an overflow or sequence gap outside a
|
||||
bracket, which can hold a live Raise. The driver raises `AlarmInitialStateEventArgs.Withdrawn` once per signalled
|
||||
episode, ordered like the signal. The host sends `MarkConditionsKnown(Known: false)` for exactly those
|
||||
conditions, removes them from the backstop, and puts them back in the F5 window. A clean RefreshEnd, or a
|
||||
transition, makes them known again.
|
||||
- Every loss, inside or outside a bracket, re-runs ConditionRefresh on that subscription. A failed ConditionRefresh
|
||||
call is retried the same way. The retries are bounded:
|
||||
- at most 3 per lossy episode, backing off 2 s, 4 s and 8 s;
|
||||
- a clean RefreshEnd ends the episode and resets the budget;
|
||||
- once the budget is spent, a further loss gets a new budget only after a 5-minute cool-down. So the driver
|
||||
never storms the upstream and never gives up permanently.
|
||||
- A RefreshRequired keeps its own sweep, now coalesced while one is queued.
|
||||
- With no signal, the conditions stay unknown (`Uncertain`) and F5's `ConditionKnownSignalTimeout` diagnostic
|
||||
reports them. They are never declared known-inactive, and the `Unsignalable` backstop is not used for this.
|
||||
- The alarm event item's queue is now 10,000 (it was 1,000), so overflow is rarer. The detection above is the fix.
|
||||
- Live on `opc-plc --alm` with a test-sized queue: the overflow notices reach the driver. With `DiscardOldest`
|
||||
false the RefreshEnd is itself dropped. With `DiscardOldest` true the RefreshEnd arrives over a lossy replay and
|
||||
is refused. Before the fix it signalled. Evidence: `docs/plans/evidence/grpc-data-ext/926-refresh-bracket.md`.
|
||||
- **OpcUaClient upstream without ConditionRefresh** (`:2887-2893`, "conditions already active are reported only on their
|
||||
next transition"). This is the one case with no signal at all. The driver reports `InitialStateUnsignalable` for that
|
||||
subscription, and the per-driver-type **backstop timer** (`DataConnections:ConditionKnownSettle:OpcUaClient`, default
|
||||
@@ -517,8 +545,13 @@ conditions re-report (`NM:5639-5651`). Some state changes never produce an event
|
||||
- `DriverHostActor` turns it into `MarkConditionsKnown(driverInstanceId, conditionIds)` and sends it to `OpcUaPublishActor` **after**
|
||||
the `AlarmStateUpdate`s it already forwarded (Akka preserves per-sender-pair order).
|
||||
- `OpcUaPublishActor` treats it as an alarm message. While a plan apply is in progress (`PlanPipelineBusy`) it is
|
||||
deferred beside the `AlarmStateUpdate`s (`HandleAlarmUpdate`/`DeferAlarm`) and replayed **after** the deferred
|
||||
alarms.
|
||||
deferred beside the `AlarmStateUpdate`s (`HandleAlarmUpdate`/`DeferAlarm`). **As implemented after #926 review
|
||||
r2:** the deferred alarm states, alarm qualities and marks are replayed in **arrival order** (one list, per-entry
|
||||
sequence). Marks are held per condition, so a later mark of the same condition replaces an earlier one, and
|
||||
withdrawals are bounded by the number of conditions.
|
||||
- A "known" mark still lands after the projections it summarises, because it arrived after them.
|
||||
- A withdrawal followed by a re-establishing transition now ends known, as the live path leaves it. Replaying all
|
||||
marks last had ended it unknown.
|
||||
- **Loss rule (G3).** The deferral is a bounded keyed store, not a queue. An `AlarmStateUpdate` that does not fit is
|
||||
dropped (`DeferAlarm` → `WarnDeferredOverflow`, `OpcUaPublishActor.cs:1048-1051`), and replay skips alarms outside the
|
||||
applied scope (`:1106-1112`).
|
||||
@@ -614,7 +647,9 @@ per-origin-cluster `${secret:}` of at least 32 UTF-8 bytes, identical on both pa
|
||||
- It cannot be dictionary-reversed from guessable paths. An unkeyed hash was rejected for that reason.
|
||||
- If the secret is absent, the origin advertises no `conditions` capability (fail closed, with a diagnostic).
|
||||
|
||||
> **Pre-existing v1 findings (not fixed here; filed as #916 and #917):**
|
||||
> **Pre-existing v1 findings (not fixed here; filed as #916 and #917).** *Update 2026-11-28: both are fixed in v1 before
|
||||
> deploy. `stable_source_id` is no longer sent, and alarm-bearing raw tags are no longer value nodes (not listed by Browse, `Unsupported` on every value operation). See
|
||||
> `docs/plans/evidence/grpc-data-ext/V1-916-917.md`.*
|
||||
> 1. #916 — `type:review-finding`, security: v1 already sends `stable_source_id` = driver id + RawPath on **UNS reference variables**
|
||||
> to UNS-only principals (same code path).
|
||||
> 2. #917 — `type:bug`: v1 exports alarm-bearing raw tags as `Variable` (`LocalExportCatalog.Compilation.cs:120-130` has no Alarm
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
# #926 — OpcUaClient RefreshEnd signals only for a lossless refresh bracket
|
||||
|
||||
2026-11-28. Follow-up to A1 (plan §5.1, OpcUaClient row, G2).
|
||||
|
||||
## Defect
|
||||
|
||||
A1 takes the alarm subscription's `RefreshEndEventType` as `InitialAlarmStateDelivered`. That signal declares the
|
||||
conditions it covers state-known. The driver raised it on every RefreshEnd, including one that closed a replay that had
|
||||
lost events. A condition that was active upstream could then be declared known-inactive.
|
||||
|
||||
## Ways a replay can lose events
|
||||
|
||||
- **Event-queue overflow.** The upstream inserts an `EventQueueOverflowEventType` notice. Its SourceNode is the Server
|
||||
object, so the driver's source filter dropped it, and in pass-through mode it would have been projected as an alarm.
|
||||
Where the notice lands depends on `DiscardOldest`:
|
||||
- With `DiscardOldest` false (production), the newest events, often the RefreshEnd itself, are dropped.
|
||||
- With `DiscardOldest` true, or on a server that refreshes asynchronously, the RefreshStart and the head of the
|
||||
replay are dropped, but the RefreshEnd still arrives.
|
||||
- **RefreshRequired** arriving during the replay.
|
||||
- **A publish gap the SDK gives up on.** With `SequentialPublishing` the SDK holds later messages while it republishes
|
||||
the missing one. If that republish fails (`BadMessageNotAvailable`), it skips the gap and delivers the next message.
|
||||
- Decompiling SDK 2.0.1 (`Subscription` message worker) shows that `PublishStateChangedMask.Republish` is raised only
|
||||
inside `if (messagesToDeliver != null)`.
|
||||
- So when the gap is holding every later message back, which is exactly this case, no callback fires. Verified with a
|
||||
real `Subscription`: the order was `live:1, start:2, end:4` and no Republish state was raised.
|
||||
|
||||
## Fix (`OpcUaClientDriver`)
|
||||
|
||||
**Per-subscription bracket state.** Each `RemoteAlarmSubscription` has an `AlarmRefreshBracket`, guarded by
|
||||
`_alarmStateLock`.
|
||||
|
||||
**Bracket events are matched by EventType before projection** (`RouteBracketEvent`):
|
||||
- RefreshStart opens the bracket.
|
||||
- EventQueueOverflow records a loss and requests a re-refresh.
|
||||
- RefreshRequired records a loss; its existing sweep is the re-refresh.
|
||||
- RefreshEnd signals only if the bracket was opened and saw no loss. Otherwise it logs a Warning, increments
|
||||
`alarm_refresh_lossy`, and requests a re-refresh unless one was already requested.
|
||||
|
||||
**Publish-sequence check.** `RouteAlarmEventFieldList` reads `NoteAlarmMessageSequence(efl.Message.SequenceNumber)`
|
||||
before it routes the event. The alarm subscription has one monitored item, so every message that carries data
|
||||
consumes one sequence number. Inside a bracket, a number that is neither the same as the last nor its successor
|
||||
(wrap-aware) is a loss.
|
||||
|
||||
**Bounded re-refresh.** `ScheduleAlarmRefreshRetryLocked` → `RetryAlarmRefreshAsync`:
|
||||
- At most 3 re-refreshes per episode, backing off 2 s, 4 s, then 8 s. A clean RefreshEnd resets the budget.
|
||||
- Requests are coalesced while one is pending.
|
||||
- The retry is cancelled with the session's work token, and skipped if the subscription is no longer the one
|
||||
registered.
|
||||
- When the budget is spent, one Warning is logged (it includes the revised queue size) and nothing signals. The
|
||||
conditions stay unknown (`Uncertain`) and F5's `ConditionKnownSignalTimeout` diagnostic reports them.
|
||||
`Unsignalable` is deliberately not used: it starts the backstop that marks the conditions known.
|
||||
|
||||
**Queue size.** The alarm event item's queue is now 10,000 (it was 1,000), so overflow is rarer. The detection above is
|
||||
the actual fix.
|
||||
|
||||
**New counters.** `otopcua.driver.opcuaclient.events{event=alarm_event_queue_overflow|alarm_refresh_lossy}`.
|
||||
|
||||
## Tests
|
||||
|
||||
### Unit: `OpcUaClientRefreshBracketLossTests`
|
||||
|
||||
11 tests:
|
||||
|
||||
- an overflow inside the bracket, a RefreshEnd with no RefreshStart, and a RefreshRequired inside the bracket each
|
||||
suppress the signal, and each has a positive control;
|
||||
- an overflow outside a bracket requests a re-refresh;
|
||||
- the retry bound, and the budget reset after a clean bracket;
|
||||
- a re-refresh whose own RefreshStart is lost can request the next one;
|
||||
- sequence gap, repeat, wrap and gap-outside-bracket;
|
||||
- the overflow notice is never projected;
|
||||
- queue-size pin;
|
||||
- the real-SDK abandoned gap, plus a lossless real-SDK positive control.
|
||||
|
||||
`OpcUaClientInitialAlarmStateSignalTests`: the two tests that routed a RefreshEnd with no RefreshStart now route the
|
||||
RefreshStart first. A real server always sends one, and the live latency test below passes with the new requirement.
|
||||
|
||||
### Red
|
||||
|
||||
These mutations were run as red checks:
|
||||
|
||||
- **RefreshEnd always signals:** 6 of 10 bracket tests fail.
|
||||
- **Sequence check removed:** the real-SDK gap test fails.
|
||||
- **Live:** the same always-signal mutation gives `signals=3` over lossy replays (run `discardOldest=True`, below).
|
||||
|
||||
### Live: `OpcUaClientRefreshOverflowLiveTests`
|
||||
|
||||
Run against the shared `opc-plc --alm` at `opc.tcp://10.100.0.35:50000`, read-only, using test seams for the item's queue
|
||||
size and `DiscardOldest`. No local docker, so the rig lock was not needed.
|
||||
|
||||
| Case | Overflow notices seen | Lossy RefreshEnds refused | Signals |
|
||||
|---|---|---|---|
|
||||
| `DiscardOldest=false`, queue 1 | 25 | 0 (the RefreshEnd was dropped by the server) | 0 |
|
||||
| `DiscardOldest=true`, queue 2 | 11–20 across runs | 1–3 across runs (≤ 1 + 3, bounded) | 0 |
|
||||
| Production queue (control) | 0 | 0 | signalled |
|
||||
| Mutation (always signal), `DiscardOldest=true` | 15 | — | **3** |
|
||||
|
||||
The lossy-RefreshEnd count varies because opc-plc keeps firing live alarms, which can push a RefreshEnd out of a
|
||||
2-entry queue.
|
||||
|
||||
Two observations from the runs:
|
||||
|
||||
- `DiscardOldest=false` with queue 2 produced no overflow notice and no RefreshEnd on this opc-plc. It still never
|
||||
signalled, so the outcome was safe.
|
||||
- A `MeterListener` filtered by `ReferenceEquals` on `OtOpcUaTelemetry.OpcUaClientEvents` never enabled the counter
|
||||
when that class ran alone. The instrument is published inside the type's static initializer, where the field still
|
||||
reads null. The test now reads the field before calling `Start()`.
|
||||
|
||||
`OpcUaClientAlarmSignalLatencyTests` (L4) still passes 20 out of 20 samples, which means opc-plc sends RefreshStart.
|
||||
|
||||
## Residuals
|
||||
|
||||
- **False positives.** A StatusChange-only message on the alarm subscription consumes a sequence number and reads as a
|
||||
gap. So can an SDK sequence resync after a transfer. Either costs one bounded re-refresh and is never a wrong signal.
|
||||
- **Stale RefreshEnd.** If the previous replay's lossy RefreshEnd is still in flight when a re-refresh starts, it can
|
||||
request one extra refresh. That stays inside the bound.
|
||||
- ~~**Live losses after the conditions are known.** An overflow outside a bracket is repaired by a re-refresh. A gap
|
||||
outside a bracket is not detected, but the next bracket replays the full state. In both cases conditions that are
|
||||
already known are not taken back to unknown.~~ Superseded by review round 1 (below): both are losses, re-refreshed,
|
||||
and they withdraw "known".
|
||||
|
||||
## Review round 1 (2026-11-28)
|
||||
|
||||
| # | Finding | Outcome |
|
||||
|---|---|---|
|
||||
| 1 | A sequence gap outside a bracket was detected and ignored, although it can hold a live Raise. | **Fixed.** Every newer, non-successor sequence number is a loss, inside or outside a bracket. It withdraws "known" if the subscription signalled, and requests a re-refresh from the same budget. |
|
||||
| 2 | A loss after the signal never withdrew "known". The budget was shared across episodes. | **Fixed with a new host contract.** `AlarmInitialStateEventArgs.Withdrawn` is an additive constructor flag, exclusive with `Unsignalable`. The driver raises it once per signalled episode, on the first loss, ordered like the signal. `DriverHostActor` turns it into `MarkConditionsKnown(Known: false)` for exactly those conditions (the existing withdraw primitive), removes them from the backstop, and re-adds them to the F5 pending set. The budget was already per episode, because a clean RefreshEnd resets it. A spent budget now also renews after a 5-minute cool-down (`AlarmRefreshRetryCooldown`). While spent, a loss leaves the request open (`ScheduleAlarmRefreshRetryLocked` returns false), so the post-cool-down loss can start a retry. |
|
||||
| 3 | A nested RefreshStart erased the outer bracket's loss. | **Fixed.** A Start while a bracket is open is recorded as a loss with `??=`, so it never clears the existing one. A depth counter was rejected: in the serial case a lost RefreshEnd would keep the depth above zero forever, so nothing would ever signal. |
|
||||
| 4 | A failed ConditionRefresh (at subscribe, in a sweep, or in a retry) was never retried. | **Fixed.** The catch in `TryConditionRefreshAsync` calls `NoteConditionRefreshFailed`, which uses the same bounded retry. |
|
||||
| 5 | A retry's `finally` cleared a `RetryPending` that a newer retry had set. | **Fixed** with a generation token (`RetryGeneration`). |
|
||||
| 6 | Backward sequence numbers were written back, which produced a second, false gap. | **Fixed.** A repeated or older number (wrap-aware, forward distance ≥ 2³¹) is ignored and not recorded. |
|
||||
| 7 | The RefreshRequired sweep was unbounded. | **Coalesced**: a RefreshRequired is a no-op while a sweep is queued and not yet started. It is not rate-limited, so a server that sends RefreshRequired continuously still gets back-to-back sweeps. That limit existed before this change and is reported as a follow-up. |
|
||||
|
||||
**Red checks.** One mutation per fix, each run against the new tests:
|
||||
|
||||
- M1 (gap outside a bracket ignored): `Sequence_gap_outside_a_bracket_withdraws_known_and_re_refreshes` fails.
|
||||
- M2 (no withdraw): the 3 withdraw tests fail.
|
||||
- M3 (a nested Start erases the loss): `An_overlapping_RefreshStart_does_not_erase_the_loss` fails.
|
||||
- M4 (no generation token): `A_retry_scheduled_during_a_refresh_call_keeps_coalescing` fails.
|
||||
- M5 (older numbers recorded): `An_older_sequence_number_is_ignored_and_not_recorded` fails.
|
||||
- M6 (a failed refresh is not retried): `A_failed_ConditionRefresh_is_retried_bounded` fails.
|
||||
- M7 (host ignores `Withdrawn`): Runtime `A_withdrawn_signal_takes_known_back_and_rearms_F5_until_the_next_signal` and
|
||||
`A_withdrawal_cancels_the_backstop_for_its_conditions` fail.
|
||||
|
||||
M6 goes through the `ReportRefreshFailedForTest` seam. The catch that calls it is covered by review.
|
||||
|
||||
**Residual.** If a subscription never signalled (its initial refresh is still pending), a loss withdraws nothing,
|
||||
because nothing was known.
|
||||
|
||||
## Review round 2 (2026-11-28)
|
||||
|
||||
| # | Finding | Outcome |
|
||||
|---|---|---|
|
||||
| 1 | `OpcUaPublishActor` replayed every deferred alarm first and every mark last. So a withdrawal followed by a transition, both deferred by a plan, ended **unknown** although the transition had re-established the condition, and the host no longer counted it in F5. | **Fixed.** Deferred alarm states, alarm qualities and marks replay as **one list in arrival order**. Each entry carries a sequence number, and consecutive marks of the same (source, realm, known) are batched into one sink call. The G3 out-of-scope check is a pre-pass, so a source's known marks are still discarded wherever they sit in the list. Pinned by `Deferred_alarms_and_marks_replay_in_arrival_order`, which also checks the mirror order (transition then withdrawal ends unknown). That test is red against the previous actor. |
|
||||
| 5 | The deferred-withdrawal list was "bounded by connectivity edges", which stopped being true once #926 made withdrawals routine. | **Fixed.** Deferred marks are now held **per (realm, condition)**, and the latest mark wins. Withdrawals are never dropped, and are bounded by the number of conditions. Known marks for a new condition beyond `Capacity` still overflow, as before. `A_withdrawal_beyond_the_deferral_capacity_is_never_dropped` now expects one coalesced replay instead of three (it is red against the old list). |
|
||||
| 2 | The driver looked up the subscription outside `_alarmStateLock`, so a stale record could signal or withdraw. | **Fixed.** `IsRegisteredLocked` is re-checked under the lock before a RefreshEnd signals and before a withdrawal, and both removals (`UnsubscribeAlarmsAsync`, the shutdown loop) now take the lock. There is no deterministic unit test for this race; the lock is the guarantee. |
|
||||
| 3 | A withdrawal after F5 had already raised its diagnostic did not update the diagnostic's count. | **Fixed.** The host calls `Hub.UpdateUnsignalled` when the pending set grows under a raised diagnostic. Covered by `A_withdrawal_after_the_diagnostic_updates_its_count`, which is red with the call removed. |
|
||||
| 4 | Conditions on unsignalable subscriptions never withdraw. | **Documented** in `IAlarmInitialStateSignal`. Only a source that signalled withdraws; conditions made known by the backstop stay known through a later loss. That is the backstop's own residual. |
|
||||
| 6 | The backstop test had no positive control. | **Fixed.** The sibling condition that was not withdrawn is marked known by the same backstop. |
|
||||
| — | `AlarmInitialStatePublished` serialization | A comment now says it must stay in-process: a serialized copy that lost `Withdrawn` would default it to false and turn a withdrawal into a known mark. |
|
||||
|
||||
**Found, not mine.** `OpcUaPublishActorWarmTests.A_deployed_cluster_mode_that_disagrees_with_the_local_mode_is_logged_and_counted`
|
||||
fails when run in isolation. It has the same `MeterListener` and static-initializer trap fixed in the live test above:
|
||||
it matches `ReferenceEquals(instrument, OtOpcUaTelemetry.RedundancyModeMismatch)` before that field has been initialized.
|
||||
Reported as a follow-up.
|
||||
|
||||
**Round 2 gates:**
|
||||
|
||||
- Full Release build: 0 warnings.
|
||||
- OpcUaClient.Tests: 430/430.
|
||||
- OpcUaClient.IntegrationTests: 13/13, live against opc-plc.
|
||||
- `GrpcDataV1CompatibilityTests`: 49/49.
|
||||
- Runtime.Tests: 2095 of 2100 passed and 3 were skipped.
|
||||
- The 2 failures are pre-existing; neither is caused by #926.
|
||||
- `DriverHostActorApplyingStashTests.ACompletedApply_NeverReportsAWedge` fails every time on base `05f431f5d` too. I
|
||||
confirmed this in a clean worktree at that commit.
|
||||
- `GrpcDataConfiguredDiscoveryWireTests.Bad_null_sdk_notification_cannot_borrow_unproven_sample_evidence(different_timestamp)`
|
||||
fails only under full-suite load. It passes in isolation, both on this branch and on base.
|
||||
@@ -215,6 +215,26 @@ Heidenhain legs are **blocked**: Galaxy needs the VPN and mxaccessgw, and Heiden
|
||||
sentinel, which comes only on a stream reopen. Until then F5 diagnoses it.
|
||||
- This is by design (vii): the snapshot that preceded the subscribe may have carried that alarm while it was unroutable.
|
||||
- Open question: should the driver ask the gateway for a fresh snapshot on a changed subscription set?
|
||||
**Answered by #925 (2026-11-28):** yes. mxaccessgw already serves `QueryActiveAlarms` from the same monitor cache as the
|
||||
stream snapshot, so no gateway change was needed. A subscribe on a stream that is past its sentinel, and a sentinel for
|
||||
a stream opened under an earlier subscription (F4), both trigger a re-read. The re-read is replayed as restatements; an
|
||||
entry is skipped when the live stream already delivered a newer message for that alarm. Then the live subscription is
|
||||
signalled. Re-reads are coalesced: one in flight plus one follow-up. A failed re-read is retried 3 times and never
|
||||
signals. Tests: `GalaxyAlarmSnapshotRefreshTests` (6). Each of these mutations turns a test red: no re-read on subscribe
|
||||
(5 red), no supersede check, no handle check at the signal, Unimplemented retried, no re-read at a mismatched sentinel,
|
||||
no coalescing. The F5 re-arm for deploy-added refs was already in place (`RearmConditionSignalsAfterReindex`, review
|
||||
round 1). **Not live-gated:** no Galaxy or mxaccessgw is reachable (wonder-box hold).
|
||||
**#925 review round 1:**
|
||||
- *Ack-only supersede:* a live `Acknowledge` no longer supersedes an entry. It is merged instead (Active ⇒ ActiveAcked).
|
||||
Test `An_acknowledge_during_the_reread_merges_into_its_entry_instead_of_superseding_it`. Red on the original code, and
|
||||
on either mutation: ack counted as full state, or no merge.
|
||||
- *Reopen during the query:* a stream epoch is bumped before `StreamOpened`. A changed epoch at replay time drops the
|
||||
re-read and its signal. No re-read starts before the current stream's sentinel. Test
|
||||
`A_stream_reopen_during_the_reread_drops_its_replay_and_its_signal`. Red on the original code (phantom Tank2
|
||||
Retrigger plus a second signal), and with the epoch check removed.
|
||||
- *Lows:* a dispose race returns false instead of throwing `ObjectDisposedException`. The retry wait and the RPC observe
|
||||
a teardown token, which every runtime teardown cancels. An unexpected failure no longer discards a queued follow-up.
|
||||
- Galaxy.Tests: 645 passed, 13 skipped. The 13 alarm-signal tests passed 15 runs out of 15.
|
||||
- **OpcUaClient: no signal suppression on an SDK-reported sequence gap during a refresh.** Plan G2 says such a `RefreshEnd`
|
||||
"does not signal".
|
||||
- The SDK 2.0.1 surface the driver sees (the per-item `Notification` callback) exposes no per-message gap or republish
|
||||
@@ -222,6 +242,9 @@ Heidenhain legs are **blocked**: Galaxy needs the VPN and mxaccessgw, and Heiden
|
||||
- With `SequentialPublishing` the worker waits for the missing sequence number (republish) before delivering later ones.
|
||||
- Residual: a gap the SDK gives up on could let a `RefreshEnd` signal over a lost refreshed event. **Resolved in review
|
||||
round 2:** the plan's G2 text now states what is implemented, and the overflow and gap mitigation is tracked in #926.
|
||||
- **#926 (2026-11-28) closes the residual.** The driver now detects the skipped gap itself, from the delivered message's
|
||||
sequence number. It also detects queue overflow, RefreshRequired and a missing RefreshStart inside the refresh
|
||||
bracket, and re-runs ConditionRefresh, bounded. See `926-refresh-bracket.md`.
|
||||
- **MTConnect also signals on a mid-stream `/current` re-baseline** (OUT_OF_RANGE / Agent restart), not only on the subscribe
|
||||
resync and the pump's first act. A re-baseline is a complete re-read, and without the signal a restarted Agent's
|
||||
conditions would wait for the next reconnect.
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
# #927 — live gate: driver-failure ack revert through DriverHostActor under the connection service principal
|
||||
|
||||
A2b (remote `CallConditionMethod`) had been gated live only for a scripted condition. The path where a remote ack of a
|
||||
**native** condition reaches a driver that fails it, and DriverHostActor reverts the node (`RevertNativeAlarmAck`,
|
||||
`AlarmStateUpdate(EstablishesState: false)`), was unit-tested only (`ConditionMethodNodeManagerTests`, A2.md "Driver failure
|
||||
revert seen in the stream"). This adds scenario **A09** to `scripts/validation/grpc-data/conditions_scenarios.py` and runs it.
|
||||
|
||||
## How the driver is made to fail (a real failure, no seam)
|
||||
|
||||
The conditions profile's SOURCE `OpcUaClient` driver `source-opcua` watches the run-owned `opc-plc:2.14.10 --alm` native alarm
|
||||
`EastTankYellow`. A09 `docker compose pause`s the `opcplc` container immediately before the consumer's ack. The driver is still
|
||||
`Connected` (its keep-alive has not yet noticed), so `OpcUaClientDriver.AcknowledgeAsync` sends the upstream
|
||||
`AcknowledgeableConditionType.Acknowledge` call and gets **no reply**; the SDK call fails with a `ServiceResultException`
|
||||
(request timeout) inside the 5 s ack window, `DriverInstanceActor.HandleAcknowledgeAsync` reports `AlarmAckFailed`, and
|
||||
DriverHostActor reverts. The container is unpaused in the scenario's `finally` (and again by the per-scenario restore if it
|
||||
was left paused). Pausing also freezes opc-plc's own alarm cycling, so no upstream transition can explain the
|
||||
Unacknowledged that follows the ack.
|
||||
|
||||
**Why not an upstream refusal.** The option the issue suggests — an upstream that answers the Acknowledge with a Bad status
|
||||
(stale EventId, already acked) — does **not** revert today: `OpcUaClientDriver.AcknowledgeAsync` only logs a per-ack Bad
|
||||
result (and an ack whose condition id resolves to nothing), by design (`docs/drivers/OpcUaClient.md`: "a reply still returns
|
||||
normally, including per-ack refusals … a refusal is the server answering"), to keep refusals off the AlarmAcknowledge breaker.
|
||||
`DriverOperationRefusedException` now exists for exactly that (breaker-exempt, reverts), so an upstream refusal leaving the
|
||||
node Acknowledged is a gap — reported as a follow-up, not changed here (it reverses a documented driver decision). A
|
||||
no-reply transport failure is the failure class the driver does surface, and it exercises the whole revert path.
|
||||
|
||||
## Result — run `a927-1`, 2026-11-28, HEAD `cdbbe22a9`: A09 **PASS** (12/12)
|
||||
|
||||
`rig.py up --conditions` → `seed` → 85 s → `deploy --timeout 300` → `conditions_scenarios.py --only A09` → `rig.py down`
|
||||
(0 run containers, 0 run volumes).
|
||||
|
||||
| Check | Evidence |
|
||||
|---|---|
|
||||
| native condition present on both sides, Unacknowledged | consumer `EastTankYellow` `Inactive, Unacknowledged` (opaque `ns=6;s=c1.…` id), origin `ns=2;s=opcua/opcplc/EastTankYellow` same record time |
|
||||
| caller gets Good | 15:13:40 `opcplc` paused; consumer CLI `ack` ⇒ `Acknowledge successful` (plan §5.6 step 5: native ⇒ Good, `AcceptedUnconfirmed`; the failure reaches the caller as the revert) |
|
||||
| audit records the remote call | origin `source-1`: `Data-connection condition method Acknowledge by fixture-consumer (key …) on Raw:…:opcua/opcplc/EastTankYellow op a3-…: AcceptedUnconfirmed 0x00000000; on behalf of fixture-cli` — the connection's **service principal** (`fixture-consumer`) on behalf of the end user |
|
||||
| the driver really failed | 15:13:46 `DriverInstance source-opcua: native-alarm acknowledge of opcua/opcplc/EastTankYellow failed` |
|
||||
| DriverHostActor reverted (EstablishesState: false) | 15:13:46 `DriverHost source-1:4053: … did not reach the alarm system (the upstream acknowledge failed (ServiceResultException)); reverting the condition to unacknowledged` — `RevertNativeAlarmAck` is the only producer of that line and of an `EstablishesState: false` update |
|
||||
| origin node applied, then reverted | origin Server-object events after the ack: `Inactive, Acknowledged` → `Inactive, Unacknowledged` (nothing else: upstream frozen) |
|
||||
| consumer saw the reverted delta | consumer events after the ack: `Inactive, Acknowledged` → `Inactive, Unacknowledged`; same ConditionId, a new EventId |
|
||||
| positive control | 15:13:48 unpaused; 30 s later the condition was `Active, Unacknowledged` (opc-plc had re-activated it; whether the paused call was later applied upstream is not observable from this state); a second consumer ack of the current EventId ⇒ Good and **no** new revert line in the next 15 s |
|
||||
|
||||
Evidence files (removed with the run folder; copies taken before `down`): `evidence/A4S-A09.json`, `A4S-results.md`, the CLI
|
||||
`*.process.json` logs.
|
||||
|
||||
## Not covered
|
||||
|
||||
- The upstream-refusal flavour (Bad per-ack status) — it does not revert; follow-up above.
|
||||
- `/alerts` (alarm-history) rows for the ack and its revert were not asserted.
|
||||
@@ -0,0 +1,59 @@
|
||||
# #921 — H05 live gate against a real pre-H2 (v1) origin
|
||||
|
||||
The H3 gate replaced H05 ("v1 origin ⇒ unsupported") with an origin export that drops HistoryRead (H3.md "Not verified /
|
||||
substitutions"). That removes `Historizing` before any wire call, so the plan §4.3 mixed-version row "new consumer → v1 origin"
|
||||
was never exercised live. This gate runs it against a SOURCE pair built from a pinned pre-H2 commit.
|
||||
|
||||
## Rig additions (`scripts/validation/grpc-data/`, README "Pinned pre-H2 SOURCE")
|
||||
|
||||
- `rig.py up --source-revision <sha>`: `resolve_pinned_source_revision` requires X0 `a15912539` to be an ancestor (a pre-X0
|
||||
node rejects the whole snapshot once a newer bit is authored), H2 `ef938b435` **not** to be one, and no `rpc HistoryRead` in
|
||||
that revision's `data_connection.proto`. **`0c86edc19`** (the #918 merge, between H1 and H2 on master's first-parent line)
|
||||
passes; it is post-X0 (tolerant readers, feature header parsed with `SupportedFeatures = None`), its
|
||||
`LocalDataServices.Implemented()` has no HistoryRead and its proto has no HistoryRead RPC — a genuine v1 origin.
|
||||
- The rig `git archive`s it into the run folder, adds one rig file (`node-probe/WireTap.cs`, ASP.NET Core only, compiled
|
||||
unchanged against the pinned tree) and builds the pinned tree's own Dockerfile (`compose.source-pinned.yml`). CONTROL and
|
||||
CONSUMER run this checkout. `verify_candidate` checks SOURCE stamps against the pinned revision and export hash, the other
|
||||
four against this checkout. Unit tests: `PinnedSourceRevisionTests` (6, incl. the real `0c86edc1` / H2 commits).
|
||||
- **Wire tap** (`GRPC_DATA_WIRE_TAP=1`, only on the pinned SOURCE): per data-listener request, one line at arrival (gRPC path,
|
||||
`x-otopcua-data-features` value, remote address — before authentication) and one at completion (gRPC status). No credential
|
||||
or body.
|
||||
- `Client.CLI read --attribute <name>` (new; `Historizing`, `AccessLevel`, …) for a real OPC UA attribute read.
|
||||
- `history_v1_origin_gate.py` (H05V1) and probe `--scenario history-v1-origin`.
|
||||
|
||||
## Result — run `h05v1-1`, 2026-11-28 15:20–15:26 UTC: **PASS, 25/25 checks**
|
||||
|
||||
`rig.py up --history --source-revision 0c86edc1 --timeout 1500` → `seed` → 80 s → `deploy --timeout 300` (all six nodes
|
||||
applied the HEAD-built artifact, including the pinned SOURCE pair) → `history_v1_origin_gate.py` → `down` (0 containers,
|
||||
0 volumes, 0 images left). SOURCE has a SqlServer historian and historizes `counter` (the `--history` overlay).
|
||||
|
||||
| Assertion | Observed |
|
||||
|---|---|
|
||||
| builds | `source-1/2` stamp `0c86edc194bf…` (pinned export hash `1111f654…`); `control-*`, `consumer-*` stamp HEAD `cdbbe22a9` |
|
||||
| projected Raw + UNS `counter` `Historizing` | `False` (Good) on both; `AccessLevel` = 1 (CurrentRead, no HistoryRead bit) |
|
||||
| control: origin's own `counter` | `Historizing` `True`, `AccessLevel` = 13 (HistoryRead bit set); projected value Read Good on both realms |
|
||||
| `historyread` on projected Raw / UNS `counter` | `HistoryRead of ns=4;s=p1.… failed: BadHistoryOperationUnsupported (0x80720000).` (UNS `ns=5` same) |
|
||||
| control: `historyread` on the origin's node | Good, 30–31 rows in the window |
|
||||
| diagnostics (CONSUMER page, prerendered) | `Negotiated features none (v1 behaviour) · origin history not advertised · projected history reads good 0 · uncertain 0 · bad 0` |
|
||||
| diagnostics (SOURCE page) | `Exports with dropped unknown operation bits: export-raw: HistoryRead; export-uns: HistoryRead — this node's build is older than a feature authored here; the dropped bits grant nothing until the node is upgraded.` |
|
||||
| tap, consumer window (12 arrivals, all from the two consumer containers, no other remote) | methods `GetCapabilities, Browse, GetMetadata, Read` (control: the consumer's v1 traffic is there); **no** `HistoryRead` / `CallConditionMethod`; the only arrivals carrying the feature header are the capability probes (`history,conditions`, plan §4.1: the probe always asks) |
|
||||
| tap positive control (probe `history-v1-origin`, both origins) | capabilities with `history,conditions` byte-identical to capabilities without (operations 31, no `history`, no `conditions`); a HistoryRead with header `history` arrives at the tap with that header and completes **`grpc-status 7` (PERMISSION_DENIED)** |
|
||||
|
||||
**Finding (harness expectation, not a product defect).** The first pass (same run) failed two expectations of mine, both
|
||||
corrected in the harness and re-run green:
|
||||
1. A sent HistoryRead is refused **PERMISSION_DENIED**, not the UNIMPLEMENTED the issue/plan text guessed. At `0c86edc1`,
|
||||
`DataConnectionEndpoints` admits only its six v1 methods (`GetCapabilities, Browse, GetMetadata, Read, Write, Subscribe`) on
|
||||
the data listener and refuses any other path before gRPC routing. A current consumer never sends one (the tap shows it), so
|
||||
this only affects a hand-rolled caller; documented in `DataConnections.md`.
|
||||
2. The first projected value Read answered `BadWaitingForInitialData`; the gate now retries only that status (bounded 60 s),
|
||||
as every mapped positive read on this rig does (README).
|
||||
|
||||
The re-run used `--pinned-build` (harness and probe source edited after `up`; images unchanged, probe republished).
|
||||
|
||||
Evidence (run folder removed by `down`; copies taken before): `evidence/H05V1-results.json`, `probe/source-1/wire-tap.jsonl`.
|
||||
|
||||
## Not covered
|
||||
|
||||
- Subscribe / Write from the consumer to the v1 origin did not occur in the window (the gate reads via the CLI); the H2/A2
|
||||
recorded-v1-client gates cover the header-less shapes of those calls.
|
||||
- Conditions against a v1 origin (`--conditions` with a pinned SOURCE) were not run.
|
||||
@@ -173,7 +173,7 @@ Round 3 was itself an independent (Fable) verification of the round-2 commits
|
||||
|
||||
- **H05**: the rig builds no pinned v1 image, so "v1 origin" is substituted by an origin that does not advertise history for the
|
||||
principal (export without bit 32). The v1 wire shape itself is covered by the H2 recorded-v1-client gates; the live v1-origin
|
||||
path is follow-up **#921**.
|
||||
path is follow-up **#921** — since run live against a pinned pre-H2 origin (`0c86edc1`), PASS 25/25: `H05-v1-origin.md`.
|
||||
- **H01 tie clusters**: not representable live on either backend — SqlServer `hist.Sample` PK `(TagId, SourceTimeUtc)`, QuestDB
|
||||
`DEDUP UPSERT KEYS(ts, tag)` keep one sample per timestamp. Tie paging is proven by the H1 port fuzz (10k seeds).
|
||||
- **ReadyReplica consistency** on projected history and the Gateway backend (H4) were not run.
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
# v1 pre-deploy corrections: #916 and #917
|
||||
|
||||
Two defects in gRPC data connections v1 (merged `95c5e484`, never deployed, #915), found while planning remote history and
|
||||
alarm forwarding (plan §5.2, "Pre-existing v1 findings"; N3). Both are fixed in the v1 origin catalog
|
||||
(`LocalExportCatalog.Compilation.cs`), so header-less v1 callers get the fix too. Neither changes the wire shape.
|
||||
|
||||
## #916: `Metadata.stable_source_id` disclosed driver ids and RawPaths
|
||||
|
||||
**Defect.** `Compile` put `BackingSourceKey.StableSourceId` into `Metadata.stable_source_id` (proto field 10) on every value
|
||||
node, in every realm. For a driver source that key is `SourceKey.ForDriver`'s `<len>:<driverInstanceId><driver reference>`,
|
||||
and the reference is the RawPath. So a peer holding only a UNS export learned the origin's driver instance ids and RawPaths.
|
||||
The recorded real-origin golden shows the leak: `Browse/uns` carries `8:driver-1Plant/Modbus/dev1/Speed` on the UNS Speed
|
||||
reference.
|
||||
|
||||
**Consumer-side uses of the field (all of them).** Every read of `DataMetadata.StableSourceId` / `Metadata.stable_source_id`
|
||||
in `src/`:
|
||||
|
||||
| Site | Use |
|
||||
|---|---|
|
||||
| `DataProtoMapper.EncodeMetadata` / `DecodeMetadata` | Copies it when present. Decodes absence as `null` (`HasStableSourceId`). |
|
||||
| `ProjectedProofSize.cs:21` | Byte accounting of a proof. |
|
||||
| `OtOpcUaNodeManager.cs:4439` | Byte accounting of a projected definition. |
|
||||
|
||||
Nothing dedupes on it, compares it, keys on it, or exposes it to the consumer's own OPC UA clients. It is not an OPC UA
|
||||
property, not shown in the AdminUI and not logged. `DataSourceIdentity.StableSourceId` (Core.Abstractions) has no users.
|
||||
A1–A4 dedupe conditions by the keyed `condition_key` (`ConditionKeys`), never by this field.
|
||||
|
||||
**Decision: omit the field on every export, in every realm.** We considered two alternatives:
|
||||
|
||||
- *A keyed opaque id* (HMAC like `condition_key`). Rejected. No consumer uses the field, so an opaque value would only be a
|
||||
stable cross-realm correlator: it would tell a peer holding both a Raw and a UNS export that two nodes share a source.
|
||||
It would also depend on `DataConnections:ConditionKeySecret`, which is optional, so the field would come and go with an
|
||||
unrelated setting.
|
||||
- *Omit only where the realm differs.* Rejected. A Raw export also does not need the internal key, and keeping one rule
|
||||
is simpler to audit.
|
||||
|
||||
**Mixed versions.** Field 10 is `optional`. An old consumer decodes its absence as `null` and uses it for nothing but size
|
||||
accounting, so an upgraded origin works with old consumers, and a new consumer works with an old origin (it ignores
|
||||
the value).
|
||||
|
||||
One effect to know about: consumers compare whole `DataMetadata` records, field 10 included, when they renew a
|
||||
projection (`ProjectedCatalogCache.SameMetadata`, `OtOpcUaNodeManager` projected-variable reuse). An origin pair running a
|
||||
pre-fix build on one member and this build on the other would therefore look like a metadata change at failover, and the
|
||||
node would be re-projected once. No pre-fix build was ever deployed (#915), so this cannot happen in the field.
|
||||
|
||||
The internal `BackingSourceKey` (on `LocalDataNode.Source`) is unchanged: acquisition, sample routing,
|
||||
partitioning, write routes and `SourceKey.TryDriver` still use it.
|
||||
|
||||
## #917: alarm-bearing raw tags were exported as Variables that never get a value
|
||||
|
||||
**Defect.** `Compile` added every raw tag plan as a `Variable` with Read/Subscribe/HistoryRead. An alarm-bearing tag
|
||||
(`RawTagPlan.Alarm != null`) never receives a value, because `DriverHostActor` keeps it out of the value fan-out and #896
|
||||
gives it no UNS variable. So a consumer that imported one read `BadWaitingForInitialData` forever.
|
||||
|
||||
**Are these tags now forwarded as conditions?** Yes. Since A1–A4, every alarm-bearing raw tag gets a native condition
|
||||
placement at its RawPath in Raw (parented at its device or group folder). Every UNS reference to one gets a placement at
|
||||
the reserved `Area/Line/Equipment/EffectiveName` id, parented at the equipment. Both are listed through root-scoped
|
||||
condition items and keyed by `condition_key`, and the consumer materialises them in its `mapped/conditions` namespace.
|
||||
The alarm is therefore served as a condition, never as a value.
|
||||
|
||||
**Decision: compile the tag as an unsupported value node, and do not list it in Browse.** The rule is
|
||||
`supported = plan.Alarm is null && …` in `Compile`. In `LocalDataServices.BrowseAsync`, a child with a `Source` and
|
||||
`!Supported` is skipped.
|
||||
|
||||
- **Value operations.** Every value gate already keys on `LocalDataNode.Supported`: GetMetadata, Read and Subscribe
|
||||
answer `Unsupported`, history requires `Supported`, and `DataWriteDispatchGate` refuses writes.
|
||||
- **The node stays in the catalog.** Removing it would turn a deployable `DataExport` rooted at that tag
|
||||
(`RootKind = RawTag` is valid) into a catalog compile failure ("Export has no valid origin root") for the whole cluster.
|
||||
- **Browse hides it. The live gate forced this.** The first attempt listed the tag as the existing v1
|
||||
`UnsupportedVariable` kind, on the assumption that consumers skip that kind. They do not. `ProjectedNamespaceApplier`
|
||||
hands a whole page to `IProjectedNamespacePageSink.TryApply`, and `OtOpcUaNodeManager.TryEnsureProjectedVariable`
|
||||
rejects anything that is not a Folder, Variable or Tag (`OtOpcUaNodeManager.cs:4988`). So **one** `UnsupportedVariable`
|
||||
child failed the whole page.
|
||||
- On run `fu916-1`, browsing the consumer's `remote-opc` branch (the A4 Raw mapping of the opc-plc device, which holds
|
||||
the alarm tag `EastTankYellow`) answered `BadNoCommunication`.
|
||||
- The rig's `resolve` walk hit the same status, and `deploy` timed out on "deployed catalog and OPC UA namespace
|
||||
identity".
|
||||
- Every consumer build behaves this way, including the merged v1 consumers. Listing the node would therefore break any
|
||||
mixed-version consumer. Not listing it works for all of them, because a page simply has one item fewer.
|
||||
- **The same holds for any unsupported value node**, for example a data type v1 cannot carry. A pre-existing v1 origin
|
||||
already broke consumer browse of a folder holding one, and the browse filter fixes that too.
|
||||
|
||||
Condition placements are independent of the value node. They need only their parent folder or equipment, so condition
|
||||
forwarding is unchanged. The live gate below re-proves it on the alarm tag itself.
|
||||
|
||||
## The v1 gate: goldens not re-recorded
|
||||
|
||||
`GrpcDataV1RealOriginGoldens` (recorded on `1086593a`) captured both defects. The goldens stay as recorded. The new
|
||||
`GrpcDataV1RealOriginCorrections.Expected(scenario)` applies exactly two edits to the parsed golden message and
|
||||
re-serialises it:
|
||||
|
||||
- it clears `stable_source_id` on every Metadata;
|
||||
- it removes HighTemp from the device Browse page, and makes its GetMetadata item `status = Unsupported` with no value
|
||||
and no lease.
|
||||
|
||||
The test then compares the real origin's header-less bytes with the result. Only Browse, Browse/uns and GetMetadata are
|
||||
corrected. GetCapabilities, Read, Write, Write/no-write-grant and Subscribe are compared with the raw goldens, unchanged.
|
||||
`V1_corrections_916_917_are_exact_and_the_recorded_leak_was_real` pins the method:
|
||||
|
||||
- an unedited golden re-serialises byte-identically, so an edit is the only possible difference;
|
||||
- the corrected scenarios really differ from the goldens, and the others really do not;
|
||||
- the recorded UNS browse really contains the leaked `driver-1Plant/Modbus/dev1/`, and no corrected scenario does;
|
||||
- HighTemp is the single Unsupported item in GetMetadata, and the only item dropped from the recorded device page.
|
||||
|
||||
The fake-origin gate `GrpcDataV1CompatibilityTests` is untouched and green.
|
||||
|
||||
Before the fix, the decoded diff of real-origin output against the goldens was exactly these edits: field 10 on every
|
||||
value node of Browse, Browse/uns and GetMetadata, plus the HighTemp entries.
|
||||
|
||||
## Red/green
|
||||
|
||||
| Test | Before the fix (master behaviour) | After |
|
||||
|---|---|---|
|
||||
| `GrpcDataConditionPlacementTests.No_exported_metadata_carries_the_internal_source_key_916` (60 generated topologies; encoded metadata of every node; UNS bytes searched for every driver id and RawPath; positive control: the internal key still contains them) | **Failed**: `node.Metadata.StableSourceId should be null` | Pass |
|
||||
| `GrpcDataConditionPlacementTests.An_alarm_bearing_raw_tag_is_an_UnsupportedVariable_and_keeps_its_condition_placements_917` (positive controls: a plain tag, and the same tag without its alarm config, stay supported `Variable`s; 3 placements and the Raw listing intact; an export rooted at the alarm tag compiles) | **Failed**: alarm tag `Supported` was true | Pass |
|
||||
| `GrpcDataV1RealOriginCompatibilityTests` header-less + feature-header Browse, Browse/uns, GetMetadata vs the raw goldens | Pass on master; fail with the fix | Compared with `Expected(...)`: pass |
|
||||
|
||||
Control run: with master's `src` restored over this branch's tests, the full Runtime.Tests `Feature=GrpcData` run failed
|
||||
exactly the two new tests (#916, #917). All other tests passed (1021/1023).
|
||||
|
||||
The browse filter has its own red/green. With the `LocalDataServices` skip commented out, the real-origin Browse scenario
|
||||
fails, both header-less and with the feature header (2 failures). With the skip restored, it passes.
|
||||
|
||||
## Gate runs (Release, on `70539999` + docs)
|
||||
|
||||
- Runtime.Tests `Feature=GrpcData`: **1023/1023 passed in 3 of 3 consecutive full runs.**
|
||||
- Two earlier full runs each failed one test,
|
||||
`GrpcDataConfiguredDiscoveryWireTests.Bad_null_sdk_notification_cannot_borrow_unproven_sample_evidence(different_timestamp)`:
|
||||
it expected `BadUserAccessDenied` and got `BadNoCommunication`.
|
||||
- This is the pre-existing intermittent **#920**, which reproduces on master and is being fixed separately. It passed
|
||||
40/40 in isolation here.
|
||||
- It is not touched by this change. Its fixture's nodes are all `Supported`, so the browse skip is a no-op there, and
|
||||
the test exercises SDK notification queueing, not catalog metadata.
|
||||
- The new 60-seed property test takes about 125 ms, the same order as the existing 60-seed UNS-only property test, so
|
||||
it is not a load source.
|
||||
- Host.Tests `Feature=GrpcData`: 210/210 passed. This includes `GrpcDataV1CompatibilityTests` (fake origin, untouched),
|
||||
`GrpcDataV1RealOriginCompatibilityTests` and `GrpcDataHistoryWireTests`.
|
||||
- `dotnet build -c Release` (whole solution): 0 warnings, 0 errors.
|
||||
|
||||
## Live gate (local grpc-data rig, `--conditions` profile, under the shared rig lock)
|
||||
|
||||
| Run | Build | Result |
|
||||
|---|---|---|
|
||||
| `fu916-1` | `b7ca71f1`: alarm tag listed as `UnsupportedVariable` | **Failed**, which is how the browse defect above was found. `deploy` timed out on "deployed catalog and OPC UA namespace identity". The seeder `resolve` got `BadNoCommunication`. The consumer's `remote-opc` folder answered `BadNoCommunication` to a Client.CLI browse, while the SOURCE leaves read Good on both pair members |
|
||||
| `fu916-2` | interim | Discarded. The image was built while the source tree was being edited, so `verify_candidate` refused it ("running manifest does not match current image build inputs") |
|
||||
| `fu916-3` | `70539999`: Browse skips unsupported value nodes | **PASS**, details below |
|
||||
|
||||
`fu916-3` ran `up --conditions` → `seed` → 85 s → `deploy --timeout 300` (ready) → `conditions_a3_smoke.py` → `conditions_scenarios.py` → `down`:
|
||||
|
||||
- `deploy --timeout 300` reached ready;
|
||||
- `conditions_a3_smoke.py` reported `passed: true` (origin and consumer subscribers each saw Active/Unacknowledged → Active/Acknowledged);
|
||||
- `conditions_scenarios.py` passed **A01–A08, 8/8**, `source_revision` `70539999`. A04 is the three placements of the alarm tag `EastTankYellow` (Raw `map-opc`, UNS `map-pumpa`/`map-pumpb`) and the UNS-only principal's records;
|
||||
- `down` left 0 run containers.
|
||||
|
||||
A Client.CLI browse of consumer-1 then showed `remote-opc` → `FastUInt1` only, with the alarm tag not listed. Evidence is in
|
||||
`artifacts/grpc-data/runs/fu916-3/evidence/` (`A4S-results.{json,md}`).
|
||||
|
||||
The live run does not separately probe `stable_source_id` over gRPC. #916 is pinned by the wire-level real-origin gate and
|
||||
the 60-seed property test above.
|
||||
|
||||
## Review round 1 (2026-11-28)
|
||||
|
||||
| Finding | Fix | Red/green |
|
||||
|---|---|---|
|
||||
| #916 defence in depth: the mapper still encoded field 10 if anything set it | `DataProtoMapper.EncodeMetadata` never writes field 10. `DecodeMetadata` drops it, so a consumer of a pre-fix origin never retains it in `OriginMetadata`. The proto marks field 10 deprecated in a comment (not renumbered or removed) | `GrpcDataCodecTests.Stable_source_id_is_never_encoded_and_is_dropped_on_decode_916`: red with master's mapper, green with the fix. Engineering units (field 11) are the positive control |
|
||||
| The fake-origin gate's goldens carry field 10 from its fake metadata, so the mapper change moves them | `GrpcDataV1Corrections.Expected` clears field 10 on the parsed Browse/GetMetadata goldens. That is the only edit, and the goldens are not re-recorded | `V1_correction_916_clears_only_stable_source_id`: the recording really carried field 10, an unedited golden re-serialises identically, and the other RPCs compare raw |
|
||||
| Browse page boundaries | A skipped unsupported node no longer counts against the page's scan bound. The budget timeout still bounds the call. The skip therefore never yields an empty `Complete=false` page | `GrpcDataLocalConnectionTests.Browse_skips_unsupported_value_nodes_across_page_boundaries_917`, page size 2 over `[Speed, u, u, u, v, u, v]`. Red before the fix (an empty first-continuation page). Green after: `Speed, c3, c5` each exactly once, 2 non-empty pages, completes. Positive control: the skipped nodes are addressable (`Unsupported`) |
|
||||
| Internal metadata still said an unsupported node was writable | `Add` compiles `writable &= supported` (raw tags, UNS references, virtual tags) | The #917 test fixture's alarm tag is now `ReadWrite`. `alarm.Metadata.Writable.ShouldBeFalse()` was red before the change and green after. Positive control: the same tag without its alarm is writable |
|
||||
| Stale "browsable" test doc; "an export may still be rooted at it" | Both reworded. Such a root compiles, but grants nothing: the values are unsupported, and the condition placement sits under the tag's folder, not under the tag | — |
|
||||
|
||||
A consumer receiving an empty `Complete=false` page is no longer produced by this change. It can still come from the
|
||||
pre-existing name filter. Whether the consumer resolver tolerates one was not tested end to end; it is suggested as a
|
||||
follow-up.
|
||||
|
||||
Gates after the review, Release:
|
||||
|
||||
- Commons.Tests: 513/513.
|
||||
- Runtime.Tests `Feature=GrpcData`: 1024/1024.
|
||||
- Host.Tests `Feature=GrpcData`: 211/211. This includes both v1 gates.
|
||||
- `dotnet build -c Release`: 0 warnings, 0 errors.
|
||||
@@ -220,6 +220,10 @@ pre-H2 master `1086593a`.
|
||||
2. Still expect these exact bytes **without** the header.
|
||||
3. Expect them **with** the header too, until the server advertises the feature in `SupportedFeatures`.
|
||||
4. Never re-record.
|
||||
- **Pre-deploy corrections (#916, #917; 2026-11-28).** Two deliberate v1 fixes change real-origin Browse, Browse/uns and
|
||||
GetMetadata. `GrpcDataV1RealOriginCorrections.Expected` applies exactly those edits to the parsed, unre-recorded golden:
|
||||
it clears `stable_source_id`, drops the alarm-bearing HighTemp from the device Browse page, and makes its GetMetadata
|
||||
item `Unsupported`. A test pins that the edits are the only difference. See `V1-916-917.md`.
|
||||
|
||||
## 3. Gate runs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user