Repository navigation
Description
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: ec534353e6f94891b64cb0d1c3adc4c4
Branch: dev/5-room-read-honest-count
Base: 7b7f6c4
At: 2026-11-10T05:19:45Z
Category: defect — a capped read that says nothing about what it left out makes a missing message read as gone. #1906 set that rule for read_own_chat (it prints newest 12 of 15 today); the group half of the same read never followed, and room.log holds 60 lines while read_group_chat shows 30, so half the log is behind the cut on a normal room.
Risk tier: T2. core/src/host/** is not listed in any rule of .github/agent/risk-rules.json, so unknownPathTier: T2 applies and the PR needs the T2 PASS.
Where (live main = 7b7f6c479864df7f9bd0cd9c70ee87de94f8a115):
core/src/host/groups.js:1046—const lines = room.log.filter(line => (line.seq ?? 0) >= from).slice(-ROOM_READ_MAX)core/src/host/groups.js:1047—return lines.length === 0 ? `"${room.name}" has no messages yet.` : `Latest in "${room.name}" (oldest first):\n${transcript(lines)}`core/src/host/groups.js:228—const ROOM_READ_MAX = 30; the log itself is capped at 60 (ROOM_LOG_MAX).
Red first — measured on d5d08680441b7d6ed4afd834571007a837d16a69, with only the new test added. groups.js blob d93dd542d6f8431e91b62915c219ea74002ab1f1 is byte-identical at the two bases above, so these readings hold on 7b7f6c47 without a re-run:
# tests 4
# pass 3
# fail 1
not ok 1 - P-658: a room read that cuts the log says how much it left out
error: 'no count of what was left out: Latest in "Ops" (oldest first):'
The four cases, one by one: 45-line log → 30 lines returned but the header names no count (the one red); 20 lines → byte-identical to today; a member with joinedSeq: 20 → 25 lines and no newest N of (lines before the join are not "left out"); empty room → "Ops" has no messages yet. unchanged.
Expected: the header states the cut — Latest in "Ops" (newest 30 of 45, oldest first): — and when nothing is cut the output is byte-identical to today. The cap itself does not change.
Slice (XS, one file): groups.js:1046-1047 only — keep kept (after the from filter) apart from lines (kept.slice(-ROOM_READ_MAX)), older = kept.length - lines.length, and add newest ${lines.length} of ${kept.length}, to the header only while older > 0. No new parameter: reading earlier lines is P-659 and stays separate.
Mirror: groups.js is mirrored by patches/ds-bot/0012-room-membership.patch, so the change needs node scripts/ds-bot-patches.mjs generate and then check. The generate lane is single-file-wide and is currently held by #2779; the branch above is held until that PR lands, and no patch file is touched before it does.
Dedupe (2026-11-10, two steps). 1) Product ledger and notes: read_group_chat 0 hits. 2) GitHub: read_group_chat in:title 0; read_group_chat 10 results, all closed (#1325/#99 fences, #1204 budget, #796 token study — none about the cut); "room log" cap 19 results, all closed, none on this face; #1204's body never mentions read_group_chat, so this half's silence was never decided.
Written-by: FlyBot Lead
Bot: FlyBot Dev-5
Activity
fix(groups): say how many room lines a capped read left out
fix(groups): say how many room lines a capped read left out
fix(groups): say how many room lines a capped read left out (ThinkFlo…