Repository navigation
fix(rooms): name the pair a room link seated - #927
Merged
Merged
Conversation
Birfy
force-pushed
the
fix/923-room-link-seat-pair
branch
from
October 24, 2026 03:31
c38b30d to
f27d234
Compare
6 tasks
A seat is a pair only when the seat record kept the link's ticket and the Bot of this home that minted it, and the local link accept wrote neither: its group envelopes fell to the plain pair path, named no room, and Bot Social held them with an approval that ends in no active relationship. The link's own record of who it admitted, and the room's lead, name that pair without rewriting anything on load. A seat no link names stays out. Fixes #923 Docs-not-needed: the plugins/social change is one comment and one assertion on the existing pair path; no plugin behaviour, route or setting changed, so docs/subsystems/social.md would only restate the #883 test. The room-share pair itself is documented in docs/subsystems/core-host.md in this branch. Self-check: git diff <base>...HEAD -- plugins/social shows 3 comment lines and 5 test lines.
Birfy
force-pushed
the
fix/923-room-link-seat-pair
branch
from
October 24, 2026 03:33
f27d234 to
07f7546
Compare
Collaborator
Author
|
Verdict: PASS at 07f7546 Ran:
The four points, checked:
Non-blocking:
|
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.
Owner: Dev3
Reviewer: Reviewer2
Written-by: Dev3
Fixes #923
A seat a link admitted was only a pair when the seat record kept
admittedBy: 'ticket'andhostBotId. The local link-accept path (answerLocalInvite->addRoomParticipant) wrote neither, and a seat older than those fields has no way back — soticketPeers()(core/src/host/reach.js, the list Bot Social's room reach is derived from) skipped the seat, the room's own envelope fell to the plain pair path, named no room (plugins/social/src/social.js:1622), and Bot Social held it aspending_approval. Approving that card then ends inno active relationship between these bots, which is exactly what the owner's screenshot shows (Group update for Chief,Bot Social decide_approval: no active relationship between these bots).The card is outbound:
shownRoomShareText(plugins/social/client.js:1211-1221) renders every op other thanjoin/leave/lineasGroup update for <to>, and theApprove/Auto-send from now onpair is the#417"my Bot -> that person" hold. It proves this host cannot reach that guest; it is not evidence about the reverse direction (see "Open, not a gate").Reproduce
war, invite minted from the room (mintRoomInvite), a Bot of another home accepts (op: 'ask', accept: true).core/test/remote-room.test.js(new test): the seat record has noadmittedBy/ticket/hostBotId, andticketPeers(state)has no pair for it.sendOutwithticketPair()undefined;roomIdisundefinedforvia: 'room-share', sosend_as_membercarries no room, Bot Social answerspending_approval, anddecide_approvalends inno active relationship(bot-socialdeliverMessage->activeRelationship).What changed
core/src/host/reach.js:linkSeats(room)reads the link's ownhomes(home -> the handles it seated, written on the accept), and a remote seat is a pair when it kept the ticket or a link of this room names it; the pair'sfromis the seat'shostBotIdwhen it is a current member, else the room's lead (room.admin). A friend's Bot added by hand is named by no link and stays out.core/src/host/room-membership.js:addRoomParticipanttakesopts.ticket/opts.hostBotIdand recordsadmittedBy: 'ticket'/ticket/hostBotIdon the seat;answerLocalInvitepasses the link's ticket and the Bot the link was minted for (or the room's lead). New seats are right from the start; older rooms are covered by the reach-side record, so nothing is rewritten on load.plugins/social/src/social.js: comment only. The old sentence said a local room "has no id on the server" — stale since docs: define team ownership and Chief collaboration boundaries #59:mintRoomInvitepassesroomIdto the server (room-membership.js:1279) andsendTicketSharenames it. What the ordinary path lacks is the pair, not the id.docs/subsystems/core-host.md: one sentence for a link-admitted guest still needs a friendship: its room envelopes are carded, and approving the card ends in no_relationship #923 in the room-share section.changelog.d/923-room-link-seat-pair.fixed.md.No change to the server, no widening of
activeRelationship, and no new rejection:not-inviter,unknown-roomand the#909/#910trust boundary are untouched.What I ran
core: full suitenode --import ./test/harness-resolve.mjs --test --test-concurrency=1 test/*.test.js-> 1344/1344remote-room+room-ticket-seat) -> 75/75plugins/social:node --import ./test/resolve.mjs --test "test/*.test.js"-> 352/352node scripts/ds-bot-patches.mjs generate+check-> 10 patches apply cleanly;core/equalsds-bot/+ patches; the three mirrors are byte-identical to their core filescd core && node scripts/lint.mjs-> oxlint 0 errors (44 pre-existing warnings),arch-docs: OKnode .github/scripts/changelog.mjs check-> 45 fragments well formedRed without the source change
With only
core/src/host/reach.jsandcore/src/host/room-membership.jsreverted to pristine0b22aa53(the new test and the rest kept):not ok 55 - #923: a link-admitted seat is the pair the link opened..., 64 pass / 1 fail, failing atseat.admittedBy === 'ticket'(undefined). With the change: that file 65/65.The social assertion added to the
#883test is a guardrail, not a red case: it pins that an approved (approved: true) room-share envelope still goes out by the pair and names the room, which is the "settle" half once the pair is enumerable (sendOutchecksticketPairbefore every other branch).Not run
dev/bench.sh, so it was not run; the unit, plugin and arch-docs suites are the coverage here.remote-room.test.js), which is how#852/#884are covered too.Open, not a gate
Whether the reverse direction (guest -> host) fails for the same reason is not decided by this PR: it needs the other machine's screen (
Not sent: ... you are not friends with this Botwould mean the same server-side fallback at send time;已发送would mean delivery). The server half isBirfy/bot-social#67; this PR only makes the pair enumerable and leaves every existing rejection in place.Risk
#884/#883tests are unchanged and green.localInvites) stays non-enumerable and keeps today's behaviour: the card, and the server refusal.hostBotIdfalls back to the room's lead when the seat did not keep it; that is the Bot the link was minted for (inviteBotOf), and it must still be a current member.Docs-not-needed: the
plugins/socialchange is one comment plus one assertion on the existing pair path; no plugin behaviour, route or setting changed, sodocs/subsystems/social.mdwould only restate what the#883test already pins. The room-share pair itself is documented indocs/subsystems/core-host.mdin this branch. Self-check:git diff <base>...HEAD -- plugins/socialis 3 comment lines and 5 test lines.