feat(bot-mode): Group Chats survive Desktop closing — gateway-owned authority and replay (salvage #97712) - #99007
Merged
Merged
Conversation
…d replay Follow-ups on top of the salvaged #97712 foundation: - read_events() pages now include the room's authority stamp (authority.gateway_id + authority.epoch), so a replicating participant can persist lineage with every page and a future takeover layer can fence stale authorities from replayed state alone. - New regression test proves the replay page bound counts UTF-8 BYTES, not characters: sabotaging LENGTH(CAST(.. AS BLOB)) back to LENGTH(TEXT) and dropping the .encode('utf-8') guard fails the test; the pre-existing multibyte test passed under that sabotage. - _raise_room_not_found typed NoReturn so narrowing survives closures.
Contributor
૮ >ﻌ< ა ci reviewran on dfcea47 — feat(bot-mode): replay pages carry authority lineage; pin by
|
6 tasks
This was referenced Aug 31, 2026
5 tasks
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Group Chats gain a durable, gateway-owned authority and ordered replay log in root
state.db, so a room no longer depends on the Desktop process that created it — salvage of #97712 by @dokterdok, plus the UTF-8 replay-bound blocker fix and authority lineage on replay pages per the decision on #97681.Changes
gateway/hosted_rooms.py: durable room store — identity, membership, ordered events, server-issued authority (authority_gateway_id+ monotonicauthority_epoch), idempotent appends, stale-writer fencing, retired-ID reservations, byte-bounded replay pages (@dokterdok, salvaged commit)tui_gateway/methods_groups.py+methods_bot_relay.py: inertgroups.*RPC surface (capabilities/list/create/state/send/log/disband); driver stays off in this slicehermes_cli/install_identity.py: stable install identity with cross-process/corrupt-file-safe creation (POSIX + Windows)read_events()pages now carry the room's authority stamp (authority.gateway_id/authority.epoch) so replicating participants persist lineage with every page — groundwork for the log-replication + epoch-takeover requirement from Bot Group Chats should keep working after Desktop closes #97681LENGTH(TEXT)accounting fails the new test while the pre-existing multibyte test passed under itValidation
Blockers 2–4 from the exact-head review (#97797 reauth, #97846 code-4123 replay, #98072 attachment lineage) are owned by their layers and will be fixed in those salvages.
Infographic