Skip to content

feat(live): the call IS its airc room — server-authoritative room_id keying (#193 slice A) - #2095

Merged
joelteply merged 1 commit into
canaryfrom
feat/call-is-the-airc-room-slice-a
Aug 2, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/call-is-the-airc-room-slice-a

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

What

Collapses the client-minted session_id mirror on the server side: the airc room_id is now THE canonical call/session key in modules/live.rs.

  • Register under the room: voice/register-session registers the session under room_id; the LiveKit room name (STT listener, ambient audio, agent batch, avatar video pump) is the airc room id.
  • Legacy alias, one resolver: a divergent client-minted session_id is recorded in an alias map (session_id → room_id) on VoiceState. Every other session-scoped voice verb — end-session, on-utterance, speak-in-call, play-handle, inject-audio, ambient-add/inject/remove, poll-transcriptions — resolves incoming ids through ONE helper canonical_call_id at its entry. No per-site logic.
  • Probe demoted: the MIRROR ROOM warn becomes "legacy divergent session_id aliased to room_id (client cutover pending, Initialize TypeScript Type Safety Persona Training #193 slice B)". It going silent after slice B is the done-signal.
  • Idempotency on the canonical id: a browser-refresh re-join (fresh minted session_id, same room) dedupes instead of double-spawning listeners/agents, and the fresh legacy id is still aliased. Aliases are dropped at end-session.
  • voice_service.rs untouched: the canonical id is a room UUID, so its Uuid::parse_str paths (register + video_viewers) receive a valid canonical id.

Tests

modules/live.rs gets its (single) test mod, each with // what this catches:

  • canonical registration (session_id == room_id) records no alias, resolver is identity
  • divergent registration keys the call by room; legacy-addressed on-utterance returns the registered persona, legacy-addressed end-session tears down the canonical call and drops the alias
  • re-register with either id dedupes on the canonical id (one active call)

cargo test -p continuum-core --lib --features metal,accelerate live:: — 400 passed, 0 failed.

Not in scope

Client/SDK cutover (slice B), typed RoomId for call_id (slice C), call_server.rs internals.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…— room_id is the canonical call key (#193 slice A)

voice/register-session now adopts the airc room_id as THE call/session key:
the session registers under room_id, and room_id becomes the LiveKit room
name (STT listener, ambient audio, agent batch, avatar video pump). A
divergent client-minted session_id is recorded as a LEGACY alias
(session_id -> room_id) and every other voice/* verb that takes a
call/session id resolves through ONE entry-point helper,
VoiceState::canonical_call_id — end-session, on-utterance, speak-in-call,
play-handle, inject-audio, ambient-add/inject/remove, poll-transcriptions.
No per-site id logic.

The MIRROR ROOM probe is demoted to a calmer warn ("legacy divergent
session_id aliased to room_id, client cutover pending — #193 slice B");
it going silent after slice B is the done-signal. The register idempotency
guard keys on the CANONICAL id, so a browser-refresh re-join (fresh minted
session_id, same room) dedupes instead of double-spawning listeners and
agents; the fresh legacy id is still aliased so subsequent verbs resolve.
Aliases are dropped when their call ends.

Tests (modules/live.rs, one mod): canonical registration records no alias;
divergent registration keys the call by room and legacy-addressed
on-utterance/end-session reach the same session; re-register with either
id dedupes on the canonical id.

Client cutover (slice B) and typed RoomId (slice C) intentionally deferred.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 2960d94 into canary Aug 2, 2026
4 checks passed
@joelteply
joelteply deleted the feat/call-is-the-airc-room-slice-a branch August 2, 2026 01:40
joelteply added a commit that referenced this pull request Aug 2, 2026
…n the wire (#193 slice B) (#2103)

The bridge is the one choke point that knows both ids, so the collapse
lands here: voiceRegisterSession sends roomId on BOTH wire fields (the
LiveKit call IS the airc room, no parallel identity), AIAudioBridge
joins AIs under the same canonical id, and a session→room map
translates the verbs that still receive the browser-tab sessionId
(onUtterance, endSession) to the canonical call id. The server's
slice-A alias layer (PR #2095) still backstops unknown ids; a client
that sends the canonical id is the cutover — the server's MIRROR ROOM
probe going silent is this slice's done-signal.

Continues the CallManager-keyed-by-RoomId direction from PR #2005.
Legacy tree carries 549 pre-existing tsc errors (the #83 path-drift
debt, incl. this file's line-9 RustCoreIPC import); this change adds
none.


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

Co-authored-by: Claude Fable 5 <[email protected]>
@joelteply
joelteply restored the feat/call-is-the-airc-room-slice-a branch August 21, 2026 12: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