fix(adminui): a Sparkplug metric whose name contains / cannot be browse-committed #509

Open
opened 2026-07-27 13:50:29 -04:00 by dohertj2 · 0 comments
Owner

Browse-commit derives the raw tag Name from the Sparkplug metric name. A tag Name is a RawPath segment
and may not contain /; a Sparkplug metricName legitimately may. So committing a browsed metric such as
Node Control/Rebirth is refused whole, with Row N: Name must not contain '/'.

This blocks a spec-mandatory metric. Node Control/Rebirth is required by the Sparkplug B spec on every
edge node, so the one metric an operator is most likely to browse for is the one that cannot be committed.

Current behaviour is safe, not silent — the commit is refused in words and nothing is mis-bound. The
workaround works: author the tag by manual entry with a /-free Name and type the slashed metricName
into the Sparkplug tag editor, which accepts it. So this is a usability defect, not a correctness one.

Fix. The commit mapper should derive a /-free Name (e.g. replace / with _, or take the last segment)
while carrying the original slashed string through as metricName — the two fields already exist
separately and only the derivation conflates them. Sanitising must not collide two distinct metrics onto one
Name; if it would, refuse that pair specifically rather than the whole batch.

Relevant: src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Uns/RawBrowseCommitMapper.cs.

Acceptance. Browsing the simulator and committing Node Control/Rebirth produces a tag whose Name is
/-free and whose metricName is the exact spec string, and reading it live returns the metric's value.

Browse-commit derives the raw **tag Name** from the Sparkplug metric name. A tag Name is a **RawPath segment** and may not contain `/`; a Sparkplug `metricName` legitimately may. So committing a browsed metric such as `Node Control/Rebirth` is refused **whole**, with `Row N: Name must not contain '/'`. **This blocks a spec-mandatory metric.** `Node Control/Rebirth` is required by the Sparkplug B spec on every edge node, so the one metric an operator is most likely to browse for is the one that cannot be committed. **Current behaviour is safe, not silent** — the commit is refused in words and nothing is mis-bound. The **workaround works**: author the tag by manual entry with a `/`-free Name and type the slashed `metricName` into the Sparkplug tag editor, which accepts it. So this is a usability defect, not a correctness one. **Fix.** The commit mapper should derive a `/`-free Name (e.g. replace `/` with `_`, or take the last segment) while carrying the **original** slashed string through as `metricName` — the two fields already exist separately and only the derivation conflates them. Sanitising must not collide two distinct metrics onto one Name; if it would, refuse that pair specifically rather than the whole batch. Relevant: `src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Uns/RawBrowseCommitMapper.cs`. **Acceptance.** Browsing the simulator and committing `Node Control/Rebirth` produces a tag whose Name is `/`-free and whose `metricName` is the exact spec string, and reading it live returns the metric's value.
dohertj2 added the driver/mqtt label 2026-07-27 13:50:29 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#509