preview: track protobufs develop-SNAPSHOT + wire TINY_FAST/TINY_SLOW presets#5790
preview: track protobufs develop-SNAPSHOT + wire TINY_FAST/TINY_SLOW presets#5790jamesarich wants to merge 3 commits into
Conversation
Bump org.meshtastic:protobufs from 2.7.25 to develop-SNAPSHOT to pick up unreleased proto changes for evaluation (sonatype snapshot repo is already wired in settings.gradle.kts). The only source change required to compile is in Channel.kt: the develop protos add two new amateur-band ModemPreset values (TINY_FAST, TINY_SLOW), which the exhaustive `when` over modem_preset must now cover. All other deltas are additive (new HardwareModels, ITU RegionCodes, XEdDSA signing fields, lockdown additions) and the restructured deviceonly NodeInfoLite types are firmware-only and not referenced by this app. NOTE: this pins a moving snapshot — revert to a released version before merging anywhere near a release branch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
❌ 35 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
… preview Fully integrate the two new amateur-radio modem presets from the develop-SNAPSHOT protos (firmware PR #10597): - ChannelOption: add TINY_FAST/TINY_SLOW with the firmware-accurate 15.625 kHz bandwidth (0.015625f). The proto comment's "20kHz" is the padded channel spacing, not the modem bandwidth that feeds numChannels/radioFreq, so using it would skew the frequency math. - ModelExtensions.labelRes + label_tiny_fast/label_tiny_slow strings for the preset dropdown. - Channel.kt: document that the preset->name `when` is interop-critical (the name feeds the channel hash, channel number/frequency and MQTT topic), name the firmware source of truth (DisplayFormatters::getModemPresetDisplayName), and flag the two deliberately-abbreviated names so nobody "fixes" the intentional compile tripwire with an auto-deriving else. Also force org.meshtastic:protobufs* to develop-SNAPSHOT across the build (root build.gradle.kts). takpacket-sdk-jvm:0.5.3 transitively pins protobufs:2.7.25, and Gradle ranks 2.7.25 > develop-SNAPSHOT, so the test runtime classpath was downgrading to 2.7.25 while compilation used the snapshot -> NoSuchFieldError/NoSuchMethodError on the proto classes (assembleDebug/detekt miss it; test/allTests catch it). The force is safe because atak.proto is unchanged, so takpacket's message ABI stays compatible with the newer protobufs. NOTE: both the snapshot pin and this force are preview-only. Revert to a released protobufs and drop the force once takpacket-sdk (and mqtt) are republished against the new protos. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📄 Docs staleness check — advisoryThis PR modifies user-facing UI source files but does not update any page under
Changed source files: What to check:
New page checklist (if adding a new doc page):
If this PR does not require a doc update (e.g., internal refactor, bug fix, test change), add the
|
Add ChannelPresetNameTest (commonTest, so it gates every PR) pinning every ModemPreset to its exact firmware-canonical channel name from DisplayFormatters::getModemPresetDisplayName(preset, useShortName=false). The name is interop-critical (it feeds the channel hash, channel number/frequency and MQTT topic), so the test: - locks the mapping against accidental edits (e.g. "LongMod" -> "LongModerate"), - asserts set-completeness vs ModemPreset.entries, so a new preset that was added to Channel.name's `when` but not pinned here fails loudly (also catches someone silencing the intentional compile tripwire with an `else`), - covers the deprecated VERY_LONG_SLOW, which still has a real name. This backstops Channel.name's exhaustive `when` without weakening it. The numeric on-air anchors (hash/channelNum/radioFreq) stay in ChannelTest. Remove the old androidDeviceTest allModemPresetsHaveValidNames, which only asserted name != "Invalid" — a value the no-else `when` can never produce, so it gave the illusion of a name guard while testing nothing, and ran only on-device rather than on every PR. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
What
Preview branch that bumps
org.meshtastic:protobufs2.7.25→develop-SNAPSHOTto build against the unreleased protos, and fully wires the new amateur-radio modem presets so @vidplace7 can check them out.New presets (firmware #10597):
TINY_FAST/TINY_SLOW— 15.625 kHz LoRa bandwidth, for 2 m / lower-band compliance. Surfaced as channel names"TinyFast"/"TinySlow"and dropdown labelsTiny - Fast/Tiny - Slow.Changes
gradle/libs.versions.toml— protobufs →develop-SNAPSHOT.core/model/.../Channel.kt—TINY_*branches in the preset-namewhen, plus a comment documenting that this mapping is interop-critical (the name feeds the channel hash, channel number/frequency and MQTT topic), naming the firmware source of truth (DisplayFormatters::getModemPresetDisplayName) and flagging the two deliberately-abbreviated names (LongMod,VLongSlow).core/model/.../ChannelOption.kt—TINY_*bandwidth entries at0.015625f(15.625 kHz), the real modem bandwidth from firmware. (The proto comment's "20 kHz" is the padded channel spacing, not the bandwidth that feedsnumChannels/radioFreq.)core/ui/.../ModelExtensions.kt+label_tiny_*strings — dropdown labels.core/model/.../ChannelPresetNameTest.kt(new,commonTest) — pins everyModemPresetto its exact firmware channel name + asserts set-completeness; replaces the oldandroidDeviceTestallModemPresetsHaveValidNames, which only checked!= "Invalid"(a value the no-elsewhencan never produce) and ran only on-device. See "Brittleness follow-up" below.build.gradle.kts— temporary build-wide force ofprotobufs*todevelop-SNAPSHOT(see blocker below).Why the resolution force is needed
takpacket-sdk-jvm:0.5.3transitively pinsprotobufs:2.7.25, and Gradle ranks2.7.25 > develop-SNAPSHOT(a numeric part outranks thedevelopstring qualifier). Without the force, the test runtime classpath downgrades to 2.7.25 while the common-metadata compile uses the snapshot →NoSuchFieldError: TINY_FAST/NoSuchMethodError: Data.<init>at test runtime (assembleDebug/detektpass; onlytest/allTestscatch it). The force is safe becauseatak.protois unchanged, so takpacket's own message ABI stays compatible with the newer protobufs.Brittleness follow-up (preset
when)The preset-name
wheninChannel.ktis intentionally exhaustive with noelse: because the derived name is interop-critical and firmware names aren't mechanically derivable (LongMod,VLongSloware abbreviated), a new preset should break the build so a human supplies the exact firmware string. This PR keeps that tripwire but makes it friendlier — the newcommonTestcontract test documents the firmware source of truth, locks the mapping against accidental edits, and fails set-completeness if a preset is added but not pinned (or if someone silences the compile error with anelse). The numeric on-air anchors (hash/channelNum/radioFreq) stay inChannelTest.Other proto deltas (no code change needed)
Additive, not yet wired into UI: new
HardwareModels (HELTEC_MESH_TOWER_V2,MESHNOLOGY_W10), ITU 70 cm / 1.25 mRegionCodes, XEdDSA signing fields, lockdown additions. ThedeviceonlyNodeInfoLite/NodeDatabaserestructure is firmware-only and not referenced by this app.Verification
spotlessCheck+detekt+assembleDebug+test+allTests+kmpSmokeCompile— all green.Both the
develop-SNAPSHOTpin and the resolution force are preview-only. Revert to a releasedprotobufsand drop the force oncetakpacket-sdk(and mqtt) are republished against the new protos.🤖 Generated with Claude Code