Skip to content

v0.5.0

Choose a tag to compare

@mitchmitchell mitchmitchell released this 12 Nov 15:31
e2a0bbf

What's Changed

0.5.0 is a minor release because it changes the public surface: internal
module paths and logger names were renamed, several public enums are now
StrEnum (so str() and f-strings yield the wire value), and diagnostic
redaction covers more fields. Read Breaking changes before upgrading.

Breaking changes

  • Internal module renames (#120). Protocol code now lives in *_loop.py and
    *_thread.py modules. Deep imports (for example elke27_lib.kernel) and
    logger names (for example "elke27_lib.session") must use the new names
    (kernel_loop, session_thread, and so on). There are no compatibility
    shims. Elke27Hub remains available from elke27_lib.
  • Public enums are StrEnum (#121). ArmMode, EventType, and
    E27ErrorCode are StrEnum; str(member) and f-strings yield the value
    (for example "disarmed"), not Class.name. A synchronous
    control.authenticate call on the kernel's bound asyncio loop thread now
    raises ProtocolError instead of blocking inbound dispatch.
  • Diagnostics redaction (#126). redact.should_redact is public (was
    _should_redact). redact_for_diagnostics also redacts access, lat,
    long, cloud_url, pw, pwd, cloud_pw, and keys whose lowercase form
    ends with _pw. The exact key password_required is exempt.

Bug Fixes / Hardening

  • Unified credential and discovery log redaction (#126). Kernel inbound and
    outbound DEBUG traffic share one rule; UDP discovery DEBUG uses
    redact_for_diagnostics instead of logging the raw reply.
  • HELLO diagnostic redaction (#129). Pre-HELLO bytes log as <bytes:N>;
    missing-hello timeout paths redact JSON in DEBUG and in E27HelloTimeout
    context detail.
  • HELLO identity and wire-log redaction (#131). HELLO request DEBUG logs
    seq and hello field names only, not identity values; session wire-log
    DEBUG logs frame length only (no ciphertext hex).
  • All-areas-disarmed gate (#132). _all_areas_disarmed uses only
    arm_mode_from_panel_string; unknown, ALARM_MEM, and missing arm_state
    never count as disarmed.
  • Session / loop teardown (#121). Session.close() on the bound asyncio loop
    no longer joins the receive thread (avoids stalling the loop); receive-join
    helpers are generation-bound so a stale join cannot clear a new receiver after
    reconnect. Auto-receive callbacks are marshalled with call_soon_threadsafe.

New API

  • redact.should_redact(key) — public helper for diagnostic redaction rules
    (#126).
  • Elke27Client.bind_kernel_loop_thread_for_tests(loop) — test-only hook to
    record the kernel asyncio loop on the current thread (#121).

Developer

  • Loopcheck (#96, #122). devtools/loopcheck.py is a stdlib-only AST checker
    for loop-module rules (ELK001-005, ELK101-110). python devtools/lint.py and
    make lint now run it on src; any ELK finding fails lint like ruff or
    basedpyright.
  • Encryption imports (#123). encryption_loop imports cryptography
    directly; dead optional-import fallback and default_backend() removed.
  • Keepalive except documentation (#125). The keepalive reply catch-all
    documents why probe failures must not stop the loop.
  • Disarmed-gate execute tests (#134). Hardened offline coverage for the
    installer disarmed permission gate (#133); test-only, no library behavior
    change beyond #132.

Full Changelog

v0.4.0...v0.5.0