vhaudiquet 744ba8b06c feat(claw): the event stream names its seqs, so a client resumes instead of replaying
A session that runs for weeks made every reconnect cost the whole
record: the events route replayed all of it, and the only cursor was a
count of events held, which cannot survive a gap. The replay is now
addressed by seq.

Every frame carries the record's seq as its SSE id, and since is that
seq, so a reconnecting client reads exactly the events it missed. With
no cursor the stream opens on the tail (the newest 400 events, cut back
to the first turn boundary in them) and goes live; the turns above it
come from a new history route, one whole turn per page, each ending
where the previous page began, with a more flag to stop the walk. A
cursor the record can no longer serve comes back stale with a reset
comment and the tail, read under the same lock as the live receiver so
the reset has no hole either.

The transcription fold in the store already had the seq column dense
per key; this exposes it as three range reads (after a cursor, the
newest window, the window below a point) instead of one whole-record
read, and keeps the in-memory record's seqs dense the same way, so a
store-less assembly answers the same protocol.
2026-11-08 18:01:10 +01:00
S
Description
No description provided
MIT
1 MiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 74.9%
Kotlin 13.8%
Vue 7.1%
TypeScript 3%
Dockerfile 0.5%
Other 0.6%