fix(grpc-data): an unknown value/element kind or per-item metadata status from a newer origin fails one item, not the whole browse/metadata response (#956)

DataProtoMapper.DecodeMetadata decodes an undefined ValueKind / ArrayElementKind number to an unknown-kind
marker (DataMetadata.HasUnknownKind, ValidateDecoded) instead of throwing; Validate/Encode still refuse it.
The resolver's #941 IsMaterialisable skips the marker whatever its node kind (a Folder included); a remote
root carrying it is refused. An undefined per-item metadata status decodes to Unavailable (no value, no lease).
Unspecified (0), bad array shape, unknown realm and unknown branch status still fail closed.
This commit is contained in:
Joseph Doherty
2026-12-01 20:20:15 -05:00
parent 92da56c071
commit e66f072121
7 changed files with 195 additions and 5 deletions
@@ -22,6 +22,8 @@ public sealed partial class GrpcDataConfiguredDiscoveryWireTests
[InlineData("Method", DataValueKind.Null)] // a node kind a newer origin might add
[InlineData("Variable", DataValueKind.Guid)] // a value kind the consumer has no OPC UA type for
[InlineData("Variable", DataValueKind.Bytes)]
[InlineData("Variable", (DataValueKind)99)] // #956: a value-kind number a newer origin added (decoded as a marker)
[InlineData("Folder", (DataValueKind)99)] // #956: even a Folder — a supported node kind — is skipped, not Validate()d
public async Task A_child_of_an_unmaterialisable_kind_is_skipped_not_the_whole_folder_941(string nodeKind, DataValueKind valueKind)
{
using var origin = new LocalDataFixture(additionalRawNodes: 2, servingGeneration: 1);