Skip to content

Docs: Document HA 2026.7 fan-out guard and validation #685

Description

@tykeal

Part of #670

Summary

Add the required in-repo developer note explaining the HA 2026.7 event-queue guard,
why Keymaster defers/shards notifications, and how to validate the fix. Run final validation for
the complete issue #670 stack.

Scope / changes

  • Add a concise dedicated developer/architecture note under docs/ or an equivalent in-repo
    development documentation location, for example docs/keymaster-fanout-architecture.md. Do
    not put this only in README.md, and do not rely only on code comments.
  • Document that KeymasterCoordinator remains the manager/storage owner, entity listeners bind
    to runtime-only per-lock coordinators, refresh is manager-owned and sequential, per-lock
    coordinators use update_interval=None, and deferred notifications intentionally add one
    event-loop-turn UI delay.
  • Document the dual-target bridge transition: foundation can notify both global and per-lock
    targets, binding flips entities to per-lock coordinators, and the refresh-pipeline task removes
    the global leg after no entities remain manager-bound.
  • Document the targeted and full validation commands from §7.7.
  • Confirm docs mention the guard test scale split: fast lowered-threshold unit test in normal CI
    and focused ~13.8k slow/perf case for on-demand/nightly validation.

Plan reference

§7.7, §8 PR 6; decision 11, summarizes decisions 1-10,
and implements the 2026-07-07 developer-docs location decision.

Dependencies

Depends on: #677, #678, #679, #684

Acceptance criteria

  • Dedicated developer note exists in-repo outside README.md and accurately describes the final
    architecture.
  • Final validation commands are documented and have been run for the PR:
    pytest tests/test_coordinator_sync.py tests/test_debounce.py tests/test_entity.py
    pytest tests/test_switch.py tests/test_text.py tests/test_sensor.py tests/test_number.py \ tests/test_datetime.py tests/test_time.py tests/test_event.py tests/test_binary_sensor.py
    ruff check custom_components/ tests/
    ruff format --check custom_components/ tests/
    mypy custom_components/keymaster/
    tox
  • Any slow/perf validation, including the ~13.8k case, is documented as on-demand/nightly rather
    than default CI.
  • Any failures are fixed or explicitly documented before merge.

Risk / notes

Keep the note short and developer-focused; do not duplicate the entire plan.
This task should not change runtime behavior except documentation.

Size

S

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions