rtc: Commet joiners in encrypted rooms hear Discord ghosts only after seconds — 3 of 4 ghosts re-keyed the new device ~17 s after its membership (bridge-side recipient lag) #144
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nether/nether-voicebridge#144
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom (operator, 2026-10-01): joining an encrypted bridged room's call from Commet, the Discord side (ghost audio) takes several seconds to become audible.
Evidence — prod journal, Purple Gaming, Commet device
@dark:nether.im:inMftF8sdw(identified as Commet: itsio.element.call.encryption_keyshasmember_id=-, cf. #135):…1314350124666847294re-keys Commet (re-key delivered after membership change latency_ms=29) — +3.6 s…1467364551388299467,…996161727068643380,…868334831937937438re-key Commet (latency_ms=28/30/156) — +17 sBetween 23:44:49 and 23:45:02 the three late ghosts' ~3 s key heartbeat did not include
inMftF8sdw— only…1314…'s did. So the recipient set for 3 of 4 ghosts lagged the membership change by ~17 s, and all three caught up in the same 100 ms (looks like a shared periodic refresh, not the event-driven path). Thelatency_msmetric hides this: it is measured from each ghost's own detection, not from the membership event.So at least part of the delay is bridge-side (per-ghost recipient refresh), on top of whatever Commet itself needs (key install / decryptor setup — not measured; we can't see Commet's side).
Unknowns / next steps (evidence first, no pre-fix):
rtc::ghostre-key trigger vs. the periodic path) and why one ghost got the event and three didn't. Is it the grace-window re-appear (membership "re-appeared within grace" may not fan out a members_gen bump to all ghosts — cf. #51RefreshMode::Force+members_gen)?Related: #42, #51, #55, #135, #136.
Root cause found (
crates/matrix-rtc/src/matrix.rs::apply_member_event): the ghosts' key loops are only woken (members_genbump) when a new MXID appears. Two kinds of new key recipient never bumped it, so they waited for the 60 s key heartbeat:Fix on branch
fix/144-rekey-on-new-device(5783a5c, CI test green): the participant-set update is now a pure, unit-tested function that reports whether the (user, state_key) membership is new; every new one wakes the key loops. Periodic membership refreshes still don't. Not merged/deployed yet — needs a live check (Commet rejoin: all ghosts should key the new device within ~1 s).