docs(grpc-data): A2b evidence — tests, mutation checks, gates
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
- `1e78c64b` contract + RPC + origin (NM `TryExecuteConditionMethod`, Runtime facade, registry, audit, Galaxy rule, bits).
|
||||
- `f6c9c9d7` consumer client call, validator/AdminUI bits + Galaxy checkbox, capacity warnings at the deploy gate.
|
||||
- Tests: NM, Runtime facade + client, codecs, F/P/U, both recorded-v1 gates, manifest — committed; mutation checks done.
|
||||
- Next: phase gates (A1/H2/X0 running), solution-wide suites, live smoke (`conditions_smoke.py` remote ack), AdminUI drive.
|
||||
- Gates done (see "A2b — tests and gates"); X0 found one more test using 256 as "unknown" (fixed).
|
||||
- Next: live smoke run `a2b-cond-1` (`conditions_smoke.py` remote ack), AdminUI drive, final notes.
|
||||
|
||||
## A2b — what changed
|
||||
|
||||
@@ -96,6 +97,39 @@
|
||||
- **Standby refusal is two layers** (the TryExecute pre-check and the handler's own): mutating either alone is masked by the
|
||||
other; mutating both turns the standby test red.
|
||||
|
||||
## A2b — tests and gates
|
||||
|
||||
| Key | Project | Classes |
|
||||
|---|---|---|
|
||||
| H wire (NM) | OpcUaServer | `ConditionMethodNodeManagerTests` (8): remote native ack ⇒ exactly one origin event, routed once (principal, ApiKeyId, comment), Confirmed re-asserted, `ClientUserId` = principal; #760 revert ⇒ origin event + unacked record with the bumped marker, old marker `BadEventIdUnknown`; native AddComment stored + one event + unchanged `AlarmCommand`; scripted ack/confirm route unchanged `AlarmCommand`s; native Confirm / unknown ⇒ refused, no record; off-Primary (both kinds) and Warm Standby ⇒ refused, no state, nothing routed; T3 (message-only re-projection and a scripted re-assert keep the marker ackable; a changed-message re-raise and another incarnation ⇒ `BadEventIdUnknown`); a role-less local session is still denied (pre-authorization bound to its own context) |
|
||||
| H wire (facade) | Runtime | `GrpcDataConditionMethodTests` (17): native ack ⇒ `AcceptedUnconfirmed` + the exact NM call; capabilities bits/mask Primary only; Secondary / NM refusal ⇒ `RejectedBeforeDispatch`; Galaxy without opt-in ⇒ `BadUserAccessDenied`, NM never called (with it ⇒ accepted with the key id; Confirm-only export ⇒ no grant); UNS placement ⇒ (Raw, RawPath) condition, authorized on the EQUIPMENT grant, a raw-subject grant does not authorize it; ungranted/unknown/native Confirm/stale/expired/ACL-denied refused unsent; marker mismatch passes `BadEventIdUnknown`; duplicate id joins (one NM call, audit `Joined`), reused id ⇒ `BadInvalidArgument`; audit text sanitised + capped, audit only; sanitiser cases; listing `supported_methods` (native 3, Galaxy w/o opt-in 0, with 3, ungranted 0) |
|
||||
| H wire (consumer) | Runtime | `GrpcDataConditionMethodClientTests` (4): transport drop after send ⇒ `OutcomeUnknown`, 1 call, the second eligible endpoint never called; `conditions` header + deadline ≤ ConditionMethodTimeout; Secondary / no method / other incarnation ⇒ nothing dispatched; FAILED_PRECONDITION ⇒ `RejectedBeforeDispatch` |
|
||||
| — | Commons | `GrpcDataConditionCodecTests` (+2): RPC 8th with §4.2 numbers, request/response round trip, malformed refused, method bits without field 17 no grant; `GrpcDataProtoContractTests`, `GrpcDataHistoryCodecTests` 7 → 8 |
|
||||
| v1 gate | Host | `GrpcDataV1CompatibilityTests` (+1) / `GrpcDataV1RealOriginCompatibilityTests` (+3): both origins now grant 128/256 and implement the method port; header-less / history-only `CallConditionMethod` ⇒ FAILED_PRECONDITION, port never called; with `conditions` ⇒ served (real origin: bits 384 + mask 7, one port call); every header-less golden unchanged (`git diff master -- '*Goldens.cs'` empty) |
|
||||
| F | Configuration | `GrpcDataConditionConfigurationTests` (128/256 authorable, mapping ⊆ connection, shelve reserved, Galaxy opt-in only with AlarmAcknowledge, `DeployWarnings`), `GrpcDataReservedOperationAuthoringTests` (reserved = 512) |
|
||||
| P | Runtime | `GrpcDataConditionArtifactReadTests` (Galaxy opt-in + 128/256 ride the artifact; 512 tolerated, no grant); `GrpcDataArtifactReadTests`, `GrpcDataUnknownOperationToleranceTests`, `GrpcDataCatalogStagingTests` moved their "unknown" bit off 128/256 |
|
||||
| U | AdminUI | `GrpcDataConditionEditorTests` / `GrpcDataHistoryEditorTests`: 128/256 authorable, 512 not, Galaxy opt-in default off |
|
||||
| — | Core.Abstractions | `GrpcDataOperationToleranceTests`: Understood/Reserved/ConditionGrants pins |
|
||||
|
||||
Manifest key `A2` gained the new Runtime classes, `GrpcDataUnknownOperationToleranceTests` and an OpcUaServer entry.
|
||||
|
||||
**Mutation checks (red, then restored green):** Runtime — placement ACL check disabled ⇒ UNS-subject + ACL-denied tests red;
|
||||
Galaxy opt-in disabled ⇒ Galaxy test red; Primary check disabled ⇒ off-Primary test red. NM — activation-marker check
|
||||
disabled ⇒ revert + T3 tests red; Primary gate limited to native ⇒ Primary/standby test red; pre-authorization widened to
|
||||
any context ⇒ local-session test red (the first version of that test passed for the wrong reason — anonymous context —
|
||||
and was strengthened to a role-less authenticated identity); Warm Standby: each layer alone is masked by the other, both
|
||||
disabled ⇒ red.
|
||||
|
||||
| Gate | Result |
|
||||
|---|---|
|
||||
| `dotnet build ZB.MOM.WW.OtOpcUa.slnx` | 0 warnings, 0 errors |
|
||||
| `run-unit-phase.py` A2 / H2 / X0 | passed / passed / passed (X0 first failed on `GrpcDataCatalogStagingTests` using 256 as "unknown" — fixed) |
|
||||
| `run-unit-phase.py` A1 | **failed 3/3 phase runs on one test**, `NativeAlarmInitialStateSignalTests.A_native_transition_leaves_the_F5_pending_set_like_the_node_manager` (A1, 600 ms signal timeout vs. the transition under load; A2a hit it too, before any A2b code). The same Runtime A1 entry with the phase's own filter, Release config and runsettings passes 2/2, the class alone 3/3; A2b touches nothing on that path (DriverHostActor initial-state tracking). Recorded as a pre-existing timing flake — Q4 |
|
||||
| Host.Tests `.DataConnections.` | 205 passed (both v1 gates) |
|
||||
| Runtime.Tests (`Category!=E2E&Category!=LiveIntegration`) | 2001 passed, 3 skipped |
|
||||
| OpcUaServer.Tests (same filter) | 1447 passed, 1 skipped |
|
||||
| AdminUI / Configuration / Commons / Core.Abstractions | 2703 / 339 / 512 / 860 passed |
|
||||
|
||||
# A2a (condition streaming) — progress log and evidence
|
||||
|
||||
Stage A2a of phase A2 in `docs/plans/2026-11-23-grpc-data-connections-history-alarms-plan.md` (revision 7): condition items on
|
||||
@@ -269,6 +303,10 @@ editor modals were not driven — no bUnit, needs a browser drive in A4 or the n
|
||||
|
||||
## Questions (tracked, not asked)
|
||||
|
||||
- Q4 (A2b): `NativeAlarmInitialStateSignalTests.A_native_transition_leaves_the_F5_pending_set_like_the_node_manager` fails in
|
||||
full A1 phase runs (3/3 here, 1 in A2a) and passes alone — file a test-flake issue against A1 (600 ms signal timeout).
|
||||
- Q5 (A2b): the consumer's `ConditionMethodTimeout` is a connection-level property until A3 binds the mapping's value.
|
||||
|
||||
- Q1: Should §5.1 drop "Control NotReady" (decision 1) or should a later phase add the kind?
|
||||
- Q2: Wire `ConditionCapacityWarnings` into the deploy path (non-blocking log) — A2b or A3?
|
||||
- Q3: The probe/consumer advertise `conditions` on every capabilities probe now; an origin that advertises conditions gets
|
||||
|
||||
Reference in New Issue
Block a user