Skip to content

bug: voice endpoint async regression — voice_websocket/voice_stop/get_voice_panel no longer coroutines #723

Closed

Description

@vybe

Summary

18 tests in `unit/test_voice_auth.py` fail with `TypeError: An asyncio.Future, a coroutine or an awaitable is required` after the `feature/707-workspace-panel-flicker-charts` changes to `gemini_voice.py`. The voice router endpoints (`voice_websocket`, `voice_stop`, `get_voice_panel`) are no longer async, which breaks the test harness and likely breaks the live WebSocket session lifecycle.

Context

The full test suite run on 2026-05-08 revealed all 18 `test_voice_auth.py` tests fail on the current branch. The root cause is that changes to `src/backend/services/gemini_voice.py` in PR #707 caused the voice router endpoints to lose their `async def` signatures. FastAPI WebSocket handlers and streaming endpoints must be coroutines.

Additional failure:
`test_voice_auth.py::TestVoiceAuditAttribution::test_on_tool_call_audit_uses_actor_user_not_legacy_kwargs` fails with `TypeError: module, class, method, function, traceback, frame, or code object was expected, got Mock` — the `voice_websocket` attribute resolves to a Mock instead of the real function, likely due to the exclusion of `test_voice_tools.py` (also broken on this branch) causing module stubbing to leak.

Acceptance Criteria

  • `voice_websocket`, `voice_stop`, and `get_voice_panel` in `src/backend/routers/` (or wherever they're registered) are `async def` coroutines
  • All 18 tests in `unit/test_voice_auth.py` pass
  • `unit/test_voice_tools.py` import error is resolved (collection error: `GeminiVoiceService` renamed/removed)
  • Voice WebSocket session start/stop works end-to-end on localhost

Technical Notes

  • Modified files on current branch: `src/backend/services/gemini_voice.py`, `src/frontend/src/views/AgentWorkspace.vue`
  • Check `src/backend/routers/voice.py` (or equivalent) — endpoints must be `async def`
  • Check whether `GeminiVoiceService` class was renamed; update `test_voice_tools.py` import accordingly
  • Collection error in `test_voice_tools.py`: `ImportError: cannot import name 'GeminiVoiceService'`

Activity

  1. added
    priority-p1
    type-bug
    on May 8, 2026
  2. added
    status-in-dev
    on May 8, 2026
  3. vybe commented on May 10, 2026

    @vybe
    ContributorAuthor

    Fixed in PR #726 (046de49 on dev). voice_websocket, voice_stop, and get_voice_panel restored as coroutines; Chart.js bundling and model default also patched.

  4. reopened this on May 10, 2026
  5. vybe commented on Jun 1, 2026

    @vybe
    ContributorAuthor

    Shipped in v0.6.0 (released via #998).

  6. added
    theme-ui-ux
    and removed
    status-in-dev
    on Jun 1, 2026
  7. added a commit that references this issue on Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority-p1theme-ui-uxtype-bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions