Part of #670
Summary
Scope parent/child synchronization to the parent and affected children only, and
publish one coalesced final result after the sync transaction completes. Intermediate child
ADDING/DELETING states are intentionally not surfaced during parent sync.
Scope / changes
- Refactor parent sync methods at
coordinator.py:2359-2405 and child slot updates at
coordinator.py:2407-2510 to return/collect dirty entry IDs.
- Add a parent-sync transaction/suppression mechanism so
set_pin_on_lock()
(coordinator.py:1523-1625) and clear_pin_from_lock() (coordinator.py:1627-1706) can
update provider/local state without scheduling per-slot notifications mid-transaction.
- Ensure child unlock parent access-limit decrement at
coordinator.py:996-1026 schedules the
parent entry ID; local count decrement at coordinator.py:1027-1034 schedules the current
lock.
- Preserve provider retry behavior from
_update_child_code_slots() at
coordinator.py:2480-2509.
- Extend
tests/test_coordinator_sync.py, which already exercises parent/child sync starting at
tests/test_coordinator_sync.py:84, with dirty-ID and notification assertions.
Plan reference
§5.4 scoped notifications, §5.6, §7.2, §7.3, §7.6,
§8 PR 5; decisions 3 and 4; 2026-07-07 guard-regression and shippability findings.
Dependencies
Depends on: #682
Acceptance criteria
Risk / notes
Most important reviewer focus is missed child notifications and noisy
intermediate sync status (§8 risk table). Transaction cleanup must be exception-safe. Do not ship
this without task-10's quick/debounce scoping.
Size
L
Part of #670
Summary
Scope parent/child synchronization to the parent and affected children only, and
publish one coalesced final result after the sync transaction completes. Intermediate child
ADDING/DELETING states are intentionally not surfaced during parent sync.
Scope / changes
coordinator.py:2359-2405and child slot updates atcoordinator.py:2407-2510to return/collect dirty entry IDs.set_pin_on_lock()(
coordinator.py:1523-1625) andclear_pin_from_lock()(coordinator.py:1627-1706) canupdate provider/local state without scheduling per-slot notifications mid-transaction.
coordinator.py:996-1026schedules theparent entry ID; local count decrement at
coordinator.py:1027-1034schedules the currentlock.
_update_child_code_slots()atcoordinator.py:2480-2509.tests/test_coordinator_sync.py, which already exercises parent/child sync starting attests/test_coordinator_sync.py:84, with dirty-ID and notification assertions.Plan reference
§5.4 scoped notifications, §5.6, §7.2, §7.3, §7.6,
§8 PR 5; decisions 3 and 4; 2026-07-07 guard-regression and shippability findings.
Dependencies
Depends on: #682
Acceptance criteria
override_parent=Trueare not mutated and not notified for copied parent fields.not intermediate ADDING/DELETING fan-outs.
and scoped to the dirty parent/child entry set.
pytest tests/test_coordinator_sync.py.pytest tests/test_coordinator_sync.py tests/test_debounce.py tests/test_entity.py,ruff check custom_components/ tests/,mypy custom_components/keymaster/.Risk / notes
Most important reviewer focus is missed child notifications and noisy
intermediate sync status (§8 risk table). Transaction cleanup must be exception-safe. Do not ship
this without task-10's quick/debounce scoping.
Size
L