Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

test(realtime): prove a redirect leaves Jarvis holding the new context

rubenluetke10-beep72bf6bdae52f
diff --git a/tests/unit/realtime/test_session_action_interrupt.py b/tests/unit/realtime/test_session_action_interrupt.py
index 87474501f2..947a14ec01 100644
--- a/tests/unit/realtime/test_session_action_interrupt.py
+++ b/tests/unit/realtime/test_session_action_interrupt.py
@@ -153,7 +153,8 @@ async def test_c_a_redirect_cancels_the_old_order_and_keeps_the_new_one():
)
jsons = []
- sess = await _run(_scripted_provider(script), brain, jsons)
+ provider = _scripted_provider(script)
+ sess = await _run(provider, brain, jsons)
gate.set()
await asyncio.sleep(0.1)
@@ -164,6 +165,12 @@ async def test_c_a_redirect_cancels_the_old_order_and_keeps_the_new_one():
"stopped" in line.lower() or "cancel" in line.lower()
for line in _spoken(jsons)
)
+ # ...and the replacement is actually ANSWERED. This is the half of the
+ # goal the cancellation alone does not deliver: interrupting has to leave
+ # Jarvis holding the new context, not merely silent.
+ assert provider.session.response_requests >= 1, (
+ "the replacement order was cancelled into silence"
+ )
await sess.end(reason="test")