fix(mqtt): Sparkplug array and unsupported-type metrics are not bindable from the browser (R06:M-5)

The ingestor refuses array metrics and unmapped types, yet DescribeMetric still stated
their binding tuple, so a browse-commit produced a tag stuck at
BadWaitingForInitialData forever. Those leaves now state no address (the commit
refuses them) and say why in the descriptor line.

Refs #744
Claude-Session: https://claude.ai/code/session_01Ub9hGmYLQvn9XETzw7CMsT
This commit is contained in:
Joseph Doherty
2026-10-22 15:35:55 -04:00
parent d67396cc6d
commit c14a3388f1
3 changed files with 23 additions and 3 deletions
@@ -779,6 +779,13 @@ public sealed class MqttBrowseSessionTests
"Plant1/EdgeA::Profile", TestContext.Current.CancellationToken)).ShouldHaveSingleItem();
a.DriverDataType.ShouldBe(nameof(Core.Abstractions.DriverDataType.Int32)); // element type
a.IsArray.ShouldBeTrue();
// R06:M-5: the ingestor refuses array metrics ("not supported in v1"), so the browser must not
// offer one as bindable — no stated address means the browse-commit refuses it in words, instead
// of committing a tag that sits at BadWaitingForInitialData forever. The scalar control is
// SparkplugAttributes_StateTheBindingTuple_SoTheCommitNeverParsesTheNodeId.
a.AddressFields.ShouldBeNull();
a.SecurityClass.ShouldContain("not bindable");
}
[Fact]
@@ -796,6 +803,7 @@ public sealed class MqttBrowseSessionTests
Enum.TryParse<Core.Abstractions.DriverDataType>(a.DriverDataType, ignoreCase: true, out _)
.ShouldBeFalse(); // not a guessed type — unmappable, and visibly so
a.SecurityClass.ShouldContain("unsupported");
a.AddressFields.ShouldBeNull(); // R06:M-5 — labelled AND unbindable, not just labelled
}
[Fact]