From 57dfd38718f53df0aa120c0f4a4efda567fe5fdc Mon Sep 17 00:00:00 2001 From: agessaman Date: Sat, 3 Oct 2026 15:37:49 -0700 Subject: [PATCH] fix(ota): always offer another channel's image, even from the same commit Prod and beta are often built from one commit (e.g. after a dev->prod merge), so a hash match does not mean the images are the same: the native base differs. After the flash the target channel is native, so this cannot loop. --- src/helpers/ESP32Board.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/helpers/ESP32Board.cpp b/src/helpers/ESP32Board.cpp index 206a3a7c1..d36661d08 100644 --- a/src/helpers/ESP32Board.cpp +++ b/src/helpers/ESP32Board.cpp @@ -334,13 +334,14 @@ bool ESP32Board::otaFromManifestImpl(const char* manifest_base, const char* curr bool same_base = (own_base[0] && avail_base[0] && strcmp(own_base, avail_base) == 0); bool have_builds = (own_build >= 0 && avail_build >= 0); bool diff_base = (own_base[0] && avail_base[0] && !same_base); - // Build counters are per channel, so build numbers only compare within the native channel. + // Another channel's image always differs (its native base does), even from the same + // commit; build counters are per channel, so build numbers only compare natively. bool cross_channel = (strcmp(manifest_base, OTA_MANIFEST_BASE) != 0); int behind = 0; bool up_to_date; if (cross_channel) { - up_to_date = hash_equal; + up_to_date = false; } else if (same_base && have_builds) { behind = avail_build - own_build; up_to_date = (behind <= 0);