test(grpc-data): H3 gate — Float32 legs in H01/H03, H06 origin refusal over the wire

Seed profile historizes a Float32 (registers 30..31) driven through two values;
H01/H03 compare its projected rows/types with the origin (Good Singles). H06(a)
also reads the denied and the unhistorized node through the consumer's deployed
connection (node probe) so the origin's per-item refusal itself is compared,
not only the metadata that drops the access bit.
This commit is contained in:
Joseph Doherty
2026-11-24 01:51:01 -05:00
parent 86c0934ad6
commit f26b12085f
2 changed files with 47 additions and 5 deletions
+7 -1
View File
@@ -359,12 +359,18 @@ try
TagConfig = history
? """{"region":"HoldingRegisters","address":40,"dataType":"String","stringLength":16,"writable":true,"isHistorized":true}"""
: """{"region":"HoldingRegisters","address":40,"dataType":"String","stringLength":16,"writable":true}""" });
if (history)
// H3 review: a historized Float32 (two registers 30..31, big-endian), so the gate proves a backend that stores Double
// still reads Good Singles through the projection.
db.Tags.Add(new() { TagRowId = Guid.NewGuid(), TagId = "source-flt", DeviceId = "source-device", Name = "flt", DataType = "Float",
AccessLevel = TagAccessLevel.ReadWrite, WriteIdempotent = false, PollGroupId = "source-fast",
TagConfig = """{"region":"HoldingRegisters","address":30,"dataType":"Float32","writable":true,"isHistorized":true}""" });
db.UnsAreas.Add(new() { UnsAreaRowId = Guid.NewGuid(), UnsAreaId = "source-area", ClusterId = "SOURCE", Name = "area" });
db.UnsLines.Add(new() { UnsLineRowId = Guid.NewGuid(), UnsLineId = "source-line", UnsAreaId = "source-area", Name = "line" });
var uuid = Guid.NewGuid();
var equipment = DraftValidator.DeriveEquipmentId(uuid);
db.Equipment.Add(new() { EquipmentRowId = Guid.NewGuid(), EquipmentId = equipment, EquipmentUuid = uuid, UnsLineId = "source-line", Name = "plc", MachineCode = "fixture-plc" });
foreach (var name in new[] { "counter", "scalar", "array0", "array1", "array2", "vector", "text" })
foreach (var name in new[] { "counter", "scalar", "array0", "array1", "array2", "vector", "text" }.Concat(history ? ["flt"] : []))
db.UnsTagReferences.Add(new() { UnsTagReferenceRowId = Guid.NewGuid(), UnsTagReferenceId = "ref-" + name, EquipmentId = equipment, TagId = "source-" + name });
db.NodeAcls.Add(new() { NodeAclRowId = Guid.NewGuid(), NodeAclId = "source-peer", ClusterId = "SOURCE", Principal = "fixture-consumer",
ScopeKind = NodeAclScopeKind.Cluster, PermissionFlags = NodePermissions.Admin });