fix(config): gate Traffic Management/Status Message on correct firmware (#3491)#3493
Conversation
…re (#3491) Traffic Management saves appeared to succeed but never persisted on the node. Root cause is firmware-side, not MeshMonitor: the traffic_management set-config handler is develop-only (meshtastic/firmware PR #9358) and is NOT in any release through the latest pre-release 2.7.25 — verified directly: TrafficManagementModule.cpp does not exist at the v2.7.25 tag and AdminModule.cpp has no traffic_management case. Such firmware decodes the admin message but silently drops it. MeshMonitor's encoding is correct (added a round-trip test). The MeshMonitor bug is the UI gate: supportsTrafficManagement() allowed it at >= 2.7.22, advertising it as editable on 2.7.22–2.7.25 where it can't persist. Raise the gate above the latest release (>= 2.7.26) so it lights up only on develop/preview builds (which report a newer version) and the first release that ships PR #9358; re-pin to the exact release when tagged. Also fixes an off-by-one found while verifying: the status_message handler first shipped in firmware 2.7.20, but supportsStatusMessage() gated at >= 2.7.19. Corrected to >= 2.7.20. (Status Message set intentionally does not reboot.) - meshtasticManager.ts: supportsTrafficManagement >= 2.7.26, supportsStatusMessage >= 2.7.20, with comments citing the firmware evidence. - Config sections: corrected the "unsupported" notices. - moduleSupport.test.ts: updated thresholds; added the 2.7.25 (issue #3491) case. - protobufService.moduleConfig.test.ts: new round-trip encode tests locking the module-config field names (trafficmanagement, statusmessage, telemetry). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Claude finished @Yeraze's task —— View job PR Review: fix(config): gate Traffic Management/Status Message on correct firmwareTasks:
SummaryThis is a well-investigated and appropriately scoped fix. The root cause analysis (firmware PR #9358 not in any release through 2.7.25) is solid, the fix is minimal and correct, and the tests are thorough. A few observations below. Code Quality
UI components:
Potential Issues
The PR body notes this explicitly: The comment at line 12107 says "Re-pin to the exact release once it is tagged." This is important operational hygiene. Consider opening a tracking issue or leaving a No functional bug in the current logic for the described issue. Test CoverageThe tests are excellent:
One minor gap: there's no test for Security / PerformanceNo concerns. This is a pure version-comparison gate with no external inputs or side effects. The OverallApprove with minor suggestions:
The fix is correct, minimal, well-documented, and well-tested. The PR description's root cause analysis is thorough and accurate. |
Fixes #3491.
Problem
Since 4.10.4, enabling Traffic Management appears to save in MeshMonitor but the node never persists it (and on stock firmware doesn't reboot). Other module configs save fine. Reporter is on firmware 2.7.25.
Root cause — firmware-side, not encoding
MeshMonitor encodes the
traffic_managementset-config correctly (verified end-to-end; added round-trip tests). The gap is firmware: the Traffic Management module + itsAdminModule::handleSetModuleConfigcase landed only on meshtastic/firmwaredevelopvia PR #9358 and are not in any release, including the latest pre-releasev2.7.25.104df5f. Verified directly against that tag:So a 2.7.25 node decodes the admin message but has no handler → silently doesn't persist. Before 4.10.4 the save errored (
400 Invalid module type); #3464 fixed that, so the (correct) packet now actually sends — which exposed the firmware gap and made it look like a regression.Fix
The MeshMonitor bug is the UI version gate advertising the module as editable on firmware that can't honour it:
supportsTrafficManagement()>= 2.7.22→>= 2.7.26. No released firmware (≤ 2.7.25) supports it; gate above the latest release so it enables only on develop/preview builds (which report a newer version) and the first release shipping PR #9358. Comment notes to re-pin the exact release once tagged.supportsStatusMessage()>= 2.7.19→>= 2.7.20— off-by-one found while verifying; thestatusmessagehandler first shipped in firmware 2.7.20 (absent in 2.7.19). (Status Message set intentionally does not reboot, so for it a no-reboot is normal.)Tests
meshtasticManager.moduleSupport.test.ts: updated thresholds; added the 2.7.25 (issue Bug: Traffic management saved in meshmonitor but not on node #3491) case asserting Traffic Management is reported unsupported while Status Message is supported.protobufService.moduleConfig.test.ts(new): round-trip encode→decode tests locking the module-config field names fortrafficmanagement,statusmessage, andtelemetry, so a future field-name drift (which would silently encode an empty sub-message) is caught. These also document that MeshMonitor's encoding for Traffic Management is correct.Validation
tsc --noEmit: cleanNote: a
v2.7.26placeholder is used for the Traffic Management gate since no release ships it yet — re-pin to the exact version once Meshtastic cuts a release containing PR #9358.🤖 Generated with Claude Code