Repository navigation
fix(airc): bound the first-ever attach — coalesce full-history backlog into one watermark frame (#295) - #2094
Merged
Merged
Conversation
…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
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 setswith_coalesced_backlog()(airc card 7d5b6a65, already in the pinned rev 816a0be) — the daemon collapses the whole catch-up phase into ONEAttachCursorAdvancedsummary frame at the live seam. The existing handler persists that frame, so every later attach resumesAfter(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
first_attach_coalesces_backlog_resume_streams_gap(// what this catches: Bevy scene system, snapshot capture, persona tile genome heatmap #295) in the existing tests modinbound_attachmod: 9/9 green🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo