Skip to content

fix(airc): bound the first-ever attach — coalesce full-history backlog into one watermark frame (#295) - #2094

Merged
joelteply merged 1 commit into
canaryfrom
fix/295-bounded-first-attach
Aug 2, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/295-bounded-first-attach

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Summary

A fresh node (no persisted attach cursor) attached with bare AttachStart::FromTranscriptStart — the variant airc's own doc marks audit/replay tools only — and streamed the room's entire history into the live bus: thousands of events decoded, published, and serviced by every persona as if happening now. BigMama's first Windows core boot pegged 24 cores for ~45 minutes on exactly this (k3-serving carries ~5000+ events); her empty-room control run came up clean, confirming the diagnosis.

Fix

attach_request_for_cursor(): the first-ever attach still starts from the transcript head for cursor correctness but sets with_coalesced_backlog() (airc card 7d5b6a65, already in the pinned rev 816a0be) — the daemon collapses the whole catch-up phase into ONE AttachCursorAdvanced summary frame at the live seam. The existing handler persists that frame, so every later attach resumes After(cursor) unchanged. A resumed attach still streams its gap uncoalesced — those events were live while the node was down and are owed to the durable-transcript writer (#140) and perception.

Semantics

The room starts at join for a fresh node — personas perceive the room AS IT IS NOW (#131). Deep history hydration is #249's bounded durable-transcript path, never a perception replay. Also a #291 front-door fix: first clone + first boot no longer melts the machine.

Testing

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…g into one watermark frame (#295)

A fresh node (no persisted attach cursor) attached with bare
AttachStart::FromTranscriptStart — the variant airc's own doc marks
'audit/replay tools only' — and streamed the room's ENTIRE history
into the live bus: thousands of events decoded, published, and
serviced by every persona as if they were happening now. BigMama's
first Windows core boot pegged 24 cores for ~45 minutes on exactly
this (k3-serving carries ~5000+ events). Confirmed by her empty-room
control: the same build in a fresh room came up clean and reached
serving mode.

Fix: attach_request_for_cursor() — the first-ever attach still starts
from the transcript head for cursor correctness but sets
with_coalesced_backlog() (airc card 7d5b6a65), so the daemon collapses
the whole catch-up phase into ONE AttachCursorAdvanced summary frame at
the live seam. The existing handler persists that frame, so every later
attach resumes After(cursor) as before. A resumed attach still streams
its gap uncoalesced — those events were live while the node was down
and are owed to the durable-transcript writer (#140) and perception.

Semantics: the room starts at join for a fresh node — personas perceive
the room AS IT IS NOW (#131); deep history is #249's bounded
durable-transcript hydration, never a perception replay. Also a #291
front-door fix: first clone + first boot no longer melts the machine.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 8ca8dfe into canary Aug 2, 2026
4 checks passed
@joelteply
joelteply deleted the fix/295-bounded-first-attach branch August 2, 2026 01:37
joelteply added a commit that referenced this pull request Aug 2, 2026
…cklog_tail(32) (#295 follow-up) (#2098)

Joel: 'When you join a Discord channel do you read the whole history
from 10 years back? No — one page.' #2094 bounded the first-ever attach
to zero backlog (pure live-edge join); airc PR #1312 adds the
backlog_tail knob — the daemon streams the newest N backlog events at
the catch-up seam and coalesces everything older into the watermark
summary, tail delivered BEFORE the summary so the #261 cursor
discipline holds.

Continuum side: bump ALL airc crate pins 816a0be → f01a3f4 together
(mixed revs would produce two airc-core versions and type clashes) and
set FIRST_ATTACH_PAGE = 32 on the no-cursor attach. Resumed attaches
unchanged: gap replay stays uncoalesced.


Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

Co-authored-by: Claude Fable 5 <[email protected]>
joelteply added a commit that referenced this pull request Aug 2, 2026
…ose — kinds-filtered paging (#297) (#2101)

Working personas were DEAF to direction while the room was busy: a raw
newest-50 page counts ephemeral StreamChunk frames (~4/sec per talking
persona), so three active residents' own streaming evicted every
durable message from their window within a minute. Glass-boxed live:
a resident asked the same question 3× because four direction messages
never entered her page while the attach cursor advanced normally —
cross-machine delivery perfect, local perception stale: the wire was
fine, the WINDOW was flooded ([[perception-resolution-contract]]
violated at the page seam; the sibling of the #2094 attach flood).

Fix, compression-clean: perception_page_filter() (Message + Attachment)
lives at the ONE AircTranscriptReader impl on airc_lib::Airc; both
delegates (PersonaAircRuntime, AircHandleAdapter) route through the
trait impl. airc pins bumped f01a3f4 → cf6e2c6 (PR #1314) so
page_recent_filtered pushes kinds down to the daemon — the page is the
newest N MESSAGES, not the survivors of newest N raw events. The
replay/hydration InboxRequest keeps kinds: None (durable transcript
wants the full wire).


Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

Co-authored-by: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant