Repository navigation
v0.5.0
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.pyand
*_thread.pymodules. Deep imports (for exampleelke27_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.Elke27Hubremains available fromelke27_lib. - Public enums are
StrEnum(#121).ArmMode,EventType, and
E27ErrorCodeareStrEnum;str(member)and f-strings yield the value
(for example"disarmed"), notClass.name. A synchronous
control.authenticatecall on the kernel's bound asyncio loop thread now
raisesProtocolErrorinstead of blocking inbound dispatch. - Diagnostics redaction (#126).
redact.should_redactis public (was
_should_redact).redact_for_diagnosticsalso redactsaccess,lat,
long,cloud_url,pw,pwd,cloud_pw, and keys whose lowercase form
ends with_pw. The exact keypassword_requiredis 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_diagnosticsinstead of logging the raw reply. - HELLO diagnostic redaction (#129). Pre-HELLO bytes log as
<bytes:N>;
missing-hellotimeout paths redact JSON in DEBUG and inE27HelloTimeout
contextdetail. - HELLO identity and wire-log redaction (#131). HELLO request DEBUG logs
seqandhellofield names only, not identity values; session wire-log
DEBUG logs frame length only (no ciphertext hex). - All-areas-disarmed gate (#132).
_all_areas_disarmeduses only
arm_mode_from_panel_string; unknown,ALARM_MEM, and missingarm_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 withcall_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.pyis a stdlib-only AST checker
for loop-module rules (ELK001-005, ELK101-110).python devtools/lint.pyand
make lintnow run it onsrc; any ELK finding fails lint like ruff or
basedpyright. - Encryption imports (#123).
encryption_loopimportscryptography
directly; dead optional-import fallback anddefault_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.