@@ -98,10 +98,12 @@ live server (see `docs/testing.md`).
9898| D4 | ` livekit::shutdown() ` while a Room is still connected | — | ❌ none |
9999| D5 | SIGINT/SIGTERM during a session | — | ❌ none (by design: app responsibility, but undocumented) |
100100| D6 | Process exit without shutdown (warning path) | — | ❌ none |
101- | S1 | Server-initiated ` kDisconnected ` (kick, room deletion, duplicate identity) | — | ❌ none — no test kicks a participant or deletes a room |
101+ | S1 | Server-initiated ` kDisconnected ` via ` ServerLeave ` | ` integration/test_room_reconnect.cpp ` ` ServerLeaveDisconnects ` | ✅ (SimulateScenario) |
102+ | S1 | Server-initiated ` kDisconnected ` (kick, room deletion, duplicate identity) | — | ❌ none — needs server-admin API or fake injector |
102103| S2 | ` kEos ` teardown | — | ❌ none |
103104| S1×D1 | Race: server disconnect vs. client disconnect | — | ❌ none |
104- | S3 | Reconnecting/Reconnected callbacks | — | ❌ none |
105+ | S3 | Reconnecting/Reconnected callbacks | ` integration/test_room_reconnect.cpp ` ` SignalReconnectResumesSession ` , ` FullReconnectReestablishesSession ` | ✅ (SimulateScenario) |
106+ | — | ` simulateScenario ` on a disconnected room throws | ` unit/test_room.cpp ` ` SimulateScenarioOnDisconnectedRoomThrows ` | ✅ |
105107| S4 | ConnectionStateChanged callback | — | ❌ none |
106108| S5 | FFI panic → SIGTERM | ` unit/test_ffi_client.cpp ` (SIGTERM handler + flag) | ✅ |
107109| S6 | Remote participant disconnects | — | ❌ none (only reachable with a second participant) |
@@ -173,10 +175,13 @@ request/async-callback shape the C++ `FfiClient` already uses for connect/discon
173175| 7 | ` FULL_RECONNECT ` | Server sends ` Leave{Reconnect} ` → new ` RtcSession ` , tracks republished | S3, full-reconnect + republish |
174176| 8 | ` DISCONNECT_SIGNAL_ON_RESUME ` | Drops signalling mid-resume → forces resume→full escalation | S3, escalation path |
175177
176- ** Status in this SDK: not wrapped.** There is no reference to ` simulate ` anywhere
177- in ` src/ ` , and ` FfiClient ` has no ` simulateScenarioAsync ` . The Rust core supports
178- it (and the rust-sdks own ` reconnection_test.rs ` , ` data_channel_test.rs ` , etc. use
179- it), but the C++ layer has never surfaced it.
178+ ** Status in this SDK: wrapped.** Exposed as ` Room::simulateScenario(SimulateScenario) `
179+ (` include/livekit/room.h ` , ` src/room.cpp ` ) over ` FfiClient::simulateScenarioAsync `
180+ (` src/ffi_client.cpp ` ), with the C++ ` SimulateScenario ` enum in
181+ ` include/livekit/room_event_types.h ` and proto mapping in
182+ ` src/room_proto_converter.cpp ` . It throws if the room is not connected and blocks
183+ on the FFI callback (so it must not be called from inside a delegate callback,
184+ same as ` disconnect() ` ).
180185
181186** Important:** ` SimulateScenario ` is an * in-band* hook forwarded over the live
182187signalling connection — it still requires a real server. It does ** not** replace a
@@ -195,15 +200,12 @@ Two complementary mechanisms, at different layers:
195200 way to cover S2/S1×D1 deterministically and offline. ` SimulateScenario ` does
196201 * not* help here (it needs a server).
197202
198- 2 . ** Wrap ` SimulateScenario ` (integration, live server)** — add a thin
199- ` FfiClient::simulateScenarioAsync(room_handle, kind) ` plus a ` Room ` hook (or a
200- test-only accessor), mirroring ` disconnectAsync ` exactly; the proto is already
201- generated from the submodule. This is the clean way to drive the currently
202- ** zero-coverage S3 reconnect paths** (` SIGNAL_RECONNECT ` , ` NODE_FAILURE ` ,
203- ` FULL_RECONNECT ` , ` DISCONNECT_SIGNAL_ON_RESUME ` ) and a server-initiated
204- disconnect (` SERVER_LEAVE ` → S1/S2) end-to-end, without server-admin calls.
205- It is the primary unlock for ` onReconnecting ` /` onReconnected ` coverage, which no
206- C++ test currently touches.
203+ 2 . ** ` SimulateScenario ` (integration, live server) — done.** ` Room::simulateScenario `
204+ now drives these paths; ` integration/test_room_reconnect.cpp ` covers
205+ ` SignalReconnect ` and ` FullReconnect ` (S3 reconnecting→reconnected) and
206+ ` ServerLeave ` (S1 server-initiated disconnect). Remaining scenarios worth adding
207+ as they prove useful: ` NodeFailure ` , ` Migration ` , and ` DisconnectSignalOnResume `
208+ (resume→full escalation).
207209
208210Reason-specific disconnects that ` SimulateScenario ` does ** not** cover
209211(` ParticipantRemoved ` , ` RoomDeleted ` , ` DuplicateIdentity ` ) still need either the
0 commit comments