Repository navigation
fix(observer): check the OTA image URL, honour radio.watchdog on room servers - #62
Merged
Elektr0Vodka merged 1 commit intoDec 1, 2026
Conversation
… servers The observer pull-OTA flashed whatever HTTPS `file` URL the manifest named, on any host. The companion OTA already refuses that with ota_firmware_url_allowed(). The observer now applies the same rule to the manifest base it fetched from: ".../mqtt/v" may only point under ".../mqtt/fw/", ".../mqtt/dev/v" only under ".../mqtt/dev/fw/", and the image must be https. All 140 live manifests (70 envs, stable and dev) already follow this layout (checked 2026-12-01), so no server change is needed. The room server had no getRadioWatchdogMillis() override, so `set radio.watchdog N` replied OK there and the watchdog stayed at 5 minutes. Also runs native_ota_channel in the unit-test workflow; test_ota_channel never ran in CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two observer fixes from the October architecture review that were written then but never pushed, ported onto the current code.
Fixes
fileURL the manifest named, on any host. It now applies the rule the companion OTA already has: the image must be https, on the same server, and under the firmware path of the channel the manifest came from (.../mqtt/v->.../mqtt/fw/,.../mqtt/dev/v->.../mqtt/dev/fw/). Otherwiseota checkandota updatereplyERR: manifest file URL not allowed.radio.watchdogon room servers. The room server had nogetRadioWatchdogMillis()override, soset radio.watchdog Nreplied OK there and the watchdog stayed at 5 minutes.native_ota_channel;test_ota_channelnever ran there.Behaviour changes
radio.watchdogwas changed earlier will start using that value after the update, including0(off). The default of 5 minutes is unchanged.OTA_MANIFEST_BASE_URLmust end in/vwith its images under the sibling/fw/, otherwise the update is refused.Server side
No change needed: all 140 live manifests (70 observer envs, stable and dev) satisfy the rule, checked 2026-12-01.
Not included
The rest of the old role-drift branch (SNMP attach, OTA resume, settle delay) is already covered by
ObserverBridgeControl. Room server OTA alerts stay off, as the code there states.Tests
pio test -e native -e native_region_gating -e native_jwt_helper -e native_ota_channel: 1081/1081 passed. New caseOtaUrl.ObserverChannelsAllowOnlyTheirOwnFwPathpins the live layouts.build.sh build-firmwaresucceeded forheltec_v4_repeater_observer_mqtt,heltec_v4_room_server_observer_mqttandHeltec_v3_room_server_observer_mqtt(no PSRAM), with the OTA macros set. The check is present in all three images.Not covered: the ESP32 OTA wiring and the watchdog override have no native test, and nothing was run on hardware.