Skip to content

Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.

Say what more than one replica means for presence, not that switch-core runs as one (#981)

Abel Dantasca20fc56540d
diff --git a/CLAUDE.md b/CLAUDE.md
index d6166e795..30e724fe0 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -107,8 +107,9 @@ its own cursor, 200 at a time. The notification is a wake-up, never the
payload. Membership changes reach every
process through a `NOTIFY` trigger on `client_rooms` and the signal bus
(`signals.py`, `transport/membership_signals.py`); presence still travels over
-an in-process bus (`transport/ephemeral.py`), which is part of why switch-core
-runs as a single replica. Names such as
+an in-process bus (`transport/ephemeral.py`), so with more than one replica a
+presence update (an agent going busy, say) reaches only the clients on the
+replica that announced it. Names such as
the `matrix_room_id` / `matrix_user_id` columns and wire fields, the
`@localpart:server` id shape and `m.room.message` content types are kept as
stable identifiers and wire shapes, not as a sign that Matrix is in use. In
diff --git a/core/switch_core/transport/ephemeral.py b/core/switch_core/transport/ephemeral.py
index 1c9823d79..101729fe8 100644
--- a/core/switch_core/transport/ephemeral.py
+++ b/core/switch_core/transport/ephemeral.py
@@ -21,8 +21,8 @@ value, and a missed one costs a briefly stale indicator rather than data.
**It is in-process.** Membership changes, which used to share this
limitation, now reach every process through a trigger on `client_rooms` and
the signal bus (`transport/membership_signals.py`). Presence has not followed
-yet: a second replica needs it carried the same way (`signals.py`), which is
-one reason switch-core runs as a single replica until then.
+yet: with more than one replica, an announcement reaches only the clients on
+the replica that made it, until it is carried the same way (`signals.py`).
"""
from __future__ import annotations