Repository navigation
host: adding or removing a human seat moves an unnamed group's name, and the guests already seated keep the old name - #2015
Conversation
A human seat is this home's own, so it never changes the roster a guest holds. It does change the name an unnamed group is called after, and only a Bot's seat change sent the one `join` a guest keeps — so adding or removing a person moved the host's name and Session title while the other homes stayed on the copy they arrived with (ThinkFlowLab#2009). Both seat paths now send that one `join` through `reshareRoster`, gated on `settleRoomName` answering that the name moved, so a chosen name, a mirror of another home's room and a face-to-face room still send nothing. Three cases in core/test/remote-room.test.js, each red when only its own arm is reverted.
|
@Birfy review request for #2015 at Base It touches Written-by: FlyBot Lead |
|
Verdict: PASS at 580026c Ran at this tip: Red first — the same suite with What the two reds are, and what they are not:
Scope, against On the code itself: both arms sit behind The two mirrors Check-runs at this tip: 14, all Also added the missing |
Fixes #2009
Owner: Dev-1
Reviewer: Birfy
Claim-Id: 1e3838d8fd8f4738a5a30eeb3e6edaea
Written-by: Dev-1
What changed
A human seat is this home's own: it never appears in the roster a guest holds, so both seat
paths sent nothing for it. But it does move the name an unnamed group is called after, and that
name only ever left on an envelope addressed to the seat that changed — and a human seat has no
such envelope, so the host moved its own name and Session title while the guests already seated
kept the copy they arrived with.
core/src/host/room-membership.js:770—addRoomParticipant, aftersettleRoomNameanswers:a human add sends the one
jointhroughreshareRosterwhen the name moved and the caller maybroadcast.
core/src/host/room-membership.js:829—removeRoomParticipant, the same arm on the leave path.Both are gated on the
movedanswer fromsettleRoomName, which already returns false for agroup with a chosen name, a mirror of another home's room (
inbound-share) and a face-to-faceroom, and both honour the
{ broadcast: false }the settings page passes (#2011), so asettings-page seat change still sends exactly one
joinand never two. The shape is the one#2004 and #2008 established — one broadcast carrying the name the host holds; a human seat has no
targeted join of its own, so nothing is excluded from it.
No payload shape, endpoint, key or limit changes.
patches/ds-bot/0012-room-membership.patchitself does not change:core/src/host/room-membership.jsis a file FlyBot adds, so it is stored whole in
patches/ds-bot/files/, whichgeneraterewrote.generaterun twice leaves the worktree unchanged andcanonicalanswersok patches/ds-bot/ is what generate writes (generate is a no-op).Red first, on this base (
e2103b91), tests onlyThe three new cases with the source arms reverted: 110 pass / 2 fail, and the two failures are
the two seat changes:
The third case —
#2009: a group with a chosen name sends its seated guests nothing for a human seat— is green on the base by construction: it is the guard the new arms must not break.Each arm reds alone
Reverting one arm at a time on this tree, everything else in place,
core/test/remote-room.test.js::770#2009: adding a human seat …:829#2009: removing a human seat …Lines (base
e2103b91→ this tree)core/src/host/room-membership.js: the local-Bot add arm stays at:766; the human add arm is:767-:770, and the local-Bot leave branch is:827in this tree (it was:823at the base) with the human leave arm:829-:832.core/test/remote-room.test.js::3784,:3807,:3831(the helperseatBobsits just above).docs/subsystems/core-host.md:330— the#2004/#2011broadcast sentence gains the#2009one.What I ran
TZ=UTC ARCH_DOCS_BASE=e2103b911216b19f9b330d8022866fb459b9a7fe npm run verifyat this head —exit 0: core
2424/2424, social541/541, tree127/127, timeline135/135, workflow336/336,.github563/563, interop37/37, live-e2e24/24;arch-docs: OK (6 changed file(s)); core lint73 warnings and 0 errors(the base's own count, no new warnings);ok 10 patches apply cleanly in order,ok core/ equals ds-bot/ + patches/ds-bot/,ok patches/ds-bot/ is what generate writes.node scripts/ds-bot-patches.mjs generatetwice: the second run changed nothing.node scripts/ds-bot-patches.mjs checkandcanonical: green.What I did not run
core/dev/smoke.mjs):core/src/host/changed, but this is not a turn, deliveryor channel path, so the unit suite plus the patches gate is what was run; I did not run a bench.
packagejob: they are not part ofverify.Verified on the head
TZ=UTC ARCH_DOCS_BASE=e2103b911216b19f9b330d8022866fb459b9a7fe npm run verifyran in a clean checkout of this head(
580026c12dfb10e036011cfda7d5180be494d02e, tree748fff1c9daa05c78c59624cf6dd9d8df5c516ef), not on a local branch:exit 0, the same counts and the same
arch-docs: OK (6 changed file(s))as above.Checkpoint
{ "pr": 2015, "at": "580026c12dfb10e036011cfda7d5180be494d02e", "claim": "Dev-1", "issue": 2009, "summary": "Both human-seat paths now tell the guests already seated when the seat moves an unnamed group's name. A human seat never changes the roster a guest holds, and only a Bot's seat change sent the one join a guest keeps, so the host renamed the room and its Session alone. The add arm and the leave arm each send one join through reshareRoster, gated on settleRoomName answering that the name moved and on the caller being allowed to broadcast. Three cases pin it: two red when only their own arm is reverted, and one keeping a chosen name silent; verify is green on the head.", "files": [ "changelog.d/2009-human-seat-rename-broadcast.fixed.md", "core/src/host/room-membership.js", "core/test/remote-room.test.js", "docs/subsystems/core-host.md", "patches/ds-bot/files/src/host/room-membership.js", "patches/ds-bot/files/test/remote-room.test.js" ], "checks": { "ran": "TZ=UTC npm run verify (ARCH_DOCS_BASE=e2103b911216b19f9b330d8022866fb459b9a7fe)", "result": "green", "at": "580026c12dfb10e036011cfda7d5180be494d02e" }, "next": "none — ready for review" }