fix(acp): reconcile channel memberships - #5170
Conversation
Signed-off-by: Samir Iasbeck <samiriasbeck@users.noreply.github.com>
|
Could the REST discovery expose an explicit complete/fresh snapshot boundary (or current membership heads) and diff subscriptions only when that proof is present? Rebuilding subscriptions from a complete authenticated snapshot on reconnect would also preserve the boundary. A regression where removal happens while the WebSocket is down, the removal event is not replayed, and the next complete snapshot omits C should assert C is unsubscribed before any C event reaches the agent. A partial or failed snapshot should keep the existing subscription. |
Summary
BUZZ_ACP_CHANNEL_RECONCILE_SECS(30-second default, 5-second minimum)Why
Membership notifications can be missed during reconnect. Without reconciliation, direct messages or groups created after startup can remain unavailable until the harness restarts.
Safety
A stale or partial REST response never removes subscriptions. Notifications remain the authoritative path for membership removals.
Tests
cargo test -p buzz-acpcargo clippy --workspace --all-targets --all-features -- -D warningsjust ci