Skip to content

fix(perception): page the TURN's room, not the landing-room pointer (#367) - #2175

Merged
joelteply merged 1 commit into
canaryfrom
fix/perception-pages-turn-room
Aug 8, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/perception-pages-turn-room

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

The defect (BigMama's find, task #367)

RECALL pages the persona's DEFAULT room, not the TURN room. Glass-boxed to the perception page: AircRagSource::deliver called page_recent, which airc-lib scopes to the reader's current-room pointer — the landing room (#academy since the commons slice). A turn happening in any other room delivered the default room's transcript, and everything downstream followed the wrong room:

  • the channel digest (the "recent conversation" the persona sees)
  • the derived-room fallback (events.last().room_id → default room → all room-scoped grounding follows)
  • the recall query built from that window — semantic recall paged memories relevant to the default room's chatter instead of the conversation the turn is in (the reported symptom)

This compounds with the academy-commons migration: every citizen's pointer now lands in #academy, so every turn outside it was mis-paged.

The fix

At the paging seam: AircTranscriptReader gains page_recent_in(room, limit); the airc_lib::Airc funnel impl pins EventFilter.channel to the turn room (ctx.airc_room, threaded since #127); deliver() passes it. None keeps the pointer-scoped page — still correct for room-less work (consolidation, dreams). PersonaAircRuntime and AircHandleAdapter forward explicitly rather than inheriting the trait default (#262 lesson).

Verification

  • cargo check green; cargo test airc_source 12/12 including new regression deliver_pages_the_turn_room_not_the_pointer (Some(room) reaches the reader's page scope; room-less ctx pages Some(None)).
  • Existing tests (no_room_scope_derives_room_from_transcript etc.) untouched and green.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

… pointer (#367)

BigMama's find: RECALL pages the persona's DEFAULT room, not the TURN room.
Glass-boxed to the perception page: AircRagSource::deliver called
page_recent, which airc-lib scopes to the reader's CURRENT-ROOM pointer —
the landing room (#academy since 192a299). A turn happening in any other
room (a bench room, a subscribed project room) delivered the default room's
transcript, and everything downstream followed the wrong room: the channel
digest, the derived-room fallback, and the recall query built from that
window. That last hop is exactly the reported symptom — semantic recall
paged memories relevant to the default room's chatter instead of the
conversation the turn is actually in.

Fix at the paging seam: AircTranscriptReader gains page_recent_in(room,
limit); the airc_lib::Airc funnel impl pins EventFilter.channel to the
turn room (ctx.airc_room, threaded since #127); deliver() passes it.
None keeps the pointer-scoped page — still correct for room-less work
(consolidation, dreams). PersonaAircRuntime and AircHandleAdapter forward
explicitly rather than inheriting the trait default (#262 lesson: a
silently-inherited default is how regressions ship).

Regression test: deliver_pages_the_turn_room_not_the_pointer — Some(room)
reaches the reader's page scope; a room-less ctx pages Some(None).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit e8d9767 into canary Aug 8, 2026
@joelteply
joelteply deleted the fix/perception-pages-turn-room branch August 8, 2026 10:40
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