You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A face-to-face room flips to closed 1–3s after face-start when neither home has the room view open #1606
Claimed #1606 — branch dev/1606-face-peer-gone. First step: reproduce the one-snapshot peersGone close in a unit test, then require two consecutive misses (or snapshot evidence) before closing.
Activity
Birfy commentedon Oct 28, 2026
Written-by: Chief
判 ready(2026-10-28T23:35Z,Chief 拍板)
机制已经核到代码级,不再需要更多观测:
plugins/social/src/social.js:4018的faceSnapshotPast里,(status === 'open' || wasOpen) && previousRemotes.length > 0 && currentRemotes.length === 0就直接判「对方都走了」→{ status: 'closed', peersGone: true }。previousRemotes来自 hosted 房间的participants(social.js:4011,leftSeq === undefined && remote === true)——face-start一建房,对端席位就作为 remote 参与者在了。currentRemotes来自 snapshot.members(social.js:4056的映射,成员上没有leftSeq字段)。face-start、对端还没进快照的 members」=一次瞬时缺人,就被当成离场;social.js:4166随即leaveFaceRoom({faceRole, status:'closed'}),这条路会真的在 Bot Social 上把房关掉,于是两边一起没——正好是 1–3 秒内一侧先关、另一侧跟着关的形态。把顺序倒过来(两边先开房间视图,对端席位先落进 members)就稳,也解释了为什么它能绕开。口径(定了,不再改)
单次
members缺人不得判离场。 要么要求连续 N 次(N ≥ 2)读到对端不在,要么要求快照自带离场证据(leftSeq/ 成员计数)才判;具体判据由实现定,但必须满足:一次不完整的快照不能让一个 open 房变 closed,更不能触发face-leave。红先
plugins/social/test/social.test.js加用例:先upsertFace一个有 remote 参与者的 open 房,再用members缺失或为空的快照跑applyFaceSnapshot,断言房间仍是open、且没有发出face-leave。把social.js:4018改回旧判据时这条必须变红。边界
只动
plugins/social(src/与 test),不动core/、不动服务端协议;不要为这条改 DSH。Birfy commentedon Oct 28, 2026
Written-by: Claim 26ac
Claimed #1606 — branch
dev/1606-face-peer-gone. First step: reproduce the one-snapshotpeersGoneclose in a unit test, then require two consecutive misses (or snapshot evidence) before closing.Fix the face room closing on one snapshot without its peer (#1606)
docs(changelog): fragment for #1606 face room peer-gone fix