Add Firmware Channel switching from HA#110
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (5)
WalkthroughThis PR adds beta build-and-publish automation, updates AIR-1 build mappings, and introduces ESPHome firmware channel selection with OTA manifest switching and a factory-manifest web installer path. ChangesBeta Release Pipeline and Firmware Channel Switching
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/build-beta.yml (1)
29-34: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winFragile version extraction via awk.
This works today because
version:is the first key aftersubstitutions:and no other line in that block contains the literal substringversion:. Any reordering of substitutions, or adding a key whose value containsversion:, will silently produce a wrong/emptyv, which flows straight intorelease-versionfor the reusable build workflow. Consideryqfor structural correctness (e.g.yq '.substitutions.version' Integrations/ESPHome/Core.yaml).♻️ Suggested fix using yq
- v=$(awk '/substitutions:/ {f=1} f && /version:/ {print $2; exit}' \ - Integrations/ESPHome/Core.yaml | tr -d '"') + v=$(yq -r '.substitutions.version' Integrations/ESPHome/Core.yaml)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/build-beta.yml around lines 29 - 34, The version lookup in the build-beta workflow is too fragile because the awk-based parsing in the read step depends on key order and can break if the substitutions block changes. Update the read step to use a संरuctural YAML parser such as yq to read the version field directly from the substitutions object in Core.yaml, and keep the output assignment to GITHUB_OUTPUT in the same step so release-version receives the correct value.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/build-beta.yml:
- Around line 29-34: The version lookup in the build-beta workflow is too
fragile because the awk-based parsing in the read step depends on key order and
can break if the substitutions block changes. Update the read step to use a
संरuctural YAML parser such as yq to read the version field directly from the
substitutions object in Core.yaml, and keep the output assignment to
GITHUB_OUTPUT in the same step so release-version receives the correct value.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 98ff22f3-80b4-404b-95e5-f88c7cad0474
📒 Files selected for processing (5)
.github/workflows/build-beta.yml.github/workflows/build.ymlIntegrations/ESPHome/AIR-1_BLE.yamlIntegrations/ESPHome/Core.yamlstatic/index.html
51ad52d to
153a007
Compare
Same Stable/Beta channel switching as CAST-1 (ApolloAutomation/CAST-1#43 naming): - Firmware Channel select (Stable/Beta) sets the OTA manifest URL via a new apply_ota_source script; each image tracks its own variant's manifests through the ble_firmware substitution. - Firmware Update button force-installs the selected channel's firmware. - build-beta.yml publishes beta builds to a rolling beta pre-release. - build.yml now builds AIR-1.yaml as firmware/ so updates serve the end-user image; the Factory image moves to firmware-factory/ for the web installer only. Beta-channel builds compile thin beta-channel/ wrapper yamls so the Firmware Channel select defaults to Beta on firmware obtained from the beta channel (fresh flashes only; stored choices still win). Version: 26.7.8.1 🤖 Generated with [Claude Code](https://claude.com/claude-code)
153a007 to
67033a8
Compare
|
Superseded by #111. MSR-1 shipped the unified redesign as 26.7.9.1 (one image per channel, runtime Bluetooth Proxy switch instead of the ble_firmware substitution split), so this two-image channel architecture is retired before merging. #111 carries the same beta pipeline plus the http_request buffer fixes this branch predates. |
Version: 26.7.7.1
What does this implement/fix?
Same Stable/Beta firmware switching as CAST-1 (naming per ApolloAutomation/CAST-1#43):
apply_ota_sourcescript. Stable = GitHub Pages (main branch builds), Beta = rollingbetapre-release assets. Each image tracks its own variant's manifests through a build-timeble_firmwaresubstitution; there is no user-facing variant switching.betabuild the end-user images and publish them to a rollingbetapre-release, with manifests rewritten to absolute URLs and bins prefixed per variant.AIR-1.yamlasfirmware/and moves the Factory image tofirmware-factory/, which only the web installer uses. On their next update, fielded devices leave the Factory image, drop improv BLE, and reclaim flash.Supersedes #107 (fresh minimal port against current beta; the variant-switching scope from that PR is not included).
All three variants config-validated on ESPHome 2026.6.4. Not yet tested on hardware.
Types of changes
Checklist / Checklijst:
If user-visible functionality or configuration variables are added/modified:
🤖 Generated with Claude Code
Summary by CodeRabbit