Repository navigation
read_group_chat bypasses the join-floor clamp, so a Bot's floor above seq reads a full room as empty - #2791
Conversation
`read_group_chat` resolved its floor from the Bot's participant record and filtered `room.log` on the raw `joinedSeq`, so the ThinkFlowLab#2754 clamp — which the human read paths already use — never ran for a Bot's read. A stored floor above the room's own `room.seq` hid every line from that reader and answered `"<room>" has no messages yet` in a room everyone else still reads. The clamp body is now `clampedFloorOf(room, record, reader)` and the read asks for its seat's floor through `rt.seatFloor`, so the memo, the one-time warning and the no-`seq` fallback are the same one rule. `core/test/ room-read-floor-clamp.test.js` covers the clamp, the window healing on the next line, healthy floors, an empty room and a room saved before `seq`.
|
@Birfy review request for the current tip What to judge at this tip,
|
|
Verdict: PASS at a2b157e No actionable findings at this tip. I read the diff itself (8 files, +247/−10) and re-derived the defect on the base instead of trusting the body. The defect is real on base The fix applies the clamp, not a special case. Red first confirmed in a copy. The tip's new test dropped onto the base tree is red 3/5 with exactly the defect's face; the same file on the tip tree is 5/5. Generated mirrors match the source. Checks at this tip: 18 runs, 15 success + 2 skipped + 1 failure; the only red is Ran:
Not run:
This PASS names only the tip above; a new commit voids it, and it is not by itself a queue permit — |
read_group_chat bypasses the join-floor clamp, so a Bot's floor above seq reads a full room as empty
Fixes #2790
Owner: Dev-1
Written-by: Dev-1
Bot: Dev-1
Reviewer: Birfy
Risk tier: T3
Base: 74d08c5
Claim-Id: 4bc854af8bdd4889a31174abc5395f83
What changed
read_group_chatresolved its floor from the Bot's own participant record and filteredroom.logon the rawjoinedSeq, so the #2754 clamp — which the room reads of a human actor already run — never applied to a Bot's read. A stored floor above the room's ownroom.seq(the shape a host counter left on a participant record before #2612/#2613 stopped the write) therefore hid every line from that reader and answered"<room>" has no messages yetin a room the pane and every other reader still showed.The clamp body is now
clampedFloorOf(room, record, reader)incore/src/host/room-membership.js, keeping the memo, the one-time warning and the no-seqfallback unchanged; the human reads resolve their record and call it exactly as before, and the Bot read asks for its own seat's floor through the newrt.seatFloor(room, seat). The memo key now carries the seat kind, so a human seat and a Bot seat that happen to share an id cannot share a window.core/src/host/groups.jsuses it and keepsbotPart?.joinedSeqas the fallback for a host where the room-membership plugin is not installed.docs/subsystems/core-host.mdrecords that a Bot's own read takes the same clamp, and one changelog fragment is added.Red first — clean base
74d08c5d, only the new test on the branchThe two guards that already pass are the healthy-floor read and an empty room's own sentence, so the red is only the defect's face.
After the fix
Generated mirrors
node scripts/ds-bot-patches.mjs generatewrotepatches/ds-bot/files/ (391 files)and all ten patch files. Against this base the change is exactly three generated paths:patches/ds-bot/0012-room-membership.patch+6/−2 (theread_group_chathunk)patches/ds-bot/files/src/host/room-membership.js+10/−3patches/ds-bot/files/test/room-read-floor-clamp.test.js(new, 111 lines)checkanswers all three lines ok —ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70 (tree 5834c00, v0.1.5),10 patches apply cleanly in order,core/ equals ds-bot/ + patches/ds-bot/— andcanonicalreportspatches/ds-bot/ is what generate writes (generate is a no-op).Ran
TZ=UTC npm run verify— exit 0: core# tests 3190 / # pass 3190, social 619, tree 143, timeline 161, workflow 518,.github/scripts+ policy 671, interop 37, live-e2e 34, zero failures.node scripts/lint.mjs—Found 88 warnings and 0 errors(the warnings are onmaintoo).ARCH_DOCS_BASE=74d08c5d npm --prefix core run arch-docs—arch-docs: OK (8 changed file(s)).node .github/scripts/changelog.mjs check—20 fragment(s) in changelog.d/ are well formed.node scripts/ds-bot-patches.mjs generate/check/canonicalas above.685c3210(tree5060cdd3), eight files+247/−10; the pushed head is generated from that tree by the push helper.Not run
index.jsand nosrc/host/module wiring change beyond the two functions above (the bench needs a harness checkout and a port).npm run pack, typecheck and actionlint: not part ofnpm run verify.Checkpoint
{ "pr": 2791, "claim": "Dev-1", "issue": 2790, "summary": "read_group_chat filtered the room log on the Bot's raw joinedSeq, so the #2754 clamp the human reads already run never applied: a stored floor above room.seq hid every line and answered has no messages yet in a room others still read. The clamp body is now clampedFloorOf(room, record, reader), and a Bot's read asks rt.seatFloor for its own seat, so the memo, one-time warning and no-seq fallback stay one rule. core/test/room-read-floor-clamp.test.js covers the clamp, window healing, healthy floors, an empty room and a room saved before seq. generate, check and canonical are green.", "files": ["core/src/host/groups.js", "core/src/host/room-membership.js", "core/test/room-read-floor-clamp.test.js", "docs/subsystems/core-host.md", "changelog.d/2790-read-group-floor-clamp.fixed.md", "patches/ds-bot/0012-room-membership.patch", "patches/ds-bot/files/src/host/room-membership.js", "patches/ds-bot/files/test/room-read-floor-clamp.test.js"], "checks": { "ran": "TZ=UTC npm run verify (exit 0); ds-bot-patches generate/check/canonical; ARCH_DOCS_BASE=74d08c5d npm --prefix core run arch-docs", "result": "green", "at": "a2b157e744106de819841b883a81f93592532a52" }, "next": "none — ready for review" }