fix(ota): subscription-log check misses post-reboot Re-Subscription (#64) - #78
Merged
Merged
Conversation
…false #64 alarm) check_subscription_log grepped '<Node:N> Subscription succeeded', which cannot match the post-OTA '<Node:N> Re-Subscription succeeded' line (the 'Re-' breaks the adjacency), and used grep -m1 (oldest match) against a 15m window in which the pre-reboot subscription is often already too old. After an OTA the device always reboots, so the resubscribe is the real healthy signal: both genuinely-healthy flashes on 2026-07-22 (nodes 14 and 62 to 1.3.18) tripped a false 'subscription is broken' die despite matter-server logging Re-Subscription succeeded. Match both (Re-)?Subscription succeeded, take the most recent (tail -1, not grep -m1's oldest), and poll briefly so a resubscribe that lands just after the check starts is not missed. The Python gate (fatal re-interview + available poll) already asserts subscribability; this log line is the belt-and-suspenders confirmation, now matching reality. Assisted-by: AI
AndrewDemsDS
force-pushed
the
fix/ota-subscription-log-resubscribe
branch
from
July 22, 2026 09:15
e97af30 to
1fd6387
Compare
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.
Summary
check_subscription_log(the #64 post-flash gate) false-alarmed on two genuinely healthy OTAs today (nodes 14 and 62, both to 1.3.18). Two compounding bugs:<Node:N> Subscription succeeded, which cannot match the post-reboot<Node:N> Re-Subscription succeededline (theRe-breaks the<Node:N> Subscriptionadjacency). After an OTA the device always reboots, so the resubscribe is the real healthy signal.grep -m1(oldest match) over a 15m window, in which the pre-reboot subscription success is often already too old to be in-window.Net effect: matter-server logged
<Node:62> Re-Subscription succeeded, but the gatedied with "subscription is broken".Fix
(Re-)?Subscription succeeded.tail -1) instead of the oldest (grep -m1).No weakening of the gate: the Python gate (fatal re-interview + node-available poll) already asserts subscribability, and a real
0x24/ Invalid-TLV break still fails it (no succeeded line and the node never becomes available). This log line is the belt-and-suspenders confirmation, now matching reality.Test
bash -nclean.Subscription succeededandRe-Subscription succeeded, ignoresSetting up ... subscriptionandSubscription failed, is node-scoped, and picks the most recent.Assisted-by: AI