Skip to content

feat(ota): on-device ota branch [stable|dev|default] channel switch - #7

Merged
Elektr0Vodka merged 7 commits into
dmc-observer-devfrom
claude/ota-branch-device-switch-1103b6
Sep 14, 2026
Merged

Elektr0Vodka merged 7 commits into
dmc-observer-devfrom
claude/ota-branch-device-switch-1103b6

Conversation

@Elektr0Vodka

Copy link
Copy Markdown

Summary

Adds an on-device command to switch which OTA release channel an observer node pulls from at runtime, instead of the channel being fixed at build time.

  • ota branch — report current channel + resolved manifest base
  • ota branch stable|dev|default — set the channel (persisted); default = the build's native channel
  • Scope: same as ota update (any admin path)

How it works

  • New NodePrefs::ota_channel (uint8, def("ota_ch"), 0=native/1=stable/2=dev) — named JSON key, back-compatible with existing /prefs.json.
  • src/helpers/OtaChannel.h resolves the selector to a compile-time base macro.
  • build.sh bakes three bases into every observer build: OTA_MANIFEST_BASE (native), OTA_MANIFEST_BASE_STABLE (/mqtt/v), OTA_MANIFEST_BASE_DEV (/mqtt/dev/v).
  • otaFromManifest() takes the base as a parameter; the ota check path and the repeater/room-server deferred-flash path resolve it from prefs.

Tests

  • test/test_ota_channel (env native_ota_channel): resolver + arg parser — 6/6.
  • test_config_serializer: ota_channel default / round-trip / missing-key — +3.
  • Full native suite: 533/533. Repeater + room-server observer firmwares build & link; both channel URLs verified baked into the binary.

Dependency (out of scope here)

Dev-channel OTA fetch needs DutchMeshCore-OTA feat/dev-stable-ota-channels deployed (serves /mqtt/dev/v) + Cloudflare "Always Use HTTPS: Off" + bot-challenge Skip rules on /mqtt/dev/*. Stable channel unaffected.

Design & plan: docs/superpowers/specs/2026-09-14-ota-device-channel-switch-design.md, docs/superpowers/plans/2026-09-14-ota-device-channel-switch.md.

🤖 Generated with Claude Code

@Elektr0Vodka
Elektr0Vodka merged commit cf82106 into dmc-observer-dev Sep 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant