Iter 46 — second attempt at fixing state_messages_published_on_snapshot_broadcast on CI. The iter-45 SubAck fix proved necessary but not sufficient; the test still returned an empty Vec for presence states. Root cause analysis: the test was front-loading 6 snapshots over 1.2 s after a 3 s warm-up sleep, then capturing for 8 s. That schedule assumes: - mosquitto sidecar is ready - cargo build cache is warm - rumqttc connect + 21 QoS-1 discovery publishes complete in <3 s - the publisher's select! starts draining state_rx in <3 s On the CI runner those assumptions break. The publisher takes >3 s to finish discovery, so all 6 state publishes either land in the rumqttc outbound channel before the broker is reachable OR are emitted while the subscriber's reception path has stalled. Fix: drive snapshots in a background task THROUGHOUT the capture window instead of front-loading them. 40 snapshots × 300 ms = 12 s of steady-state ON/OFF traffic across a 14 s capture window. Even if the first 3-5 s of publishes are missed during slow publisher bootstrap, plenty of ON and OFF messages arrive afterward. This also makes the test more representative of real HA workloads (steady stream of vitals, not a burst then silence). Local cargo test --features mqtt --no-default-features --test mqtt_integration --no-run → compiles green. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|---|---|---|
| .. | ||
| .cargo | ||
| .claude-flow | ||
| crates | ||
| data | ||
| docs | ||
| examples | ||
| patches/ruvector-crv | ||
| Cargo.lock | ||
| Cargo.toml | ||
| rust-toolchain.toml | ||