Skip to content

fix(model): gate TAK module config on firmware 2.8.0 - #6435

Merged
jamesarich merged 1 commit into
mainfrom
fix/6430-tak-config-gate
Jul 25, 2026
Merged

fix(model): gate TAK module config on firmware 2.8.0#6435
jamesarich merged 1 commit into
mainfrom
fix/6430-tak-config-gate

Conversation

@jamesarich

@jamesarich jamesarich commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Refs #6430

Why

supportsTakConfig was gated on 2.7.19, but that floor was set on protobuf availability, not firmware support. No released firmware implements the TAK module config write path, so the app has been offering an editor that cannot work:

  • AdminModule::handleSetModuleConfig() in v2.7.x has no case for the tak submessage. The message falls through the switch, and the handler still runs saveChanges(SEGMENT_MODULECONFIG, shouldReboot); return true; — so the node ACKs success and reboots, having stored nothing. The value never even takes effect in RAM.
  • NodeDB::saveToDisk() never sets moduleConfig.has_tak = true, so even a populated struct would be omitted by nanopb on flash write.
  • v2.7.26's PhoneAPI STATE_SEND_MODULECONFIG has no tak case, so the node never echoes a TAK config back — which is what the app renders as "Unspecified".

Net user-visible effect (#6430): pick a Team Color and Member Role → Save → node reboots (the screen is RebootBehavior.ALWAYS) → both fields read "Unspecified" again. The app was doing everything right — TAKConfigItemList.ktRadioConfigViewModel (per-submessage merge preserves tak) → AdminControllerImpl sends AdminMessage.set_module_config with ModuleConfig.tak (field 16) populated — so there was no app-side fix for the persistence itself, only this bad capability floor.

Change

Raise the floor to 2.8.0, matching the firmware fix in meshtastic/firmware#11216 (labelled 2.8), which adds all three missing pieces:

Firmware defect Fixed in #11216
No tak set case in handleSetModuleConfig() case meshtastic_ModuleConfig_tak_tag: + moduleConfig.has_tak = true
saveToDisk() never sets has_tak moduleConfig.has_tak = true; in the SEGMENT_MODULECONFIG block
No remote-admin TAK_CONFIG read case case meshtastic_AdminMessage_ModuleConfigType_TAK_CONFIG:

Also removes the now-unused V2_7_19 constant, and records the reasoning in KDoc so the floor doesn't get lowered back onto protobuf availability.

Tests

CapabilitiesTest.supportsTakConfig_requires_V2_7_19 asserted 2.7.19 → true and would have failed. Renamed to supportsTakConfig_requires_V2_8_0, and 2.7.26 added as an explicit false case since that is the firmware version in the bug report.

Verified: spotlessApply spotlessCheck :core:model:detekt :core:model:allTestsBUILD SUCCESSFUL.

Merge dependency

⚠️ meshtastic/firmware#11216 is open, not yet merged. This gate is only correct once that lands in a 2.8.0 build — until then it gates the editor off for everyone, which is still strictly better than the current behaviour (an editor that silently no-ops and costs a reboot).

If 2.8.0 ends up shipping without #11216, the floor needs revisiting. The repo's UNRELEASED = DeviceVersion("9.9.9") idiom (used by canRequestNeighborInfo) is the alternative if a hard gate is preferred over a version bet.

Related

Not related, despite surface similarity: the Router::sendLocal loopback regression on firmware develop (d6b12ea3f). Different failure mode — admin round-trips in #6430 succeed (the node ACKs and reboots); this is a plain missing switch case that predates that range.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Corrected the firmware compatibility requirement for TAK configuration support.
    • TAK configuration is now enabled starting with firmware version 2.8.0; versions 2.7.19 and 2.7.26 no longer qualify.
  • Documentation
    • Expanded compatibility guidance to clarify the correct firmware version paths.

The v2.7.19 gate was set on protobuf availability rather than firmware
support. In v2.7.x, AdminModule::handleSetModuleConfig() has no case for
the `tak` submessage, so the node ACKs the write and reboots without
storing anything, and NodeDB::saveToDisk() never sets `has_tak`. The
result is a settings editor that appears to save, forces a reboot
(RebootBehavior.ALWAYS), and always reads back as unspecified.

Raise the floor to 2.8.0, matching meshtastic/firmware#11216 (labelled
2.8), which adds the admin set case, the has_tak persist flag, and the
TAK_CONFIG remote-admin read case.

Refs #6430

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4701188d-728d-4c8e-aeea-b8885db165fe

📥 Commits

Reviewing files that changed from the base of the PR and between 945e7a7 and 7ef2d3b.

📒 Files selected for processing (2)
  • core/model/src/commonMain/kotlin/org/meshtastic/core/model/Capabilities.kt
  • core/model/src/commonTest/kotlin/org/meshtastic/core/model/CapabilitiesTest.kt

📝 Walkthrough

Walkthrough

The TAK configuration capability gate now requires firmware 2.8.0. The obsolete 2.7.19 constant was removed, and tests verify support remains disabled through 2.7.26 and enables at 2.8.0.

Changes

TAK configuration capability

Layer / File(s) Summary
Firmware gate and validation
core/model/src/commonMain/kotlin/org/meshtastic/core/model/Capabilities.kt, core/model/src/commonTest/kotlin/org/meshtastic/core/model/CapabilitiesTest.kt
supportsTakConfig now requires V2_8_0; V2_7_19 is removed, and tests cover the updated version boundary.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: raising the TAK config firmware gate to 2.8.0.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the bugfix PR tag label Jul 25, 2026
@jamesarich
jamesarich marked this pull request as ready for review July 25, 2026 18:53
@jamesarich
jamesarich added this pull request to the merge queue Jul 25, 2026
Merged via the queue into main with commit 5572b29 Jul 25, 2026
15 checks passed
@jamesarich
jamesarich deleted the fix/6430-tak-config-gate branch July 25, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant