255 lines
26 KiB
Markdown
255 lines
26 KiB
Markdown
# A4 evidence — code part (diagnostics, #930, #931, L1, L5)
|
||
|
||
Phase A4 of `docs/plans/2026-11-23-grpc-data-connections-history-alarms-plan.md`, 2026-11-24/25, branch `a4-code` (from master
|
||
`91438049`). Not merged, not pushed. The docs part (`DataConnections.md`, `AlarmTracking.md`, `ScriptedAlarms.md`, `security.md`)
|
||
is a separate worktree; the A01–A08 fleet scenarios are not part of this code pass.
|
||
|
||
## #930 — a permanently refused mapping no longer storms (N2), ConditionCapacity recovers (N3)
|
||
|
||
`ProjectedConditionAccess.Runner.cs`:
|
||
|
||
- **In-stream retry.** A mapping that is Unavailable (item refused, root metadata failed, snapshot timed out) or ConditionCapacity is
|
||
retried ON THE OPEN STREAM: its root is re-resolved if it never resolved, any still-open item is removed, and its item is re-added
|
||
(`AddSubscriptionItems`, a fresh command id; acks are matched on `(mapping, command id)`). The stream is no longer ended for it, so
|
||
the healthy mappings are never re-snapshotted and methods are not answered `BadNoCommunication` in a reconnect gap.
|
||
- **Backoff per mapping.** Definitive refusals (`Denied`, `NotFound`, `Unsupported`, item or root) and ConditionCapacity:
|
||
`ProjectedConditionOptions.LongRetryDelay` (new, default **5 min**) × 2ⁿ, ≤ 4×. Transient: the snapshot timeout × 2ⁿ, ≤ 8× (the old
|
||
B2 schedule). A retry whose snapshot has not completed by its deadline goes back to Unavailable (claim released); a late completion
|
||
of that item is still taken. A completed snapshot resets the retry count.
|
||
- **RefreshRequired only on a changed incomplete set.** Each barrier records the set of mappings not known; an incomplete barrier
|
||
whose set equals the previous barrier's (e.g. a stream that ended for another reason with the same mapping still refused) sends no
|
||
RefreshRequired. A mapping that completes in-stream leaves the recorded set, so a later relapse is told again.
|
||
- **T2 holds:** a retried mapping is `Pending` (unknown) while its retry runs, so nothing it might list is removed or marked
|
||
known-inactive meanwhile; a capacity mapping's retry likewise blocks removals until it is known again.
|
||
|
||
Decision: a ConditionCapacity mapping is "known-empty" while parked but "unknown" during its retry window. Conservative (removals by
|
||
other mappings in that window are held as `BadNoCommunication` instead of removed) — never the T2-unsafe direction.
|
||
|
||
## #931 — nits N4–N8
|
||
|
||
| Nit | Fix |
|
||
|---|---|
|
||
| N4 | A stream that ended before its barrier (every root failing, no Primary) backs off `ReconnectDelay × 2^(n−1)` up to the new `MaxReconnectDelay` (60 s); reset when a barrier passes. The repeated end logs at Debug after the first. |
|
||
| N5 | The ledger charges `max(Materialised, Σ known claims + max(Unlisted, Σ unknown claims))`: held-but-unlisted keys (an Unavailable mapping's stale keys) are charged beside a **known** mapping's new claim (the under-count), but overlap an **unknown** mapping's claim (it may be re-listing those very keys — no false capacity rejection of a retry). The swap commits its count via `Commit` (never refused). `SetMaterialised` now reports when the node is over a cap (logged; materialising is never refused — bounded by Σ MaxConditions). |
|
||
| N6 | `_runners` is a `ConcurrentDictionary` (mutated under `_gate` only); `CallAsync` and the diagnostics poll read a runner's `Serving` without `_gate`. No test (a lock-ordering change with no observable seam; reviewed by reading). |
|
||
| N7 | A capacity reset whose reconcile removed conditions sends no second RefreshRequired — the removal already carried one to every item that held them (the sink's §5.2 "removal + RefreshRequired"); it still asks when nothing was removed. |
|
||
| N8 | A parked (`_stopping`) runner is dropped once its removal finished (it hands over an empty set); new test observation `IsParked`. |
|
||
|
||
### Red/green (each reverted alone, the named test re-run, then restored)
|
||
|
||
| Fix | Revert | Test | Red |
|
||
|---|---|---|---|
|
||
| N2 in-stream | end the stream when a retry is due | `B2_S7_a_refused_item…` (rewritten: Add arrives, no new stream, map-b not re-applied) and `N3_a_ConditionCapacity_mapping_is_re_added_in_stream…` | both red |
|
||
| N2 unchanged set | `alreadyTold = false` | `N2_an_unchanged_incomplete_set_on_a_new_stream…` | red |
|
||
| N2 definitive | `Definitive` ignores the refusal status | `N2_a_definitive_refusal_waits_the_long_backoff…` | red |
|
||
| N4 | fixed `ReconnectDelay` | `N4_streams_that_never_reach_a_barrier_back_off_exponentially` (< 12 metadata calls in 2 s; ~40 without) | red |
|
||
| N5 | `known + unknown` (old under-count) | `N5_held_stale_keys_are_charged_beside_a_known_mappings_new_claim…` | red |
|
||
| N7 | `if (outcome.Refresh) RequireRefresh()` | `B1_an_in_stream_re_snapshot_over_capacity…` (now asserts one RefreshRequired per reset: the removal's) | red |
|
||
| N8 | continuation never removes the parked entry | `N8_a_stopped_runner_is_not_kept_parked…` | red |
|
||
|
||
Also new: `N3_a_retry_still_over_capacity_stays_ConditionCapacity…` (backoff doubles, map-b's key never removed).
|
||
|
||
Test-only fix found on the way: the condition-access tests waited for `BarriersCompleted` and then asserted RefreshRequired, but the
|
||
barrier count moves before the barrier's refresh (the A4 manifest's first run caught it in `N2_an_unchanged…`); they now wait for
|
||
the refresh itself, with the third stream's refresh as the positive control for the second stream's absence.
|
||
|
||
## Diagnostics and metrics (plan §6)
|
||
|
||
- **`Runtime/DataConnections/DataConnectionConditionDiagnostics.cs`** (new DI singleton, no dependencies — the H4 shape): shared by
|
||
the origin condition items (`ConditionItemStream`, via `LocalDataServices.ConditionDiagnostics`), the consumer runtime
|
||
(`ProjectedConditionAccess.Diagnostics`) and the readers (`DataConnectionDeploymentRuntime.ConditionDiagnostics`, `DriverHostActor`).
|
||
The condition hub's unsignalled count is attached at DI time (no lazy-composition gap like H4 review 2).
|
||
- **Metrics** (OtOpcUa meter, every one with `side` = origin | consumer, no ids): `otopcua.dataconn.conditions.items{side}`
|
||
(consumer side new: one per acked mapping item), `…conditions.resyncs{side}`, `…conditions.capacity_rejections{side}`,
|
||
`…condition_methods{method,outcome,side}` (consumer side new: every forwarded call), and the new
|
||
`otopcua.dataconn.conditions.refresh_required{side=consumer}`. The A2 instruments were **reused** (only `side` added).
|
||
- **Contracts** (Commons, additive optional members; older senders ⇒ null = "unavailable"): `DataConnectionDiagnosticsSnapshot.Conditions`
|
||
(`ConsumerConditionDiagnostics`: stream state idle|connecting|snapshotting|live, last snapshot, materialised, `state_known=false`
|
||
count, RefreshRequired, resyncs, capacity rejections, per mapping status / observed / MaxConditions / refusal, node budget vs host
|
||
cap, method outcome classes), `NodeDiagnosticsSnapshot.OriginConditions` (`OriginConditionDiagnostics`: open items, the item
|
||
nearest its limit, last snapshot, resyncs, capacity rejections, unsignalled, methods served). Arrays in production (H4 Akka JSON
|
||
note); no bool flag was added.
|
||
- **AdminUI** `ClusterDataConnections.razor` (already in `<PageErrorBoundary>`) + `DataConnectionDiagnostics` helpers: an
|
||
"Imported conditions" line per connection (notice style when a mapping is Unavailable/ConditionCapacity or any count ≥ 80 % of its
|
||
limit) and a served-conditions segment in the origin panel.
|
||
|
||
Decisions: the consumer RefreshRequired count is requests made by the runtime (explicit + each removal batch), not per client item;
|
||
method outcome classes: DriverConfirmedSuccess = succeeded, RejectedBeforeDispatch = rejected, DriverConfirmedFailure = failed, the
|
||
rest (AcceptedUnconfirmed, OutcomeUnknown) = unknown. A method the node manager refuses before forwarding (no local grant) is not
|
||
counted on the consumer side.
|
||
|
||
Tests: Runtime `GrpcDataConditionDiagnosticsTests` (3), `GrpcDataConditionDiagnosticsSerializationTests` (2: cluster-serializer
|
||
round trip; an older payload decodes `Conditions`/`OriginConditions` null), `GrpcDataProjectedConditionAccessTests.A4_consumer_diagnostics…`;
|
||
AdminUI `GrpcDataConditionDiagnosticsDisplayTests` (4). Manifest key `A4` in `unit-phases.json`.
|
||
|
||
## AdminUI live — run `a4c-cond-1` (prerendered HTML from control-1's admin, login disabled)
|
||
|
||
`/clusters/CONSUMER/data-connections` after the smoke:
|
||
- consumer-1: "Imported conditions: stream live · last snapshot 2026-11-25 04:44:51Z · conditions 1 (state unknown 0) · node budget
|
||
1/2500 · RefreshRequired 0 · resyncs 0 · capacity rejections 0 · methods succeeded 1 · … · mappings map-raw Complete 0/1000;
|
||
map-uns Complete 1/1000".
|
||
- consumer-2 (no event subscriber): "stream idle · … · mappings map-raw Pending 0/1000; map-uns Pending 0/1000".
|
||
- origin panel for consumer-1/2: "condition items open 0 · last snapshot none since start · … · state unknown (unsignalled) 0".
|
||
|
||
`/clusters/SOURCE/data-connections` origin panel: source-1 "condition items open 2 · largest listing 1/1000 · last snapshot
|
||
2026-11-25 04:44:51Z · resyncs 0 · capacity rejections 0 · state unknown (unsignalled) 0 · methods served succeeded 1"; source-2
|
||
(Secondary) zeros. `/metrics`: consumer-1 `conditions_items{side="consumer"} 2`, `condition_methods_total{method="Acknowledge",
|
||
outcome="DriverConfirmedSuccess",side="consumer"} 1`; source-1 `conditions_items{side="origin"} 2`, the same method series with
|
||
`side="origin"` 1 — page and metrics agree. Not driven in a browser (Chrome tools not used); prerender runs the same render.
|
||
|
||
## L1 — origin `SnapshotConditions` Lock hold (§9.3) — PASS (A1 had not measured it)
|
||
|
||
`A1-core.md`/`A1-L4.md` record only L4 (X0 measured a field copy outside the server). Measured now with the opt-in harness
|
||
`OpcUaServer.Tests/ConditionSnapshotLockHoldMeasurementTests` (`OTOPCUA_L1=1`): a running SDK server, 1,000 native conditions +
|
||
500 variables, two publisher threads (`WriteValue`, `WriteAlarmCondition`, both under `Lock`), 500 snapshots after 20 warm-up. The
|
||
hold is an upper bound (keys-enumerated hook → post-hold hook; 1,000 = one hold at `DefaultMaxConditionsPerHold`). macOS (developer Mac),
|
||
Debug build:
|
||
|
||
| Run | hold p50 / p99 / max (ms) | WriteValue p99 / max (ms) | WriteAlarmCondition p99 / max (ms) |
|
||
|---|---|---|---|
|
||
| 1 | 1.61 / 4.65 / 5.89 | 1.93 / 6.39 | 1.94 / 6.42 |
|
||
| 2 | 1.44 / 4.32 / 5.00 | 1.71 / 6.34 | 1.71 / 6.38 |
|
||
| 3 | 1.45 / 4.53 / 5.90 | 1.65 / 6.81 | 1.66 / 6.76 |
|
||
|
||
p99 ≤ 10 ms and no publish delayed > 50 ms: **pass**. In-process, not on docker-dev (deviation: the brief allowed in-process).
|
||
|
||
## L5 — condition counts vs defaults
|
||
|
||
- **docker-dev export** (run `a4c-cond-1`, from the new diagnostics): map-raw 0/1000, map-uns 1/1000 (0.1 %); consumer node
|
||
1/2500 conditions (host caps 122,500 nodes / 400 MiB ⇒ 2,500); origin largest listing 1/1000. All ≤ 80 %: **pass**, defaults unchanged.
|
||
- **Production export: BLOCKED.** No production ConfigDb is reachable read-only from configuration in the repo (production
|
||
ConfigDbs are on the wonder boxes, which this brief forbids touching), and the data-connections feature is not deployed in
|
||
production (v1 merged, undeployed), so no production export exists to count yet. To be filed.
|
||
|
||
## Gates (at `a4-code` HEAD)
|
||
|
||
| Gate | Result |
|
||
|---|---|
|
||
| `dotnet build ZB.MOM.WW.OtOpcUa.slnx --no-incremental` | 0 warnings, 0 errors |
|
||
| `run-unit-phase.py A4` (new) | passed (`20261125T040920…`) |
|
||
| `run-unit-phase.py A3` / `A1` / `H4` / `X0` | passed |
|
||
| `run-unit-phase.py A2` | first run failed `Overflow_before_the_snapshot_is_drained_resets_the_stream` (below); re-run passed (`20261125T042208…`) |
|
||
| Host.Tests `.DataConnections.` | 207 passed |
|
||
| Runtime.Tests full (`Category!=E2E&Category!=LiveIntegration`) | 2066 passed, 3 skipped, 2 failed: `GrpcDataConfiguredDiscoveryWireTests` (#920) and `Overflow_before_…` (below) |
|
||
| OpcUaServer.Tests full | 1458 passed, 2 skipped (the L1 harness is one) |
|
||
| AdminUI.Tests full | 2707 passed |
|
||
| OI combined (139) | 138 passed, 1 skipped |
|
||
| Live `conditions_a3_smoke.py`, run `a4c-cond-1` | `passed: true` (imported ScalarHigh `ns=6;s=c1.…`, 32-char EventId; bogus EventId ⇒ BadEventIdUnknown; ack via consumer 635 ms; exactly one Active/Acknowledged on origin and consumer); `rig.py down` ⇒ 0 run containers / networks |
|
||
| `git diff master -- '*Goldens.cs'` | empty |
|
||
| Configuration.Tests | not touched |
|
||
|
||
## #928 — `Overflow_before_the_snapshot_is_drained_resets_the_stream`: a test asserting one of two legal outcomes (b)
|
||
|
||
**Classification (b): test defect, no product change.** The origin item notices a hub eviction only when it next reads the hub,
|
||
which it does not do while it is producing snapshot chunks. At that read it takes one of two paths
|
||
(`ConditionItemStream.ReadDeltas`):
|
||
|
||
- the previous snapshot's last chunk is still undelivered (`_deliveredSnapshot < Snapshots`) ⇒ `Overflowed` ⇒ the session sends a
|
||
stream `Reset` ("Condition stream overflow; retry later.");
|
||
- otherwise ⇒ `ResetSnapshot`: a fresh snapshot (new begin) on the same stream, counted as a resync.
|
||
|
||
Both are what A2 specified (A2.md "Overflow" item 3: "a hub reader reset ⇒ the item re-snapshots … a reset while the item's previous
|
||
snapshot is still undelivered ⇒ stream `Reset`"). Which one an eviction **during** a long delivery gets depends on whether the pump
|
||
reads the hub before the session commits the last chunk (`DirectReader.MoveNextAsync` commits before returning the frame, so a
|
||
consumer that has caught up commits it first). Neither loses a change. The Reset path makes the consumer reconnect and take a
|
||
complete snapshot. The silent path's new snapshot is taken from the source, so it includes every evicted change. The A3 consumer
|
||
(`ProjectedConditionAccess.Runner.cs`, the `IsSnapshot && Total` branch and the `SnapshotComplete` swap) buffers any snapshot begin into
|
||
a new `ConditionSet`, keeps applying live deltas to both, and at `snapshot_complete` swaps it in as a **full replacement**: old ∪ new
|
||
keys are re-merged and a key only the old set listed is removed. So a silent re-snapshot is safe, and the Overflowed rule protects the
|
||
snapshot memory lease and back-pressure (no snapshot is taken behind an undelivered one). It is not a correctness signal the consumer
|
||
depends on.
|
||
|
||
**Evidence (instrumented copy of the test, alone, a4-code):** 3,000 records came in chunks of **51** records, not the 24 × ~125 the
|
||
test comment assumed: since A2 review S5 (`20bf9372`) the chunk budget is min(256 KiB, `MaxPendingBytes` = 200,000 in the fixture,
|
||
`MaxMessageBytes`), and a record with info estimates ≈ 3.9 KB. Frames #1–#59 were snapshot 1 (`complete` on #59). #60 was a new
|
||
begin (`total=3000`), then snapshot 2 was complete at #120, with `Snapshots=2, Resets=1, Overflowed=false` and no Reset control. So the
|
||
test waited for a Reset that the legal silent path never sends. The original contract test, with its outcome instrumented, took the
|
||
silent path **10/10** alone.
|
||
|
||
**Why it "started" failing:** it did not. Neither `ConditionItemStream.cs`, `DataSubscriptionSession.Conditions.cs` nor the test changed
|
||
between the A2 merge (`83c7e586`) and master `91438049` (A3 touched only consumer files). At `83c7e586` (detached worktree, built
|
||
clean) the test **fails 3/3 alone** but its class (22 tests) passes. It has been order- and JIT-warmth-dependent since S5 made
|
||
the snapshot 59 chunks. A2 gated it only inside the class or suite. A3 and A4 add tests and change the scheduling of suite runs, so
|
||
full-suite failures became more frequent.
|
||
|
||
**Fix (tests only, `GrpcDataConditionStreamTests.cs`):**
|
||
|
||
1. `Overflow_before_the_snapshot_is_drained_resets_the_stream` is now **deterministic**. 300 records (begin + 6 chunks) fit the
|
||
16-frame condition queue. The consumer reads nothing after the ack. The test waits until the snapshot is taken and charged
|
||
(`ChargedBytes > 0`, so the start cursor precedes the raises), raises 6 times (capacity 2 ⇒ eviction above the cursor), ticks
|
||
until `Overflowed`, and then asserts the `Reset` ("overflow") and `Snapshots == 1`.
|
||
2. New `An_eviction_during_a_long_snapshot_delivery_resets_or_resnapshots_without_losing_a_change` keeps the 3,000-record race and
|
||
asserts the contract for **either** outcome. On Reset ⇒ `Overflowed`, and a reconnected stream's complete snapshot (3,000) holds the
|
||
source's final state for the raised condition. On re-snapshot ⇒ begin `total=3000`, only snapshot chunks until `snapshot_complete`,
|
||
3,000 records with the final state, `Resets == 1`, `Snapshots == 2`, `Overflowed == false`, and the stream not ended. Any other
|
||
outcome fails.
|
||
|
||
**Red/green (mutations of `ConditionItemStream.ReadDeltas`, each restored):**
|
||
|
||
| Mutation | Deterministic Overflow test | Contract test |
|
||
|---|---|---|
|
||
| none | green 10/10 alone | green 10/10 alone (silent path 10/10) |
|
||
| M1: Overflowed rule disabled (`false && …`) | **red** (`Condition not reached` — no Reset) | green (silent path, which is legal) |
|
||
| M2: eviction swallowed (`_cursors[p] = read.Floor; continue`), Overflowed kept | green (Overflowed still set) | green (took the Reset path) |
|
||
| M3: eviction swallowed **and** no Overflowed (a lost change) | **red** | **red** ("Neither a Reset nor a fresh snapshot.") |
|
||
|
||
**Gates after the #928 fix + docs reconcile** (tests + docs, and one XML doc comment in `RemoteNamespaceMapping.cs`; no
|
||
behaviour change, so OpcUaServer.Tests full and the live smoke were not re-run):
|
||
|
||
| Gate | Result |
|
||
|---|---|
|
||
| `dotnet build ZB.MOM.WW.OtOpcUa.slnx --no-incremental` | 0 warnings, 0 errors |
|
||
| The two #928 tests alone, 10× | 10/10 green |
|
||
| `run-unit-phase.py A2` / `A3` / `A4` | passed (`20261125T050036…`, `20261125T050157…`, `20261125T050252…`) |
|
||
| Runtime.Tests full (`Category!=E2E&Category!=LiveIntegration`) | 2068 passed, 3 skipped, 1 failed: `GrpcDataConfiguredDiscoveryWireTests.Two_sdk_cadences_…` (#920), which passed when re-run alone |
|
||
| Host.Tests `.DataConnections.` | 207 passed |
|
||
|
||
## Left over
|
||
|
||
- File: production L5 count (blocked, above). #928 resolved above (test defect, tests fixed).
|
||
- Not done here: A01–A08, reviewer approval, the ScadaBridge consumer-impact record, docs (other worktree).
|
||
|
||
## Review round 1
|
||
|
||
Review written at `3be51e3b` (approve-with-changes: 1 blocker, 4 should-fix, NITs). Fixed on `a4-code` after `b2fab8b07`.
|
||
"Red" = the fix reverted alone (scratch copy, file restored afterwards), the named test re-run alone.
|
||
|
||
| Finding | Outcome | Test | Red when reverted |
|
||
|---|---|---|---|
|
||
| **B1** second capacity reset reused `"remove-{mapping}"` ⇒ transport refuses it, stream ends | Fixed: `"remove-{mapping}-{guid}"`. Every command id the runner builds was checked: `open` (once per stream), `retry-{mapping}-{guid}`, `remove-retry-{guid}`, and the new `remove-late-{guid}` (S2) are unique. The test fake (`FakeStream.SendAsync`) now **refuses any command id already used on the stream**, as `GrpcDataConnection` does (`_usedCommands`) — this is what hid the defect. | `N3_a_retry_still_over_capacity…` (+ asserts no new stream and two removes) | **red** (the strict fake alone, before the fix, and the fix reverted) |
|
||
| **S1** retry timeout dropped buffer + claim, so a retry snapshot slower than the timeout never completed | Fixed: a retry deadline keeps the buffer and claim, like the initial barrier timeout; the late completion swaps in. The buffer (and its claim) are dropped only when the next retry removes the item and re-adds it. Comment, `RetryDueAsync` doc and `DataConnections.md` now say so. | `R1_S1_a_retry_snapshot_slower_than_the_timeout_still_completes_late…` | **red** |
|
||
| **S2** a late ack after the retry was replaced left an orphaned origin item; re-adds refused `InvalidArgument` forever | Fixed both ways: (1) a command replaced before its ack is remembered (`Superseded`, ≤ 8 per mapping); a late Good ack of it sends `RemoveSubscriptionItems` for that handle at once; (2) backstop: 3 consecutive `InvalidArgument` refusals of a mapping's in-stream re-adds end the stream (`MaxInvalidArgumentRefusals`). | `R1_S2_a_late_ack_of_a_superseded_retry_removes_the_orphaned_origin_item…` (fake origin acks retry #1 after #2 was sent); `R1_S2_consecutive_InvalidArgument_refusals…backstop` | **red** / **red** |
|
||
| **S3** N5 overlap allowance let another mapping's held stale keys count as overlap, exceeding the host caps | Fixed: an unknown mapping's claim is reduced only by the held-unlisted keys **it** listed when last known on this runner (`_lastListed`, kept only while it has no committed set; `HeldOverlap`). Charge = `max(Materialised, known + Unlisted + Σunknown − min(Unlisted, Σ min(claim, overlap)))`. `Unlisted` is now reset to everything held at each stream start (nothing contributes yet) — before, it carried the last barrier's value (0 after a complete one), which is how the review's counter-example got in on a new stream. Residual (documented in `DataConnections.md`): a mapping whose origin retired its old keys and lists new ones, while another mapping is unknown, can exceed by at most its own previous count until known; logged and on the AdminUI budget line. | `R1_S3_another_mappings_held_stale_keys_are_not_overlap…` (the review's counter-example at 3-condition scale); `N5_…` still green | **red** (old formula) |
|
||
| **S4** SourceName depended on runtime mapping status | **Decision: keep SourceName stable.** `Merge` remembers per key the mapping that chose its SourceName; while that mapping is deployed, higher in the deployed order, and merely not contributing (refused / Unavailable / retrying / ConditionCapacity / Pending on a new stream), the held SourceName is kept. Placements and notifiers still follow the contributing mappings (visibility unchanged: SourceName is a display field, no access decision reads it); no removal or known-inactive decision involved (T2 unaffected). It moves when that mapping is known again and no longer lists the key, when it is no longer deployed (new runner ⇒ recomputed: the A3 "disabling the primary mapping moves SourceName" behaviour holds), or when a higher-priority mapping lists the key. Residual: a key first seen while the Raw mapping is unavailable starts with the UNS SourceName. `AlarmTracking.md` and `A4-docs.md` ScadaBridge item 1 updated (add both cases to ScadaBridge#147). | `R1_S4_SourceName_stays_on_the_deployed_primary…` (with a positive control: Raw known again without the key ⇒ moves) | **red** |
|
||
| Docs: DataConnections step 5 / follow-ups / metrics `side` + `refresh_required` | Already fixed by `b2fab8b07`; verified. Line on retry timeout corrected (S1), S2/S3 behaviour and the resync definition added. | — | — |
|
||
| Docs: AlarmTracking RefreshRequired "every incomplete barrier" | Fixed: only when the incomplete set changed (#930). | — | — |
|
||
| Docs: ScriptedAlarms "accepted and routed" vs DataConnections "applied" | Code (`LocalDataServices.ConditionMethods.cs`): scripted ⇒ `DriverConfirmedSuccess` when the origin's handler applied it; native ⇒ `AcceptedUnconfirmed`. `ScriptedAlarms.md` now says "applied" (DataConnections.md table was already right). | — | — |
|
||
| Docs: A4-docs.md stale `Runner.cs` citations | Updated to current lines (`:703`, `:521`, `:951`, `:955-962`, `:966-974`). | — | — |
|
||
| Metric descriptions said "on this origin" | `OtOpcUaTelemetry.cs` descriptions for items / resyncs / capacity_rejections / condition_methods name both sides. | — | — |
|
||
| NIT `resyncs{side=consumer}` over-count | Fixed: counted only for a stream that opened. | `R1_NIT_consumer_resyncs_count_streams_that_opened…` (+ positive control) | **red** |
|
||
| NIT AdminUI null-safety | `ConditionsNeedAttention` uses `Mappings?.`; `MethodCounts` takes null ⇒ "unavailable". | AdminUI `A_partial_payload_without_mappings_or_methods_renders…` | **red** (HEAD file) |
|
||
| NIT misplaced doc comments | `NearLimit` has one summary; `HasDrops` has its `#919` summary back. | — | — |
|
||
| NIT in-loop `ResolveRootsAsync` stall (≤ 10 s) | **Not fixed — recorded, #934.** Moving it off the loop changes the loop's concurrency shape (a second wake source, results applied on the loop); frames are delayed, not lost. | — | — |
|
||
| NIT unpruned `_consumer` map | Fixed: `RetainConsumers` on every mapping change drops connections no deployed mapping references. | `R1_NIT_consumer_counters_of_a_removed_connection_are_pruned` | **red** |
|
||
| NIT permanent removal block | Filed as #933 (not fixed here, per brief). | — | — |
|
||
| NIT L1 measured on macOS Debug | Accepted as recorded. | — | — |
|
||
|
||
Commits: `c93290d0` (runner fixes + tests), `0cac09ce` (AdminUI, metric descriptions, docs), this evidence commit. Follow-up filed:
|
||
#934 (in-loop root re-resolve).
|
||
|
||
### Gates after review round 1
|
||
|
||
| Gate | Result |
|
||
|---|---|
|
||
| `dotnet build ZB.MOM.WW.OtOpcUa.slnx --no-incremental` | 0 warnings, 0 errors |
|
||
| `run-unit-phase.py A4` / `A3` / `A2` / `A1` / `X0` | passed (`20261125T052352…`, `…052438…`, `…052546…`, `…052655…`, `…053025…`) |
|
||
| Host.Tests `.DataConnections.` | 207 passed |
|
||
| Runtime.Tests full (`Category!=E2E&Category!=LiveIntegration`) | 2076 passed, 3 skipped, 0 failed (#920 did not fire) |
|
||
| OpcUaServer.Tests full | 1458 passed, 2 skipped |
|
||
| AdminUI.Tests full | 2708 passed |
|
||
| OI combined (`Feature=GrpcData` + ConditionMethodEvent / NativeAlarmEventIdentityFieldDelivery / FolderConditionRefresh / ConditionRefreshDeferral), once | 138 passed, 1 skipped (opt-in L2 harness) |
|
||
| Live `conditions_a3_smoke.py`, run `a4r1-cond-1` | `passed: true` (all 7 checks; imported `ns=6;s=c1.…`, 32-char EventId; bogus EventId ⇒ BadEventIdUnknown; ack 597 ms; exactly one Active/Acknowledged on origin and consumer) |
|
||
| AdminUI `/clusters/{CONSUMER,SOURCE}/data-connections` (curl, control-1 admin) | 200 both; consumer-1 "Imported conditions: stream live · … · resyncs 0 · … · methods succeeded 1 · … · mappings map-raw Complete 0/1000; map-uns Complete 1/1000"; source-1 "condition items open 2 · largest listing 1/1000 · … · methods served succeeded 1" |
|
||
| `rig.py down` | 0 run containers / networks |
|
||
| `git diff master -- '*Goldens.cs'` | empty |
|