Skip to content

Leave shared face rooms when a grant is revoked - #1083

Merged
Birfy merged 1 commit into
mainfrom
cursor/revoke-face-room-membership-1feb
Oct 25, 2026
Merged

Birfy merged 1 commit into
mainfrom
cursor/revoke-face-room-membership-1feb

Conversation

@Birfy

@Birfy Birfy commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

Written-by: Dev
Owner: Dev
Reviewer: Reviewer

Fixes #1072

What changed

Revoking a person's access left shared face rooms in place. The other home could then apply a snapshot that looks like a waiting lobby and stay on Loading history / Waiting for others.

  • Before the grant is deleted, this home leaves every live face room that still seats that grantee. A failed leave is warned and the revoke still completes.
  • An open room whose next snapshot is candidate, or that loses every other home, is closed (peersGone) instead of returning to the waiting lobby. A room that was only ever a candidate lobby stays one until its window runs out.
  • An open, closed, or left room is not demoted to candidate when a later snapshot omits startedAt. Peer seats are soft-left, not deleted.

No changelog fragment and no version bump.

Verification at the tip

Tip SHA: 2a95502

Red on 1748b49 before the fix (these tests only):

  • core #1072 → face.status was candidate, expected open
  • social revoke #1072 → no REST POST /frm_123456/leave
  • social lobby #1072 → face.status was candidate, expected closed

Ran:

  • TZ=UTC node --import ./test/harness-resolve.mjs --test --test-name-pattern '#1072' test/remote-room.test.js → pass (1)
  • TZ=UTC node --import ./plugins/social/test/resolve.mjs --test --test-name-pattern '#1072|last peer leaves|expired matching|failed automatic leave|#304' plugins/social/test/social.test.js → pass (11)
  • TZ=UTC npm run verify → exit 0 (core 1412, social 457, tree 125, timeline 125, plus repo-script, interop, and live-e2e suites)
  • node scripts/ds-bot-patches.mjs check → ok

Not run:

  • Smoke bench (core/dev/bench.sh): no deepseek-harness checkout on this machine. The host change is faceStatusFrom, covered by the core #1072 unit test.
Open in Web Open in Cursor 

Revoking access only dropped inbound shares, so the other home could keep an open face room as a waiting lobby. Leave those rooms before the grant delete, and do not demote an open room when a later snapshot says candidate.

Fixes #1072

Co-authored-by: Danyang Chen <birfychen@gmail.com>
@Birfy Birfy added the agent-pr Pull request opened by an agent label Oct 25, 2026 — with Cursor
@cursor

cursor Bot commented Oct 25, 2026

Copy link
Copy Markdown

Verdict: PASS at 2a95502
Written-by: Reviewer

Ran:

Not run:

Red on 1748b49 before the fix: core #1072 stayed candidate; revoke posted no face-room leave; the lobby snapshot stayed candidate. Same tests are green at this tip. Peer seats are soft-left. An open room is not demoted when startedAt is omitted. Revoke leaves the shared face room before the grant delete.

Fixes #1072

@Birfy Birfy added area:social Friends, invites, grants, Bot Social area:ui Web/desktop UI and copy bug Something isn't working labels Oct 25, 2026 — with Cursor
@Birfy

Birfy commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: PASS at 2a95502
Written-by: Reviewer

Fixes #1072. Revoke leaves shared face rooms before deleting the grant; open rooms that lose peers close with peersGone instead of demoting to candidate lobby.

Ran:

  • TZ=UTC npm run verify → pass (core 1412, social 457, tree 125, timeline 125)
  • New revoke / poll / faceStatusFrom tests red on unbroken tip, green here

@Birfy
Birfy added this pull request to the merge queue Oct 25, 2026
@github-actions github-actions Bot added the pass label Oct 25, 2026
Merged via the queue into main with commit 7a66c17 Oct 25, 2026
11 of 13 checks passed
@Birfy
Birfy deleted the cursor/revoke-face-room-membership-1feb branch October 25, 2026 02:07
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:social Friends, invites, grants, Bot Social area:ui Web/desktop UI and copy bug Something isn't working pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revoke access silently degrades shared face-to-face room

2 participants