processDiscoveryResult() makes child things disappear when their model is no longer announced. It used to confront them with the models of the one connection that had just finished discovering, which is only half of the picture on a thing carrying two: the inverter discovery would delete the meter child, and the meter discovery the inverter and storage ones, on every single reconnect. The sweep now waits for every connection of the parent to have reported a successful discovery, then confronts the children with the union of their models. A grace period releases it if a connection never reports, so a hung discovery cannot freeze the cleanup for good. That grace period is inferred, not measured: it is set generously because sweeping too late leaves a stale child showing as disconnected, while sweeping too early deletes a thing of the user. Recorded as D-2 in DIVERGENCES.md with what to measure to replace it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
etm-powersync-plugins-modbus
Languages
CSS
93.6%
C++
3.3%
HTML
3%