Skip to content

The agent that grows with you

test: retarget three assertions at the command-layer contract (/approve and /voice tts are served)

Teknium3b1655b0e30a
diff --git a/tests/gateway/test_session_commands.py b/tests/gateway/test_session_commands.py
index e10a1bc2a5e..9479e36fa2c 100644
--- a/tests/gateway/test_session_commands.py
+++ b/tests/gateway/test_session_commands.py
@@ -99,7 +99,7 @@ def test_ordinary_daemon_slash_skill_uses_durable_fifo(tmp_path):
for params, reason in [({'command': 'help', 'profile': 'foreign'}, 'profile_mismatch'),
({'command': 'help', 'source': 'telegram'}, 'invalid_params'),
({'command': 'restart'}, 'unsupported_command'),
- ({'command': 'approve'}, 'unsupported_command')]:
+ ({'command': 'sethome'}, 'unsupported_command')]:
denied = await command(**params)
assert denied['error']['message'] == reason, denied
# A second dashboard operator shares access but still obeys the busy fence.
diff --git a/tests/hermes_cli/test_gateway_command_parity_live_session.py b/tests/hermes_cli/test_gateway_command_parity_live_session.py
index 601365962fb..1675392891e 100644
--- a/tests/hermes_cli/test_gateway_command_parity_live_session.py
+++ b/tests/hermes_cli/test_gateway_command_parity_live_session.py
@@ -21,7 +21,8 @@ def test_sidecar_live_session_rpc_is_reported_broken_on_the_shared_gateway():
def test_a_refused_subcommand_keeps_the_rest_of_the_command_routed():
- """``/voice tts`` refuses on the shared gateway; ``/voice on|off|status`` still reach voice.toggle."""
+ """``/voice tts`` runs the owner's ``/voice`` handler (the session's voice state) and Ink no
+ longer names it refused, so the cell is the canonical route rather than a sidecar row."""
import sys
sys.path.insert(0, str(ROOT))
from hermes_cli.commands import COMMAND_REGISTRY
@@ -31,4 +32,4 @@ def test_a_refused_subcommand_keeps_the_rest_of_the_command_routed():
spec.loader.exec_module(gen)
cmd = next(c for c in COMMAND_REGISTRY if c.name == "voice")
cell = gen.ink_cell(cmd, gen.gateway_cell("voice"), gen._ink_commands(), gen._served_methods())
- assert cell == "sidecar: voice.toggle; `tts` refused"
+ assert cell == "canonical route"
diff --git a/ui-tui/src/__tests__/canonicalSidecarSessionVerbs.test.tsx b/ui-tui/src/__tests__/canonicalSidecarSessionVerbs.test.tsx
index 148b35da97e..930513b763e 100644
--- a/ui-tui/src/__tests__/canonicalSidecarSessionVerbs.test.tsx
+++ b/ui-tui/src/__tests__/canonicalSidecarSessionVerbs.test.tsx
@@ -71,7 +71,7 @@ async function overlayKey(gw: GatewayClient, key: string, expected = '/agents ki
const SITES: [string, () => Promise<void>][] = [
[
- 'session.ts::/voice tts (read-aloud runs only in a sidecar turn)',
+ 'session.ts::/voice tts (the owner\'s /voice handler holds the session state)',
async () => {
patchUiState({ sid: 'owner' })
const { gw, request } = owner()
@@ -86,7 +86,9 @@ const SITES: [string, () => Promise<void>][] = [
voice: { setVoiceEnabled: vi.fn(), setVoiceRecordKey: vi.fn(), setVoiceTts: vi.fn() }
} as never)('/voice tts')
await new Promise(resolve => setImmediate(resolve))
- expect(sys).toHaveBeenCalledWith('/voice tts is not available on the shared gateway yet')
+ // The session's voice state is the owner's: `/voice tts` runs its `/voice` handler, never the
+ // sidecar's voice.toggle.
+ expect(request).toHaveBeenCalledWith('slash.exec', { command: 'voice tts', session_id: 'owner' })
expect(request.mock.calls.some(([method]) => method === 'voice.toggle')).toBe(false)
}
],