test(grpc-data): live H05 vs pinned 0c86edc1 origin PASS 25/25 (#921) and A09 driver-failure ack revert PASS 12/12 (#927); v1 listener refuses HistoryRead PERMISSION_DENIED; evidence
This commit is contained in:
@@ -172,7 +172,7 @@ python3 scripts/validation/grpc-data/rig.py down --run-id h05v1
|
||||
and — from the tap — no consumer call but the capability probe carries the feature header and no HistoryRead/CallConditionMethod
|
||||
reaches the origin. Controls: the origin's own `counter` is historizing and its `historyread` returns rows; the consumer's v1 calls
|
||||
are in the same tap window; the probe's `--scenario history-v1-origin` sends new-shape calls (capabilities with the header are
|
||||
byte-identical to without; HistoryRead ⇒ `UNIMPLEMENTED`) and the tap records them.
|
||||
byte-identical to without; HistoryRead ⇒ `PERMISSION_DENIED`: a pre-H2 data listener admits only its six v1 methods) and the tap records them.
|
||||
|
||||
## Scenario authoring and node probes
|
||||
|
||||
|
||||
@@ -24,8 +24,9 @@ What is asserted (results: the run's restricted `evidence/H05V1-results.json`):
|
||||
Subscribe) present in the same window (control). The capability probe itself always carries the client's features
|
||||
(plan §4.1); a v1 origin ignores the header, which (6) shows byte-for-byte;
|
||||
6. tap positive control: the probe's `history-v1-origin` scenario sends new-shape calls to both pinned origins — capabilities
|
||||
with the feature header answer byte-identically to capabilities without it, a HistoryRead with the header answers
|
||||
UNIMPLEMENTED (the wire path the plan's row names) — and the tap records those arrivals with the header.
|
||||
with the feature header answer byte-identically to capabilities without it, a HistoryRead with the header is refused
|
||||
PERMISSION_DENIED (a pre-H2 data listener admits only its six v1 methods and refuses any other path before routing — not
|
||||
the UNIMPLEMENTED the plan's table guessed) — and the tap records those arrivals with the header and that status.
|
||||
"""
|
||||
import argparse
|
||||
import html
|
||||
@@ -101,9 +102,15 @@ class V1OriginGate(history_gate.HistoryGate):
|
||||
def value_read(self, node, node_id, name):
|
||||
argv = ["dotnet", str(self.runner.cli_dll), "read", "-u", self.runner.endpoint(node), "-U", "apikey", "-P", self.runner.key,
|
||||
"-n", node_id, "--max-age", "5000"]
|
||||
result = self.runner.process(argv, self.runner.active + "-" + name + "-" + uuid.uuid4().hex[:6], timeout=60)
|
||||
status = re.search(r"^Status:\s*(\S+)", result.stdout, re.M)
|
||||
return status[1] if status else None
|
||||
# As every mapped positive read on this rig: retry only an explicit BadWaitingForInitialData (README), bounded.
|
||||
end = time.monotonic() + 60
|
||||
while True:
|
||||
result = self.runner.process(argv, self.runner.active + "-" + name + "-" + uuid.uuid4().hex[:6], timeout=60)
|
||||
status = re.search(r"^Status:\s*(\S+)", result.stdout, re.M)
|
||||
observed = status[1] if status else None
|
||||
if observed != "BadWaitingForInitialData" or time.monotonic() >= end:
|
||||
return observed
|
||||
time.sleep(2)
|
||||
|
||||
def history(self, node, node_id, name):
|
||||
result = self.cli(node, ["-n", node_id, *self.window_args(), "--max", "50"], name)
|
||||
@@ -230,7 +237,7 @@ class V1OriginGate(history_gate.HistoryGate):
|
||||
self.runner.process(argv, "H05V1-probe", timeout=120)
|
||||
report = scenarios.restricted_json(output) if output.exists() else {"passed": False}
|
||||
self.detail["probe"] = report
|
||||
self.check("probe_v1_origin_capabilities_identical_and_history_read_unimplemented", report.get("passed") is True)
|
||||
self.check("probe_v1_origin_capabilities_identical_and_history_read_refused", report.get("passed") is True)
|
||||
time.sleep(1)
|
||||
after = {node: rows[before[node]:] for node, rows in self.taps().items()}
|
||||
control = {}
|
||||
@@ -244,7 +251,7 @@ class V1OriginGate(history_gate.HistoryGate):
|
||||
and self.method(row) == "GetCapabilities" and row.get("features"))}
|
||||
self.check(f"tap_recorded_probe_history_read_with_header_{node}",
|
||||
history_arrivals and all(row.get("features") == "history" for row in history_arrivals))
|
||||
self.check(f"tap_recorded_unimplemented_status_{node}", completions and all(row.get("grpcStatus") == "12" for row in completions))
|
||||
self.check(f"tap_recorded_permission_denied_status_{node}", completions and all(row.get("grpcStatus") == "7" for row in completions))
|
||||
self.detail["tap_control"] = control
|
||||
|
||||
|
||||
|
||||
@@ -466,8 +466,9 @@ try
|
||||
{
|
||||
// lmxopcua#921 (H05 against a pinned pre-H2 origin): what a NEW caller sees from a v1 origin when it asks for the
|
||||
// features. Capabilities with the full feature header are byte-identical to those without it (no history, no
|
||||
// conditions, no HistoryRead bit), and a HistoryRead with the header is answered UNIMPLEMENTED: the method does not
|
||||
// exist on that build. This deliberately sends new-shape calls, so on a wire-tapped origin it is also the tap's
|
||||
// conditions, no HistoryRead bit), and a HistoryRead with the header is refused PERMISSION_DENIED: a pre-H2 data
|
||||
// listener admits only its six v1 methods (DataConnectionEndpoints.Methods at that revision) and refuses any other
|
||||
// path before gRPC routing, so the call never reaches a handler (observed live, #921). This deliberately sends new-shape calls, so on a wire-tapped origin it is also the tap's
|
||||
// positive control (the tap must record them).
|
||||
failurePhase = ProbeFailurePhase.WireOperation;
|
||||
var fixture = root.GetProperty("fixture");
|
||||
@@ -514,7 +515,7 @@ try
|
||||
historyRead = "OK";
|
||||
}
|
||||
catch (RpcException error) { historyRead = error.StatusCode.ToString(); }
|
||||
results.Add(new("history-v1-origin-" + name, "history-v1-origin", v1Shape && identical && historyRead == "Unimplemented", 3, new()
|
||||
results.Add(new("history-v1-origin-" + name, "history-v1-origin", v1Shape && identical && historyRead == "PermissionDenied", 3, new()
|
||||
{
|
||||
["withoutHeader"] = new { operations = plain.Operations, historyPresent = plain.History is not null, conditionsPresent = plain.Conditions is not null,
|
||||
protocolMinor = plain.ProtocolMinor, bytes = plain.CalculateSize() },
|
||||
|
||||
Reference in New Issue
Block a user