From 3041036d941d3208e76e9395ee5486396007e9fb Mon Sep 17 00:00:00 2001 From: adlee-was-taken Date: Sun, 28 Jun 2026 13:13:27 -0400 Subject: [PATCH] fix: restore doc bar on RtcSession accessors; refresh stale README status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two Important findings from the final whole-branch review: T4-M3: RtcSession::channel_id/channel_state/is_closed lacked /// docs (AGENTS.md mandates /// on every public item; learner-facing code is a primary product). One-line docs added per existing /// style in rtc_session.rs. T7-M2: README "Status" section still read "Scoping. No code yet" — stale post-slice-1. Updated to reflect slice-1 implementation status; minimal edit, surrounding content preserved. --- README.md | 8 +++++--- crates/rutster-media/src/rtc_session.rs | 8 ++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a6267dc..be49935 100644 --- a/README.md +++ b/README.md @@ -130,9 +130,11 @@ exactly as integrators did on top of Asterisk. ## Status -Scoping. No code yet — the [vision revision](docs/superpowers/specs/2026-06-26-vision-revision-design.md) -and ADRs define the architecture; the workspace will be scaffolded from the capability ladder -and the thin-slice first proof. +Slice 1 (WebRTC media loopback) implemented; spearhead steps 2–6 pending. The +[vision revision](docs/superpowers/specs/2026-06-26-vision-revision-design.md) +and ADRs define the architecture; the +[slice-1 design](docs/superpowers/specs/2026-06-28-slice-1-webrtc-loopback-design.md) +documents the active build. ## First proof (the spearhead) diff --git a/crates/rutster-media/src/rtc_session.rs b/crates/rutster-media/src/rtc_session.rs index d00b5e9..63c1fa2 100644 --- a/crates/rutster-media/src/rtc_session.rs +++ b/crates/rutster-media/src/rtc_session.rs @@ -151,14 +151,22 @@ impl RtcSession { }) } + /// Returns the session's `ChannelId` — also the REST API session id + /// surfaced at `/v1/sessions/{id}` (spec §4.5). pub fn channel_id(&self) -> ChannelId { self.channel.id } + /// Returns the current signaling state (`ChannelState` from + /// `rutster-call-model`): `New` → `Connecting` → `Connected` → + /// `Closing` → `Closed`. pub fn channel_state(&self) -> ChannelState { self.channel.state } + /// True once the channel has reached `ChannelState::Closed` — str0m + /// resources are dropped; the loop driver returns `None` and the + /// tokio task tears down. pub fn is_closed(&self) -> bool { matches!(self.channel.state, ChannelState::Closed) }