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
+10
View File
@@ -247,6 +247,16 @@ Neither change alters the wire shape: one drops an optional field, the other dro
consumer (`Guid`, `Bytes`), instead of failing the page. The item never reaches the projection cache or the address
space. A malformed item of a supported kind (rank, dimensions and element kind disagree) still fails the page closed.
An empty `Complete = false` page, which the origin's name filter can produce, is paged through by SDK `BrowseNext`.
- **Version skew: an unknown enum number fails one item, not the response (#956).** A value-kind or array-element-kind
number this build does not define (a data type a newer origin added) decodes to an *unknown-kind marker*
(`DataMetadata.HasUnknownKind`) instead of throwing in `DataProtoMapper.DecodeMetadata`, which used to fail the whole
browse page or metadata batch before the resolver could skip anything. The resolver skips the marker whatever its node
kind (a `Folder` included), a remote root carrying it is refused, and it can never be validated, re-encoded or granted.
A per-item metadata **status** this build does not define reads as that item's `Unavailable` (no value, no lease); the
rest of the batch is unaffected. Still malformed and still failing the response: `Unspecified` (0) for any of these, an
array whose rank and dimensions disagree, an element kind on a known scalar, an unknown **realm** (an item's realm must
equal the requested parent's), and an unknown browse-**branch** status (the page fails `Unavailable` either way). Node
kinds are strings and operation bits are masked to the understood set, so neither needed a change.
- The node stays in the catalog, so a deployed export rooted at it still compiles, but it grants nothing: the values are
unsupported, and the condition sits under the tag's folder, not under the tag. **Authoring and the deploy gate refuse
such an export (#942, `DataExportRootAlarmBearing`)**, and likewise one rooted at a `UnsTagReference` to an