Skip to content

Unit tests for AgentSessionManager #10

Description

@maxonary

Issue

Critical realtime logic has no test coverage.

Current State

  • No unit tests for voice functionality
  • Hard to validate changes
  • No regression prevention

Test Cases Needed

  1. WebSocket Connection

    • Successful connection to gateway
    • Failed connection handling
    • Disconnection and recovery
  2. Audio Handling

    • Audio buffer encoding to base64
    • Audio data sending over WebSocket
    • Invalid audio format handling
  3. Message Handling

    • Parsing OpenAI realtime responses
    • Saving messages to ConversationStore
    • Error responses from OpenAI
  4. State Management

    • isConnected state transitions
    • isListening state transitions
    • Error state updates
  5. Main Actor Isolation

    • Verify all UI updates happen on main thread
    • No race conditions in state updates

No activity

Activity on this issue will appear here.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions