diff --git a/scripts/validation/grpc-data/probe/Program.cs b/scripts/validation/grpc-data/probe/Program.cs index f4f968116..70d3cfec4 100644 --- a/scripts/validation/grpc-data/probe/Program.cs +++ b/scripts/validation/grpc-data/probe/Program.cs @@ -219,8 +219,12 @@ try catch (RpcException error) { deniedRpc = error.StatusCode.ToString(); } var otherCaps = await client.GetCapabilitiesAsync(new() { ProtocolMajor = 1, ProtocolMinor = 3 }, With(otherKey, true), deadline()); var identical = denied is not null && Shape(unhist).AsSpan().SequenceEqual(Shape(denied)); + // Review fix 7a: a peer without a HistoryRead grant sees `history` (the origin has a historian) but no aggregates, + // resolution 0 and no bit 32. + var noGrantShape = otherCaps.History is not null && otherCaps.History.Aggregates.Count == 0 + && otherCaps.History.TimestampResolutionTicks == 0 && (otherCaps.Operations & 32) == 0; var deniedOk = deniedExpect == "permission-denied" - ? deniedRpc == "PermissionDenied" + ? deniedRpc == "PermissionDenied" && noGrantShape : denied is not null && denied.StatusCode == 0x80720000u && identical; string? precondition = null; try { await client.HistoryReadAsync(Raw(View(historized), null), With(key, false), deadline()); precondition = "OK"; } @@ -231,7 +235,8 @@ try ["unhistorized"] = new { statusCode = Hex(unhist.StatusCode), unhist.Samples.Count, unhist.HasContinuation, unhist.HasDiagnostic, bytes = Convert.ToHexString(Shape(unhist)) }, ["deniedExpect"] = deniedExpect, ["deniedPrincipal"] = denied is null ? new { rpcStatus = deniedRpc } : (object)new { statusCode = Hex(denied.StatusCode), denied.Samples.Count, denied.HasContinuation, denied.HasDiagnostic, bytes = Convert.ToHexString(Shape(denied)) }, - ["deniedPrincipalCapabilities"] = new { operations = otherCaps.Operations, historyPresent = otherCaps.History is not null }, + ["deniedPrincipalCapabilities"] = new { operations = otherCaps.Operations, historyPresent = otherCaps.History is not null, + history = otherCaps.History?.ToString(), noGrantShape }, ["byteIdentical"] = identical, ["withoutFeatureHeader"] = precondition, }));