Skip to content

Release 1.34.10: web bind visibility and hardening - #113

Merged
dougrathbone merged 7 commits into
masterfrom
dougrathbone/hardening-1-34-10-9cfb
Sep 12, 2026
Merged

dougrathbone merged 7 commits into
masterfrom
dougrathbone/hardening-1-34-10-9cfb

Conversation

@dougrathbone

Copy link
Copy Markdown
Owner

Summary

Hardening batch for 1.34.10. Web UI bind failures stay isolated from C-Gate and MQTT but are now visible on the status payload and Home Assistant diagnostics. Also patches js-yaml, sets HTTP timeouts on the status server, drives config range warnings from schema metadata, and splits the Security decoder onto a verb table.

Changes

  • Pin js-yaml to 4.3.2 (dev) so Jest cannot keep 4.3.1
  • Tests for command-error and HA discovery wiring on the bridge
  • Security event verbs dispatched through a handler table
  • Schema-backed HTTP headers and request timeouts (Node defaults, standalone-only)
  • ConfigLoader range warnings read warnMin/warnMax from the schema
  • Web bind failure recorded on status, lifecycle reason, and a web_listening diagnostic
  • Changelog insert for 1.34.10 (previous headings kept)

Test plan

  • npm test passes locally with no failures
  • New code has unit test coverage (aim for ≥ 60% on changed files)
  • Existing tests were not broken or removed without justification

Checklist

  • Version bumped in package.json and homeassistant-addon/config.yaml (if releasing)
  • CHANGELOG.md updated (if releasing)
  • No sensitive data or credentials included
Open in Web Open in Cursor 

cursoragent and others added 7 commits September 11, 2026 23:58
The 4.3.1 line is the GHSA-2883-xcg3-v3hh prototype-pollution fix. Pin the
direct dependency and the override so Jest's copy cannot stay on 4.3.1.

Co-authored-by: Doug Rathbone <dougrathbone@users.noreply.github.com>
onCommandError was assigned to initializationService.handleCommandError, and
the MQTT router haDiscoveryTrigger/treeRequest events called into HaDiscovery,
with no test that those two hops stay connected.

Co-authored-by: Doug Rathbone <dougrathbone@users.noreply.github.com>
decodeLine was a 170-line if-ladder. Each verb now has a named handler so
new panel events are a table entry rather than another branch in the
preamble.

Co-authored-by: Doug Rathbone <dougrathbone@users.noreply.github.com>
Node already uses 60s for headers and 300s for request inactivity. Set them
from schema-backed standalone knobs with those same defaults so a slow
client cannot hold a socket open indefinitely, without changing add-on
options or shipped behaviour.

Co-authored-by: Doug Rathbone <dougrathbone@users.noreply.github.com>
Message interval, command spacing, and publish-dedup cache bounds lived as
magic numbers next to the schema that already owned the defaults. warnMin
and warnMax on those entries are now the single source for the operator
warnings.

Co-authored-by: Doug Rathbone <dougrathbone@users.noreply.github.com>
C-Gate and MQTT still come up when the status port cannot bind, which left
Home Assistant Ingress returning 502 with no other signal. Record listen
state on the status payload, keep lifecycle reason web-bind-failed, and
publish a diagnostic so the failure is visible over MQTT.

Co-authored-by: Doug Rathbone <dougrathbone@users.noreply.github.com>
Co-authored-by: Doug Rathbone <dougrathbone@users.noreply.github.com>
@dougrathbone
dougrathbone marked this pull request as ready for review September 12, 2026 00:00
@dougrathbone
dougrathbone merged commit 268f872 into master Sep 12, 2026
25 checks passed
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.

2 participants