Skip to content

Release v0.79.5 — node-down boot verdict, carry and driver drop across restarts, device swaps, /api/health gate - #179

Merged
tesseractAZ merged 11 commits into
mainfrom
followups-v0795
Nov 22, 2026
Merged

tesseractAZ merged 11 commits into
mainfrom
followups-v0795

Conversation

@tesseractAZ

@tesseractAZ tesseractAZ commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Code follow-ups from the 0.79.3 final review and the 0.79.4 docs review, and what the reviews of those fixes found. The node-down start window, the engine's carry across a restart, the driver link across a deploy, a node whose Home Assistant device changes on an id that stays on the roster, and /api/health before the first engine tick.

node-down and the carry

  • The host's boot is judged a driver start at a death's first Dead reading only (DriverStart.boot), where the onset minus the boot is the host's uptime whatever the wall clock reads. A forward clock step during the 5-minute dwell no longer turns a real outage into a 90-minute start death. Driver restart spans are still judged on every tick: their handshake can come after the first reading. A carried dwell keeps the verdict taken at its first Dead reading.
  • Saves made while the engine runs (the 15-minute flush, the prompt save) carry only raised node-downs and start deaths; the shutdown save also carries the waiting dwells. A deploy keeps a waiting dwell's onset; a dwell that ended no longer comes back after a crash restart.
  • The prompt save's one-minute spacing is measured on the host's uptime, and the first tick's write-out of a restored carry does not start it.
  • evidence.json keeps its home-id tag on a save made before the home id is bound (tagToWrite, as the other stores do).

The driver link across a deploy

  • A link the server ended that has not come back survives stop() and is carried in evidence.json (driverDrop, written at every save while open). The next run takes it on the same boot within 10 minutes of the last save, and its first handshake closes it into a driver start. Until the engine takes the carry, a save writes the driver part from the live run, so a drop the first handshake closed is written as the span it closed.
  • zwave-js-server (checked at source, 3.0.0 and master) ends a client's link only when it shuts down or rebuilds a failed driver, or on a message that is not JSON: comments and docs say so (no behaviour change).

A node's device changing in Home Assistant

  • The node's own device (a zwave_js identifier exactly <home>-<node>) holds the node's slot whatever the registry's list order; an endpoint child or a replacement's orphan never does while the own device is listed. Before, the last device listed stood for the node (its name, area, entity list and the device_id used for subscriptions, configuration parameters and actions).
  • A node's entity list is its own device's entities plus its endpoint children's (parent_device_id, Home Assistant 2026.11+). Another zwave_js config entry's devices, and once the home id is known another network's, join no node.
  • A device swap: the node's own device id, or its hardware id (<home>-<node>-<mfr>:<type>:<id>; Home Assistant restores a deleted device's id when another product is included on the freed id), differs from the record of the last load that listed it. It drops the old device's dwells (a raised node-down included), evidence, baselines, readings, open episodes, the refresh trial's open decision and the cached configuration parameters. A hardware id the node carried since its eviction was last consumed is no swap, so a misread interview corrected later costs one reset per misread value while the add-on runs. More than max(2, half the mapped nodes) changing at once drops nothing.
  • Registry loads, where a swap shows, are asked by the roster: a node's ready going false→true, a return to the roster, a poll succeeding after failed ones, the first poll succeeding after a reconnect, an unrecorded node (once), an evicted id back on the roster, a dead-feed re-arm. They run in the same poll before the roster the engine reads is published, spaced 60 s apart.
  • The cached configuration parameters also go with any change of a node's ready, and a fetch stores its answer only while its own entry is still the cache's: a replacement is not offered the failed product's parameter numbers.
  • Stated limits: a same-product replace is the same Home Assistant device; an add-on restart before the load leaves nothing to compare against; after a replacement the node's statistics and status feeds stay bound to the old node object until the next rebuild of the feeds (inferred).

/api/health

New key conclusionsReady. Until the first roster and the engine's first tick: conclusionsReady: false, degraded: null, an empty engine (it reported degraded: false there before). After it, the conclusions the states publisher sends, Home Assistant's copy up to one 30-second publish behind. ok and the status code are unchanged.

Also

  • The detectors are no longer handed the coarse tier (no detector read it); source comments no longer call it the baselines' substrate.
  • The test mocks bind 127.0.0.1, the address their URLs name: on macOS a wildcard listener shared its port with another process's 127.0.0.1 listener, and connections reached that one.

Verification

  • 1,853 tests pass (1,769 before); npm run typecheck exits 0.
  • Mutation harness: 1,942 entries (18 labelled equivalent); 145 new, 1 retired, 20 re-anchored. The full run on 79e47ab: 1,923 killed, 18 equivalent, 1 survived (config-dropped-at-swap: the ready-change drop added in that commit covered its test's scenario). The head (65221fe) adds only a test for the case the ready change does not cover (another product included on the freed id while Home Assistant was down, the restored device id, ready on both sides); source and harness are byte-identical to 79e47ab. On the head, that entry and all 18 equivalent ones: 1 killed, 18 equivalent, 0 relabel.
  • Each fix was designed, attacked by a skeptic, and reviewed again by fresh-lens review rounds, including a model of Home Assistant 2026.11.2's device registry driven through 29 registration sequences.
  • CHANGELOG.md rotated (0.79.0, 0.78.3, 0.78.2 moved to the history file); the frozen-history pin is unchanged.

🤖 Generated with Claude Code

tesseractAZ and others added 11 commits November 21, 2026 16:40
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… options, filled harness whats

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ap, hardware ids, child entities

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eload, mass guard, flake hardening

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…records

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g, wording

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…to replacements

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tesseractAZ
tesseractAZ merged commit d9d2922 into main Nov 22, 2026
7 checks passed
@tesseractAZ
tesseractAZ deleted the followups-v0795 branch November 22, 2026 15:48
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