From ffc5d75a58b3bc8dafbdb2c8af475448fadf2c2a Mon Sep 17 00:00:00 2001 From: Jack Kingsman Date: Wed, 18 Mar 2026 17:46:10 -0700 Subject: [PATCH] Use the actual remoteterm version for the client_version tag so letsmesh rollups work better --- app/fanout/community_mqtt.py | 4 ++-- tests/test_community_mqtt.py | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/fanout/community_mqtt.py b/app/fanout/community_mqtt.py index eae5c42..d726c7f 100644 --- a/app/fanout/community_mqtt.py +++ b/app/fanout/community_mqtt.py @@ -260,8 +260,8 @@ def _build_radio_info() -> str: def _get_client_version() -> str: - """Return a client version string like ``'RemoteTerm 2.4.0'``.""" - return f"RemoteTerm {get_app_build_info().version}" + """Return the app version string for community MQTT payloads.""" + return get_app_build_info().version class CommunityMqttPublisher(BaseMqttPublisher): diff --git a/tests/test_community_mqtt.py b/tests/test_community_mqtt.py index 855362c..b98a60c 100644 --- a/tests/test_community_mqtt.py +++ b/tests/test_community_mqtt.py @@ -1215,17 +1215,18 @@ class TestBuildRadioInfo: class TestGetClientVersion: - def test_returns_remoteterm_prefix(self): - """Should return 'RemoteTerm ...' string.""" + def test_returns_plain_version(self): + """Should return a bare version string with no product prefix.""" result = _get_client_version() - assert result.startswith("RemoteTerm ") + assert result + assert "RemoteTerm" not in result def test_returns_version_from_build_helper(self): """Should use the shared backend build-info helper.""" with patch("app.fanout.community_mqtt.get_app_build_info") as mock_build_info: mock_build_info.return_value.version = "1.2.3" result = _get_client_version() - assert result == "RemoteTerm 1.2.3" + assert result == "1.2.3" class TestPublishStatus: