From f2a9ee5d93ed1d466aa2cd199cdd0b08da0a33e4 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Fri, 24 Jul 2026 15:46:23 -0400 Subject: [PATCH] docs(mqtt): flag the Last-Will landmine at the browse-options seam A will is published by the BROKER, so it is invisible to PublishCountForTest. MqttDriverOptions carries none today, but Sparkplug NDEATH is a will message - once P2 adds it, an ungraceful browse disconnect would fire NDEATH under the plant's own edge-node identity. ToBrowseOptions is where it must be cleared. Claude-Session: https://claude.ai/code/session_01GASWkNEi68FSCtvr6rLoEW --- .../MqttDriverBrowser.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Browser/MqttDriverBrowser.cs b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Browser/MqttDriverBrowser.cs index 76194cab..ee87b9b4 100644 --- a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Browser/MqttDriverBrowser.cs +++ b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Browser/MqttDriverBrowser.cs @@ -154,6 +154,15 @@ public sealed class MqttDriverBrowser : IDriverBrowser /// Projects the authored options into the ones the browse CONNECT uses. Clean session is /// forced: a transient browse identity must not leave queued-message state behind on the /// broker after the picker closes. + /// + /// ⚠ P2 landmine — a Last Will would break the read-only guarantee from outside it. + /// MqttDriverOptions carries no will today, so there is nothing to strip. When the + /// Sparkplug tasks add one (NDEATH is a will message), it MUST be cleared here: a + /// will is published by the broker, not by us, so it is invisible to + /// — and any ungraceful end to a browse + /// session (crash, dropped link, the disconnect deadline expiring) would then fire an + /// NDEATH under the plant's own edge-node identity. + /// /// /// The authored configuration. /// The configuration the browse CONNECT is built from.