Repository navigation
Release v0.79.3 — only a known driver start opens the node-down start window; node-down dwells outlive the add-on - #177
Merged
Merged
Conversation
…de-down dwells survive a restart v0.79.2 took the driver's start from every driver-WS handshake, the add-on's own first one included, and kept its dwell state in memory. After a deploy, a FLiRS node already Dead lost its raised node-down for 90 minutes. - symptoms: DetectInput.driverStarts (spans the driver started within) replaces driverStartedAt; nodeDownCarry / seedNodeDown (since clamped to now). - driverWsClient: onHomeId reports peerClosedAt, set only when the SERVER ended a handshaken link (our own teardowns strip the close listener). - zwaveData: driverStarts() = host boot (fixed at the first engine tick), a restart seen over the link, one carried on the same boot; the carry is taken at the first tick, after the home id is bound; opts.uptimeMs. - evidenceStore: optional nodeDown / driverStart fields, takeCarry(), a carry change alone saves the store; reset drops the carry. - 18 new tests, 42 harness entries; CHANGELOG 0.79.3, 0.77.2 + 0.77.1 rotated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ode-downs only, Unknown is no reading Review wf_b808a39d-d1a: ship after fixes. All three state lenses found that a start death still waiting, carried across a host reboot, was raised on the new boot's first tick. - symptoms: DwellEntry.start (a start death stays one; carried as st:1); Unknown neither ends nor advances a node-down dwell, a raised one stays raised through it; a raised dwell is raised at once while it reads Dead. - evidenceStore: on another boot only raised node-downs load; the carry is stamped with its network and another network's is not written; the carry key is by content, sorted by node. - zwaveData: the carry getter stamps lastHomeId; a node-down dwell that starts, is raised or ends saves the store at once. - driverWsClient: a WS_ERR_* protocol error (the ws library closes the link itself) is not a peer close. - Tests: 8 more (26 in all); startRun registers its cleanup before its waits. Harness: 16 more entries, 13 re-anchored. CHANGELOG/DOCS corrected; 0.77.3 rotated verbatim. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e latch check the raise-at-once branch made redundant The touched harness left two survivors, each made redundant by the review fixes: - node-down-latched: a raised node-down is now raised at once whatever dwell its flags ask for, so excluding latched entries from the start rule did nothing. The conjunct is removed and its entry retired. - boot-read-once: with the start verdict sticky, a boot frozen at the first tick no longer protects anything, and it misjudged a death first seen after the wall clock jumped ahead of uptime. driverStarts(now) now takes the boot as now - uptime at each tick, so a verdict is judged on uptime and then kept. New wired test: a death first seen 12.5 min of clock ahead of uptime is a start death (90 min; a frozen boot gave 5). Harness: boot-judged-each-tick added, 4 entries re-anchored. 1,764 tests; 1,786 harness entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g sections From doc-accuracy scan wf_9f64829e-15d: - CHANGELOG 0.79.3 intro: the start window is 10 minutes; 90 is the dwell. - CHANGELOG 0.79.2: impersonal "the add-on's own" for "our own" (twice). - CHANGELOG 0.79.1: 31 existing entries were re-anchored, not 43 (12 of the 43 commented entries were new in that release). - CHANGELOG 0.78.3: describe the Supervisor's mechanism, not what the badge will do. - DOCS §6: onHomeId's v0.79.3 signature and what it records; §5: the save's no-op condition includes the carry. DESIGN: the node-down row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…yed on what must not be lost, spaced a minute Re-review wf_7f833b0c-f03 (on 9274268): do not publish until these are fixed. - The prompt save missed a carried node-down ending on the first tick (its key started empty) and a start verdict or driver restart reached later. Its key is now the raised node-downs, start deaths and newest driver restart, initialised from the restored carry, with at most one save a minute (a flapping node rewrote the 2.3 MB store every tick). - Home Assistant is sent nothing until the engine's first tick (EngineStatus.ran), so degraded is not sent off before a carried node-down is raised again; an engine with no evidence store reads as run. - The Unknown card counts Dead time only and says the status is Unknown; a seeded dwell is Dead as of the restart. - A node that leaves the network takes its dwells with it (a reused id read Unknown would re-raise the latch). - Text: the clock-battery claim holds only inside the 180 s boot grace; a network drop is not told apart from a restart; the reboot trade-off is in the cost; the §11.12 note names the self-proven credit. - 1,769 tests; 1,798 harness entries (14 added, 2 replaced ones retired). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Final review wf_39a32712-c3c: ship f11b88a with no code change once the text is corrected and the full harness is green. - Only a start verdict stays; a death not yet judged one is judged again each tick, so a forward clock step during its dwell can still make it one. - A plain 5-minute dwell is written by the flush and the shutdown save, so a crash restart can bring one back with its old onset. - A reused id is covered only after 5 minutes off the roster; replace_failed_node keeps the id, so the raised node-down is held. - The update from 0.79.2 also raises a FLiRS start death still waiting at it (the deploy now refuses to install while a FLiRS node reads Dead). - /api/health and the HA states disagree until the engine's first tick. - 70 new harness entries (net 69: one retired). Comments only in src (index.ts, zwaveData.ts). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Repairs 0.79.2's node-down start window, found at the 0.79.2 live check: a restart of this add-on read as a driver start, and a raised node-down did not survive it.
Fixed — a restart of this add-on held back a FLiRS node's node-down for 90 minutes (0.79.2)
0.79.2 took the driver's start from every driver-WS handshake (
driverReconnectedAt()), this add-on's own first one included, and kept the node-down dwell, itslatchedflag with it, in memory. After a deploy, update or restart, a node auto-ping does not probe that was already Dead read as a new start death: the critical card andbinary_sensor.zwave_tui_degradedcleared and came back 90 minutes later. Reproduced at the detector and through the real data layer (degradedoffat 0.5, 5.5, 30 and 89.5 min after the restart,onat 90). It did not occur on the reference mesh, where nothing was Dead at the 0.79.2 deploy.DetectInput.driverStarts, spans the driver started within): the host's boot (now − uptime, so a death's verdict at its first reading rests on the host's uptime); a driver-WS link this add-on did not end itself followed by a new handshake (onHomeId's newlink.peerClosedAt, set only by the socket's close listener, which the client's own teardowns strip, and cleared by aWS_ERR_*protocol error); and such a restart carried from the previous run on the same boot.driverReconnectedAt()is unchanged for auto-ping's burst refusal.DwellEntry.start, carried asst): a later restart, or a deploy carrying only the newest, no longer cuts its 90 minutes to 5.evidence.json, optionalnodeDownanddriverStart; no schema change), seeded at the first engine tick after the home id is bound, for nodes on the roster. On the same boot every dwell and the driver restart carry; after a host reboot only raised node-downs do (a waiting dwell began before that boot's own start). A raised node-down is raised at once while it reads Dead; Unknown is no reading (it neither ends nor advances a dwell, and its card counts Dead time only).EngineStatus.ran). A carry of another network is not written; a node that leaves the network takes its dwells with it.Rejected alternatives
Install note
The update from 0.79.2 carries nothing (0.79.2 wrote no carry): a node-down raised at the update, or a FLiRS start death 0.79.2 is still holding, is raised 5 minutes after it. The deploy therefore installs only while the three FLiRS nodes read Alive.
Verification
test/nodeDownCarry.test.ts, the driver-link test, the publish gate);npm run typecheckexits 0; the suite is also green with the default uptime forced to 60 s (a freshly booted CI runner).degraded off; both are fixed and re-tested. The final round played this mesh's real event sequences (deploys, reboots, Z-Wave JS restarts, a power cut, a flapping node, the update from 0.79.2) through the real data layer and found only text to correct, now corrected.finally, and the mock's close terminates connected clients.docs/CHANGELOG-history.md).🤖 Generated with Claude Code