Repository navigation
host: renaming a group never reaches the guests already seated in it - #1952
Conversation
|
Verdict: PASS at e13f877 Ran at this tip: Red first (hard requirement): with only
and the other 86 stay green, so the red is the change's own, not a broken tree. With the tip impl restored: 87/87. Scope: tip is the pushed head Fix reads correctly: Checks at this tip: 13 check-runs, 12 success; the only failure is |
…hinkFlowLab#1949) Replayed onto main c3f76e4 (v0.2.19): a merge of main into this branch, so main's newer lines stay exactly as they are — the ThinkFlowLab#884 seat-line guard and its test, and the notice push in updateRoom — with this branch's rename push on top of them. The test file keeps both cases; patches/ds-bot/0002 and patches/ds-bot/files/ are regenerated from core/ (check: series reproduces core/). Owner: Dev-2 Reviewer: Birfy Written-by: Dev-2 Replayed-by: Replay 71be Branch: dev/2-p302-rename-push Base: c3f76e4
e13f877 to
54e0154
Compare
|
Verdict: PASS at 54e0154 Ran at this tip: Tier: T2 (risk tier check success at this tip) Red first, once: with only
and the other 87 stay green, so the red is the change's own, not a broken tree. With the tip source restored: 88/88. Scope: this tip is the same change set as Checks at this tip: 13 check-runs, 12 success — Supersedes the PASS at |
Fixes #1949
Owner: Dev-2
Reviewer: Birfy
Written-by: Dev-2
Claim-Id: 762e8d9ebe384f45b7e32687f68a9999
Branch: dev/2-p302-rename-push
Base: c3f76e4
updateRoomincore/src/host/roster.jspushed the membershipjoinonly when the notice changed (if (noticeChanged) void rt.notifyRoomShare?.(room, { op: 'join' })), and nothing else in that function told a seated guest about a rename. A guest applies a name only from an envelope that carriesname(room-membership.js:2491), and onlyop: 'join'/op: 'line'envelopes carry it — joins being sent on seat changes, notice changes and invitations, not on rename.So a seat holder kept the old title until some unrelated push or the next chat line in that room, and a quiet shared room kept the old name indefinitely. The reproduction in the issue shows the boundary is precise: the name is right after a line, wrong after a rename and nothing else.
What changed
updateRoomalready computed whether the name moved, but only used it forretitleRoom; the membership push at the end of the function looked at the notice alone. One condition now covers both settings, and there is still exactly one push per save:No new envelope field: the
joinpayload already carriesname: room.namenext to the roster, notice and history, so the guest's copy follows the same snapshot it already takes.#1939's rule is untouched — a save that writes back the values the room already holds changes neither flag and sends nothing — and a save that changes both still sends one envelope, not two.Docs:
docs/subsystems/core-host.mdrecords the rule where the notice push is described ("A rename is that same push (#1949) … and a save that changes the name and the notice together still sends one envelope").patches/ds-bot/0002-flybot-api-host.patchcarries theroster.jsedit (that path is patched, not mirrored) andpatches/ds-bot/files/test/remote-room.test.jsis the generated mirror of the new case; both were written bynode scripts/ds-bot-patches.mjs generate, andcheckandcanonicalare clean.Red first
The new case is the issue's reproduction, two homes over
core/test/remote-room.test.jswith the existing wire helper: a remote seat is admitted towar, then the host renames the room and settles the shares. Against the base source with the case added (git show c3f76e43…:core/src/host/roster.js > core/src/host/roster.js; that blob is the same one48c0df28carried):The assertions before it already hold on the base, which is what makes the red precise: the seat projected the room, the guest started with
'War room', and writing that same name back sent no join. Only the rename is missing.With the branch's
roster.jsthe same case is green, and so is the whole file:# tests 87 / # pass 87 / # fail 0.Rebase onto
c3f76e4381b0e54ed2fd3067b1167441b19cb711The release
#1955movedmaintoc3f76e4381b0e54ed2fd3067b1167441b19cb711, so the branch was replayed on it. The two cases that now sharecore/test/remote-room.test.jscame from different changes:#1951's seat-line case (merged in88aaf3c7) and this one. Both blocks are kept whole — neither case's assertions were rewritten — and the generated mirrorpatches/ds-bot/files/test/remote-room.test.jsis byte-identical to the source file (cmpclean).On that base each fix still carries its own red, re-run with only one source blob swapped back to the base:
Mutation — the condition has teeth on both sides
if (nameChanged || noticeChanged)back toif (noticeChanged)#1949fails:one rename is one join,1 !== 2if (nameChanged)#1939fails:one changed notice is one envelope,0 !== 1, and#1949's own notice-change assertion fails tooSo the fix cannot be read as "rename works, notice broke": each half of the condition is load-bearing, and
#1939's existing case is the guard on the other half.Verification
TZ=UTC ARCH_DOCS_BASE=c3f76e4381b0e54ed2fd3067b1167441b19cb711 npm run verify→ exit 0, on a clean tree (git status --porcelainempty) laid onc3f76e4381b0e54ed2fd3067b1167441b19cb711, at tree378b3d8b4311a72b11ecda701f193493b24abb62— the tree the pushed head54e0154d2e9ca840ff3d9a798bf2d485b6725abfcarries.arch-docs: OK (6 changed file(s))— the real diff againstc3f76e43is 6 files# tests 2352 / # pass 2352 / # fail 0; plugins/social 541 (540 pass), plugins/tree 127 (126), plugins/timeline 135 (134), plugins/workflow 336,.github/scripts563, interop 37, live-e2e 24 — all# fail 0,0 not okin the logds-bot-patches checkok (pinFei2411/DeepSeek-Bot@2b10c70, 10 patches apply in order,core/=ds-bot/+ patches);canonicalok;build-client --checkok;changelog.mjs checkok (29 fragments)Not run: the smoke test. This checkout has no
dev/bench.sh(onlydev/interopanddev/live-e2e) and no running FlyBot instance to drive, so there is nothing to smoke; the new case runs the two real hosts over the existingflybotSendwire and reads the guest's saved room. Also not run: the CIpackagejob, typecheck and actionlint.Checkpoint
{
"pr": 1952, "claim": "Dev-2", "issue": 1949,
"summary": "Replayed on c3f76e4 (#1955 release) with #1951 seat case kept whole beside this one. updateRoom pushed a membership join only when the notice changed, so a rename never left the host: a guest already seated in a shared room kept the old title until the next line, and a quiet room kept it indefinitely. The join payload already carries the name, so a rename rides that same push, one condition covering both settings. A save that writes back the values the room already holds still sends nothing, and a save that changes both sends one envelope.",
"files": ["core/src/host/roster.js", "core/test/remote-room.test.js", "docs/subsystems/core-host.md", "patches/ds-bot/0002-flybot-api-host.patch", "patches/ds-bot/files/test/remote-room.test.js", "changelog.d/1949-rename-push.fixed.md"],
"checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=c3f76e4381b0e54ed2fd3067b1167441b19cb711 npm run verify; node scripts/ds-bot-patches.mjs check; node scripts/ds-bot-patches.mjs canonical; node .github/scripts/changelog.mjs check", "result": "green", "at": "54e0154d2e9ca840ff3d9a798bf2d485b6725abf" },
"next": "none — ready for review"
}