Files
efitenandClaude Opus 5.5 a7a72d7eb7 fix(drain): keep another companion's backlog until it is connected
drainOnce published a row stamped with an earlier companion under that
companion's pubkey while the MQTT clientId was the companion connected
now. The documented ACL binds the topic to ${clientid}, so the broker
denies that publish, and with EMQX's default deny_action=ignore it still
sends a PUBACK. The row was removed from the queue and never stored.

Such rows now stay in the queue (counted as `waiting`) and go out once
their own companion is connected. The hold is asked for the connected
companion only. The debug log says once how many rows are waiting.

Tests: 430 pass (sandboxed run of the full suite). Not tested against a
live broker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NEgJ9U9V5WmHyRjL96MaDz
2026-10-23 09:19:50 +02:00
..