Fix/guard connection state#114
Open
siddimore wants to merge 2 commits intolivekit:mainfrom
Open
Conversation
- Convert #ifndef include guards to #pragma once in result.h, data_track_error.h, room.h, and subscription_thread_dispatcher.h for consistency with the rest of the public headers - Add Room::connectionState() public accessor (lock-guarded, purely additive — no existing API changed) - Fix VideoStream class-level doc comment (was copy-pasted from AudioStream: wrong class name and example types) - Add unit tests for Room::connectionState() in test_room_callbacks.cpp - Add unit tests for Result<T,E> and Result<void,E> in test_result.cpp (addresses TODO in result.h requesting invariant test coverage)
stephen-derosa
approved these changes
May 4, 2026
Contributor
stephen-derosa
left a comment
There was a problem hiding this comment.
awesome thanks for the fixes/tests!
alan-george-lk
approved these changes
May 4, 2026
Contributor
alan-george-lk
left a comment
There was a problem hiding this comment.
Approved with nitpick on grammar -- thanks for the contribution!
| /// Note: std::move on a const& silently falls back to a copy, so we assign | ||
| /// directly. Changing the virtual signature to take by value would enable | ||
| /// a true move but is an API-breaking change left for a future revision. | ||
| /// a true move but is a API-breaking change hence left for a future revision. |
Contributor
There was a problem hiding this comment.
Nit: should still be an (right?)
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.
Summart
Three independent improvements bundled together as non-breaking maintenance work: include guard consistency, a missing read-only accessor, and test gaps filled.
Changes
Room::connectionState() accessor
connection_state_ was private with no public getter. Callers who need the current state had to track it themselves via RoomDelegate::onConnectionStateChanged.
Fix VideoStream class-level doc comment
The class description block was copy-pasted from AudioStream and still referred to PCM audio, AudioFrameEvent, and int16 samples. Updated to describe video correctly.
Tests