Merge #941/#942/#943: gRPC data consumer skips unbuildable browse kinds; DataExportRootAlarmBearing deploy/authoring gate; outside-grant addresses answer NotFound (GetMetadata/Read/Subscribe/condition admission)

This commit is contained in:
Joseph Doherty
2026-12-01 19:32:34 -05:00
13 changed files with 383 additions and 16 deletions
+23 -4
View File
@@ -226,12 +226,31 @@ Neither change alters the wire shape: one drops an optional field, the other dro
- The origin compiles it as an unsupported value node. GetMetadata, Read, Subscribe and HistoryRead on it answer
`Unsupported`, and writes are refused.
- **Browse does not list it**, and the same holds for any unsupported value node, such as a data type v1 cannot carry.
Every consumer build applies a browse page all or nothing and cannot materialise an `UnsupportedVariable`. Listing one
made the whole folder unbrowsable on the consumer (`BadNoCommunication`); the live gate found this.
- The node stays in the catalog, so an export rooted at it still compiles. Such a root grants nothing: the values are unsupported, and the condition sits under the tag's folder, not under the tag.
Consumer builds before #941 apply a browse page all or nothing and cannot materialise an `UnsupportedVariable`. Listing
one made the whole folder unbrowsable on the consumer (`BadNoCommunication`); the live gate found this.
- **Consumers skip what they cannot materialise (#941).** Since #941 the consumer's resolver drops a browse item whose
node kind is not `Folder` / `Variable` / `Tag`, or whose value (or array element) type has no OPC UA type on the
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`.
- 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
alarm-bearing tag: that reference has no UNS node (#896), and a deployed export rooted at it would make the node's
catalog compile refuse the whole export set. Root the export at the tag's folder, device or tag group (Raw) or at the
referencing equipment (UNS) instead; the condition is listed there. A node re-validating an already-deployed artifact
does not apply this rule.
- The alarm itself is forwarded as a **condition** (A1–A4, see "Condition forwarding end to end"). Condition placements
do not depend on the value node.
- **No existence oracle (#943).** GetMetadata, Read, Subscribe and condition-item admission answer an address that lies
outside every export of the calling principal exactly like a missing one: `NotFound`. Before, an existing address outside
the grant answered `Denied`, so a peer holding only a UNS export could probe guessed Raw-realm RawPaths and learn which
existed. `Denied` is now reserved for an address inside one of the principal's exports (its root contains it, or it is a
browsable ancestor of the root) that the export's operations, the node's operations or the origin ACL refuse. Browse
(`Denied` for an unknown or ungranted parent), Write (one rejection), HistoryRead (one `Refused` status) and condition
methods (`BadNodeIdUnknown` for an unknown or ungranted placement) already answered both cases alike.
G0, the v1 deploy and soak (#915), is still open; see the plan's §1.1.
## Remote history (runtime consumers)
@@ -713,7 +732,7 @@ status and diagnostic), and each snapshot barrier (per-mapping status, record co
| Symptom | Check |
|---|---|
| No imported conditions at all | Is `ConditionKeySecret` provisioned on the origin? The origin logs "not provisioned" once at start. Are bit 64 and `Subscribe` on the connection, mapping and export? Does the service principal have the origin ACL `Subscribe` on the placements? Is a client subscribed to events (`i=2253` or a projected folder)? Streams open only on demand. Does the consumer log show a barrier? |
| A mapping refused `Denied` / `Unavailable` | Origin export grant and ACL for the service principal. The origin is not Primary. Metadata for the remote root failed (logged). |
| A mapping refused `Denied` / `NotFound` / `Unavailable` | Origin export grant and ACL for the service principal: a remote root outside every export of the principal answers `NotFound`, like a missing one (#943). The origin is not Primary. Metadata for the remote root failed (logged). |
| `ConditionCapacity` | The listing's `total` against the mapping's or export's `MaxConditions`, and the host caps. Narrow the remote root or raise the limits. |
| Conditions `Uncertain` | The origin has not established their state: a scripted alarm has not completed an evaluation; a native driver has not signalled (see `…conditions.unsignalled`). |
| Conditions `BadNoCommunication` | Stream down longer than `ConditionStaleTimeoutMilliseconds`, or the mapping was incomplete at the last barrier. |