Skip to content

Release v0.79.8 — one counted status per node, evicted deaths dropped, re-interview and removal subscriptions released - #182

Merged
tesseractAZ merged 7 commits into
mainfrom
crossings-v0798
Nov 25, 2026
Merged

tesseractAZ merged 7 commits into
mainfrom
crossings-v0798

Conversation

@tesseractAZ

@tesseractAZ tesseractAZ commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • One counted status per node. Each node's Dead-boundary crossings (flapAccum, and the death queue the auto-ping runner drains) are now counted against one status that every observation moves: a status event on any of the node's status feeds, and each roster poll's reading unless a status event heard after that poll was sent may be the newer. It survives reconnects, re-arms, a node's own re-subscribe and failed status subscribes; it is cleared at the node's eviction and at a home id change, and a roster that shows another network counts nothing. This replaces the per-feed seeds, the status carried past a node's own re-subscribe (releaseHeard, statusUncounted) and the rule that the roster counted only nodes without a live status feed. Fixed by it:
    • a status change made while the Core WebSocket was down, or before a new feed's listener was attached, is counted by the first poll that reads it;
    • a crossing a live feed counted after the last reading is not counted again after a reconnect's teardown, a re-arm, or a rebuild status subscribe that fails, a revival as well as a death;
    • a replacement of a failed node by an object that reads Alive is counted for a node whose status feed is live, so the failed node's death no longer stays queued;
    • an Unknown reading (a restarted driver's, before it hears the node) never replaces a known status: a Dead node read Unknown clears its death when it is read Alive, and counts nothing more when read Dead again (v0.79.7 queued a second death there); before any known status, Unknown is the node's not-Dead start, so a node first read Unknown and then Dead counts its death, as in v0.79.7.
  • Deaths queued for an evicted id are dropped at the eviction; a death its revival cleared stays for the runner's next drain.
  • Re-interview and remove failed no longer leave a subscription on the connection. Home Assistant 2026.11.2 registers zwave_js/refresh_node_info and zwave_js/remove_failed_node as subscriptions (connection.subscriptions[msg id], set before the driver await; an error answer drops only the listeners). haWsClient.sendSubscription() sends them as send() does and releases the id on the same socket once any answer arrives or at the reply timeout; zwaveActions routes both verbs through it. /^HA WS timeout/ is still an unknown outcome.
  • A state read needs a socket. After an activity subscribe fails with the connection down, neither the rebuild nor the activity retry starts fetchEntityStates.

Crossing-count oracle: v0.79.7 (e869147) vs this release (7d1b9f9), same seeds

8 configurations × 47,000 seeds (FIFO, FIFOB, ACT, DROP, RRR, STRAY, STRAY0, STRAYB: the v0.79.7 final check's table), the v0.79.7 interleaving fuzz with its true-crossings oracle, extended for this release:

  • an uncounted true crossing is L when observations that reached the add-on bracket it (one showed the old side since the node's previous crossing, one the new side before its next), else Lu (no observer could count it);
  • Q:evictedLeft: a death of an evicted segment still queued at settle; A5: a state read started with the socket down;
  • truth for Unknown: Unknown says nothing about the Dead boundary, so once an id has a known status an Unknown status is no crossing, and before one it is the id's not-Dead start. The first candidate counted Unknown as "not Dead", as the v0.79.7 oracle did; review showed that turns a driver restart into a fake revival and a second death for a node that stays Dead (3 flaps, a cleared death handed to auto-ping, two refresh-trial deaths). The code and the oracle now share the rule. The v0.79.7 definition is kept behind FZ_TRUTH=v797 and reported below.

Seed-classes (a seed counts once for each class it shows, summed over a row's classes):

class what it is e869147 this release
(a) L:*:down an observable crossing made while the socket was down, not counted 6,742 1
(b) X:* a counted crossing matching no true one (teardown, re-arm or failed-subscribe recount; a releasing feed's event) 3,640 0
(c) L:A:make:up a replacement not counted (those while the socket was down are in (a)) 3,307 1
(d) Q:evicted* / Q:evictedLeft a death left queued for an evicted id 7,161 0
other L:*:up other observable crossings not counted 13,443 33
Q:queuedAlive / Q:twoQueued a death queued for a node read Alive / two for one dead node 7,058 / 2,676 0 / 0
Q:deadNoneQueued a dead node with no death queued 6,321 110
Q:queuedUnknown a death kept queued while the node reads Unknown (intended) 1,475 1,920
Lu:* not observable 45,582 46,031
A5 / F1 / F2 state read while down / two deaths queued / death queued while alive 2,256 / 4,474 / 7,141 0 / 0 / 0
I1/I2 feed-book invariants pre-existing, unrelated 156 156 (identical per id)

No class appears on this release that is absent on e869147. Lu moves by about 1% (instances fall, seeds showing one rise): 12,936 of the 47,000 trajectories diverge, because the fuzz's random choices follow the add-on's requests, and the state-read guard changes their timing. Per-node re-subscribes: 41,006 vs 40,998. The 110 Q:deadNoneQueued are nodes first read Dead (a first observation only sets the count, as before). Of the 35 remaining L seed-classes, the two traced (ACT 30380, STRAYB 420444) are a roster reading skipped because a status event heard after its send may be newer, when the reading showed a change no feed delivered (DOCS §2.5 Limits); the rest were not traced.

Under the v0.79.7 oracle's definition (Unknown = not Dead), on the same seeds: X 3,454 → 0, Q:evicted* 7,202 → 0, Q:twoQueued 2,676 → 0, L:*:down 7,199 → 602 (273 of them restarts), L:A:make 4,021 → 334, and L:A:restart 1,120 → 1,094, which this release leaves uncounted on purpose (a restart's Dead → Unknown is no revival); its Q:queuedAlive 1,920 are all nodes still Unknown. On those ids, with L and Lu together as the v0.79.7 check reported them, FIFO class (a) goes from 1,093 (revivals) and 1,580 (deaths) of 6,000 seeds to 872 and 1,116; under the v0.79.8 truth, observable ones (L:*:down) number 1 across all 47,000 seeds.

Verification

  • 1,972 tests (21 new), all passing; both typecheck configurations clean. 18 of the 21 fail on e869147 (the 4 client tests because sendSubscription does not exist there; the rest at their own assertion). The 3 that pass there pin behaviour v0.79.7 already had and a candidate of this release could lose: an Alive node read Unknown across a restart counts nothing, a node first read Unknown and then Dead counts its death, and an evicted node's cleared death stays for the runner.
  • 2,067 mutation-harness entries (19 labelled equivalent; 25 new, 5 re-anchored, 19 removed with the code they pinned). Full run on the final head (7d1b9f9): 2,048 killed · 0 survived · 19 equivalent · 0 missing · 0 ambiguous · 0 invalid · 0 relabel; the release's 30 new and re-anchored entries re-run apart at lower load: 30 killed · 0 survived.
  • Two independent review rounds on the diff. Round 1 found the Unknown double count (fixed above), the hand-over of a death inside the eviction dwell (kept as designed, the count follows the id; stated in DOCS §2.5 Limits) and four stale doc sentences. Round 2 found a test gap (a mutant treating Unknown as Dead passed; now a test and a harness entry) and that a node first read Unknown and then Dead no longer queued a death, which the refresh trial's kill check needs (now counted, as in v0.79.7).
  • CHANGELOG: 31,184 B of the 32,768 B budget; 0.79.3 rotated into docs/CHANGELOG-history.md; rotate-changelog.mjs --check passes and the frozen pin is unchanged.
  • DOCS §1.2, §1.3, §2.4, §2.5 (re-subscribe and Limits), §2.6 and §11.2 updated.

🤖 Generated with Claude Code

@tesseractAZ
tesseractAZ merged commit 6fd9a12 into main Nov 25, 2026
7 checks passed
@tesseractAZ
tesseractAZ deleted the crossings-v0798 branch November 25, 2026 01:14
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