Skip to content

The room's record is memory of this call, not of the last episode - #55

Merged
ralyodio merged 1 commit into
mainfrom
fix/room-memory-is-this-call-not-last-month
Nov 5, 2026
Merged

ralyodio merged 1 commit into
mainfrom
fix/room-memory-is-this-call-not-last-month

Conversation

@ralyodio

@ralyodio ralyodio commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Found immediately by #54: once the legs could actually read the room's transcript, the first rehearsal opened with the previous episode in their heads.

17:43:09 [memory] 80 earlier lines loaded
17:43:15 riotcoder (host) (other agent): Man, that's a brutal one. 33 Bitcoin gone from a backup file you'd forgotten about.
17:43:15 riotcoder (host) (other agent): Wait. Your mom is 81 and uses it?
17:43:15 riotcoder (host) (other agent): Speaking of email, that's Chasbunk's territory. Right?

None of that was said on that call. A group.call room keeps its transcript between calls, and Off The Record records every episode in room 8625, so:

if (r) r.history = (all?.lines || r.history || []).slice(-80);

hands the hosts the last 80 lines whatever their age. That is also precisely what the hosts' brief forbids:

Never say "you mentioned", "as you said" or "you told us" about something that is not in this call's transcript.

The fix

The point of loading the record (SPEC-0001 1.1) is to survive a drop, a crash or a deploy mid-call — a redial takes seconds, a restart a minute. So the window is bounded to the last 30 minutes, still capped at 80 lines: long enough to pick a dropped call back up mid-episode, short enough that the previous episode in the same room is not mistaken for this one. afterId still advances to the true last line, so nothing old is re-read as new.

bun test 112 pass / 0 fail, tsc --noEmit clean.

🤖 Generated with Claude Code

With #54 the legs finally read the room's transcript, and the first rehearsal
after it opened with:

  17:43:09 [memory] 80 earlier lines loaded
  17:43:15 riotcoder (host) (other agent): Man, that's a brutal one. 33 Bitcoin
           gone from a backup file you'd forgotten about.
  17:43:15 riotcoder (host) (other agent): Wait. Your mom is 81 and uses it?

None of that was this call. A room keeps its transcript between calls and Off
The Record records every episode in room 8625, so an unbounded "last 80 lines"
handed the hosts the previous episode as though the guest had just said it -
which is the one thing their brief forbids: never say "you mentioned" about
something that is not in this call's transcript.

The point of loading the record (SPEC-0001 1.1) is to survive a drop, a crash or
a deploy mid-call, and a redial takes seconds. So bound it: the last 30 minutes,
still capped at 80 lines. Long enough to pick a dropped call back up, short
enough that last week's episode is not mistaken for this one.

112 pass, 0 fail; tsc clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ralyodio
ralyodio merged commit 4609305 into main Nov 5, 2026
3 checks passed
@ralyodio
ralyodio deleted the fix/room-memory-is-this-call-not-last-month branch November 5, 2026 17:45
ralyodio added a commit that referenced this pull request Nov 5, 2026
… it (#56)

My own regression from #54. With the legs finally reading the room, a rehearsal
opened with weeks of earlier episodes arriving as though the guest had just
said them:

  17:49:06 riotcoder (host) (other agent): Man, that's a brutal 1. 33 Bitcoin gone...
  17:49:06 riotcoder (host) (other agent): Wait. Your mom is 81 and uses it?

/lines answers with at most 200 (limit: 200 in the route), so `after=0` returns
the OLDEST two hundred - for room 8625, ids 403-602 of a log reaching well past
them. Taking `all.lines.at(-1).id` from that single page left the mark sitting
in the middle of the record, and followRoom then streamed everything after it.
#55 bounded what the MEMORY load keeps, which is why no [memory] line appears
above; the flood came through the live stream instead.

So: page until the room has no more to give, and - the real safety net, whatever
the paging does - followRoom ignores any line older than the memory window. A
line from last week is never what was just said. A line with no timestamp is
still kept.

114 pass, 0 fail; tsc clean.

Co-authored-by: riotcoder <riotcoder@profullstack.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
ralyodio added a commit that referenced this pull request Nov 5, 2026
With the window bounded to thirty minutes (#55) a new episode no longer opens
holding last month's, but takes come back to back: episodes 8 and 9 were
twenty-one minutes apart in the same room, so the default would still have
handed the second one the first one's transcript - and a retake right after a
failure is the normal case, not the odd one.

The leg cannot know where an episode begins. The show does. So --memory-since
(ISO or epoch ms) sets the line, and nothing before it is this call's. Without
it, the thirty-minute window stands, so a plain `join` is unchanged. A value
that does not parse is ignored rather than trusted: a bad flag must not blank
the context a rejoin depends on.

115 pass, 0 fail; tsc clean.

Co-authored-by: riotcoder <riotcoder@profullstack.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant