Skip to content

A turn pins her thread of the room: the awaited airc read before every turn is gone - #6244

Merged
joelteply merged 2 commits into
canaryfrom
fable/room-thread
Nov 24, 2026
Merged

joelteply merged 2 commits into
canaryfrom
fable/room-thread

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Serves: persistent minds in airc rooms. A turn no longer waits on an airc page read before inference (plan path step 1, fast). The room stays the one record: the thread is a projection of it held in memory, never a copy continuum keeps.

What changed

  • Her Thread is a new SAGE part on her mind's bus (cognition::room::thread). It hears the one feed and takes each line of her rooms into that room's thread. It publishes the new immutable revision on mind/thread (keyed by room), and only then hands the event on (mind/threaded). Her senses hear the handed-on events instead of the raw feed, so a wake for an event comes after the revision that holds it. This ordering comes from construction, not timing.
  • The turn pins one revision. heard_in is synchronous: it reads her thread of the room, and the one Arc rides the burst into the facts, the anchor and world_state. The tokio::join! with an airc page read is gone, from both the message path and the self-tick.
  • Seed, gaps, readiness.
    • When she joins a room, one airc page of it is read off her worker through her own runtime and merged by event id, in lamport order.
    • Seed::Pending | Read | Unread(Unread), where Unread is typed: no runtime, or the airc error.
    • A skipped feed revision marks every thread gapped and reads the rooms again (mind.thread.gap).
  • Exact as-of-E. Each item keeps its airc event id and the revision that applied it. A trigger pushed out by newer lines raises persona.thread.trigger_outside; the test covers 33 newer arrivals (Codex).
  • The codec declares the need: continuum_context::history::ROOM_HISTORY_NEED, the same stated estimate of 32, no longer a constant on Said. Said is now a view over one revision (Said::of(thread, me)). Said::PAGE and Said::of_room are deleted.

Design and review on airc first

  • Codex: forward after apply, one seed reader, readiness and gaps, the codec declares 32, pinned as-of-turn with as-of-E reconstructible, and the 33-arrivals test.
  • Cormac: yes. For capture he wants the revision plus the rendered event ids, not the item list.
  • One change from the post: the thread is per resident, not per node. A node-wide worker dies with whichever runtime first started it, which is the 2026-11-23 CI hang on the feed. Her own runtime is also the natural seed reader.

Not in this PR

Cormac's capture field: the burst carries said.thread().revision and the lines' event ids. The request's history is still rendered from composed deliveries, not from the thread, so "the event ids the request was rendered from" needs history rendered from the thread first. That is the next slice.

Receipts (fable/room-thread at 1097930, base canary 5635929)

  • cargo test -p continuum-cognition --lib: 1030 passed
  • cargo test -p continuum-mind --lib: 1140 passed, including her_thread_holds_a_line_before_it_calls_her
  • cargo test -p continuum-core --lib inbound_attach: 17 passed
  • cargo run -p source-hygiene --bin ratchets -- origin/canary: 133/133
  • clippy on the touched crates: no warnings in touched files
  • +552/−134 across 14 files, about 340 of the added lines in the two new thread files.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…y turn is gone

Each resident's mind has a new SAGE part, her Thread. It hears the one feed, takes each line of
her rooms into that room's thread, publishes the new immutable revision, and only then hands the
event on to her senses. So a wake for an event is published after the revision holding it exists,
by construction (Codex). A turn reads that revision without waiting (`heard_in` is now
synchronous) and keeps the one Arc for its facts, its anchor and its burst.

- The thread is memory only, seeded from one airc page when she joins a room (her own runtime),
  merged by event id, in lamport order. A missed feed revision marks it gapped and reads the room
  again. A page that does not read says why (typed `Unread`).
- The thread is per resident on her mind's bus, not per node: a node-wide worker dies with
  whichever runtime first started it (the 2026-11-23 CI hang on the feed), and her own runtime is
  her seed reader.
- Each line keeps its airc event id and the revision that applied it, so "the thread as of E" can
  be reconstructed. A trigger pushed out by newer lines raises `persona.thread.trigger_outside`.
  There is a test with 33 newer arrivals (Codex).
- The codec declares the history need (`continuum_context::history::ROOM_HISTORY_NEED`, the same
  stated 32 estimate). `Said::PAGE` and `Said::of_room` are gone; `Said` is a view over one
  revision.

Tests: cognition 1030, mind 1140, core inbound_attach 17; ratchets 133/133 against canary.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Codex on #6244: a seed read A that started before a gap, answering after the gap's reread B began, could close the gap with its pre-gap page or overwrite B's outcome. Each read of a room is now numbered; only the newest read's answer is taken, and a superseded answer is probed (mind.thread.read_superseded). Test covers both answer orders with A success/B failure and A failure/B success.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
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