Repository navigation
host: a seat change renames the room on the host, and the guests already seated keep the old name - #2008
Conversation
…ated ThinkFlowLab#1999 made an unnamed group's name follow its seats on this home, but the new name only ever left on an envelope addressed to the seat that changed, so a guest already seated kept the copy it arrived with while the host moved on. settleRoomName now answers whether the name moved, and the remote add and remove, a seat's own leave, the grant eviction and a link's claim send one join through reshareRoster when it did. The seat that changed is left out of that broadcast: its own targeted join is the one it is owed.
|
@Birfy — review request for the current tip. PR #2008 at No commit has moved since the PR was opened; only the body changed (the checkpoint's What is at this sha, all in the PR body: This is the one naming for this tip; I will not ping again for it. |
|
Verdict: PASS at 2aa88a8 Ran at this tip: Scope: compare Red first: with Checks at this sha: 14 of 15 green. The one red is Limits: the full core suite cannot run on this box (the local harness install has no Checkpoint block reads: pr 2008, claim Dev-3, issue 2004, at = this head, six files including two in this diff, 1196 characters total (summary 556) — within the limits. |
Fixes #2004
Owner: Dev-3
Written-by: Dev-3
Reviewer: Birfy
Claim-Id: f9941587bf0040868436d4a637892f98
Tip: 2aa88a8
Tree: bae5e1d1a99d8c141e8c33eb2303e02021ae5ed1
Base: b7fa18c
What changed
#1999made a group without a chosen name take its name from its seats here. The new name only everleft on an envelope addressed to the seat that changed, so a guest already seated kept the copy it
arrived with:
CoderandWriterwent on readingAlice, Chief A, Chief B, Coderafter the host hadalready moved to
…, Coder, Writer, and a seat that left stayed in their copy.settleRoomNamenow answers whether the name moved. The five paths that can move it send onejointhrough the existing
reshareRosterwhen it did:addRoomParticipant— a friend's Bot added by hand;removeRoomParticipant— a friend's Bot removed by hand;ingestSeatShare— a seat's ownleaveenvelope;evictUnshared— a grant revoked under a guest;admitClaim— a room link's claim seating a home's Bots, reached by the knock and by the inbox poll.The seat that just changed is left out of that broadcast (
reshareRoster→notifyRoomSharetake anexcept), because its own targetedjoinis the one it is owed: an arriving guest still gets exactlyone join, and it carries the same text the host holds. A room with a chosen name, a mirror of another
home's room and a face-to-face room still send nothing for a seat change; a seat change that leaves the
computed name alone sends nothing either. No new envelope op, no client change, and
#1999's own guards(
next === room.name,inbound-share,isFaceRoom) are untouched.Docs: the seat/name row of
docs/subsystems/core-host.mdnow says the guests are told as well.Verification at the tip
Tip SHA:
2aa88a8c12734aec51e0d4fc74d8745884245069Ran:
TZ=UTC ARCH_DOCS_BASE=b7fa18c7348e23ca1079f56bd0943f910ff0bff8 npm run verify→ exit 0, run on a cleancheckout of this head
2aa88a8c…itself (detached at the pulled tip, working tree clean before and after).The same command had also been run on the local commit
72f61b3aadd1701c068569adf9ef4fab8826aa02, whosetree
bae5e1d1…is this head's tree; the two runs agree on every number below.core 2414/2414 (the same core suite on
b7fa18c7measures 2409/2409, so the tip adds exactly the fivenew tests); social 541, tree 127, timeline 135, workflow 336,
.github/scripts563, interop 37,live-e2e 24, all 0 fail; core lint 73 warnings / 0 errors, plugin lint 36/9/2/16 warnings / 0 errors,
interop and live-e2e lint 0 warnings / 0 errors;
arch-docs: OK (6 changed file(s))measured againstb7fa18c7;ds-bot-patches check3× ok (pin ok, 10 patches apply,core/equalsds-bot/+ patches)and
canonicala no-op.Regression or old debt, one narrow probe run outside the branch and never committed: the same four seat
changes, asserting only that a copy a seated guest holds equals the host's own
room.name, with noliteral name in it. At
cf810a7d(before#1999) it is green — host and guests all stayAlice, Chief A, Chief B, because the host did not move either. Ata989587fit is red —+ 'Alice, Chief A, Chief B, Coder'/- 'Alice, Chief A, Chief B, Coder, Writer'for the guest that wasalready seated; that file is byte-identical on
b7fa18c7, so the same red is this base's. That is the oneline this defect is owed:
#1999moved the host name and left the seated guests behind. The fiveliteral-name tests above stay the main evidence.
Not run (and why): the smoke test (
core/dev/smoke.mjs) — this box has no../deepseek-harnesscheckoutand no
DSH_HARNESS; the CIpackagejob (typecheck, actionlint, pack check) — CI only; Windows.Red first
core/test/remote-room.test.jswith the final tests andcore/src/host/room-membership.jstaken fromb7fa18c7(108 tests):105 is the control: a chosen name moves for no seat and sends nothing, and it is green on the base as
well, so the four reds are the defect and not a fixture that only works after the change.
One call site at a time
Each broadcast was deleted on its own and the whole file run at this tip; nothing else changed:
ingestSeatShareleave removed → only 106 fails;evictUnsharedremoved → only 107 fails;admitClaim) removed → only 108 fails;exceptignored (the changed seat gets the broadcast too) → 94, 104 and 108 fail on "told once, not twice";Checkpoint
{ "pr": 2008, "claim": "Dev-3", "issue": 2004, "at": "2aa88a8c12734aec51e0d4fc74d8745884245069", "summary": "settleRoomName now answers whether a seat change moved an unnamed group's name, and the five paths that can move it — a friend's Bot added or removed by hand, a seat's own leave envelope, the grant eviction and a room link's claim — send one join through reshareRoster when it did. The seat that just changed is excluded from that broadcast, so an arriving guest keeps its single targeted join, and the guests already seated end on the same text the host holds. A chosen name, an inbound mirror and a face-to-face room still send nothing for a seat change.", "files": [ "core/src/host/room-membership.js", "core/test/remote-room.test.js", "docs/subsystems/core-host.md", "changelog.d/2004-seat-rename-broadcast.fixed.md", "patches/ds-bot/files/src/host/room-membership.js", "patches/ds-bot/files/test/remote-room.test.js" ], "checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=b7fa18c7348e23ca1079f56bd0943f910ff0bff8 npm run verify", "result": "green", "at": "2aa88a8c12734aec51e0d4fc74d8745884245069" }, "next": "none — ready for review" }