Skip to content

Speaker sample extraction silently dropped during pusher reconnect #6060

Closed as not planned

Description

@beastoin

Speaker sample extraction requests are silently dropped when the pusher WebSocket is disconnected, with no retry, queue, or error log.

Current Behavior

  • When send_speaker_sample_request() is called while pusher_connected=False, the function returns silently at transcribe.py:1660 with no log
  • The extraction request is permanently lost — no retry after reconnect, no local queue
  • The speaker assignment succeeds and is logged, but the downstream extraction never happens
  • This was observed in production: a speaker was correctly identified but no sample was ever extracted because the pusher happened to be reconnecting at the exact moment of assignment

Expected Behavior

  • Speaker sample extraction requests should survive transient pusher disconnects
  • Either queue them locally and replay after reconnect, or log a warning so the issue is observable

Affected Areas

File Line Description
backend/routers/transcribe.py 1660 Silent early return when pusher_connected=False
backend/routers/transcribe.py 2752-2769 Extraction trigger — fire-and-forget, no retry

Solution

Option A (minimal): Add a small local queue in send_speaker_sample_request that buffers requests when disconnected and replays them on reconnect.

Option B (robust): After pusher reconnects, re-check pending speaker assignments for the active session and re-send any that weren't acknowledged.

At minimum, add a logger.warning at line 1660 so dropped requests are visible in logs.

Files to Modify

  • backend/routers/transcribe.py — send_speaker_sample_request() function and reconnect handler

Impact

Speaker profiles fail to extract for any user whose speaker assignment coincides with a pusher reconnect window (~1-2s). The user must record another conversation for extraction to be attempted again.


by AI for @beastoin

Activity

  1. added
    bug
    p1
    capture
    on Mar 26, 2026
  2. ZachL111 commented on Jun 7, 2026

    @ZachL111
    Contributor

    Worked on this one earlier in the morning, just pushed. Will do a PR. Cause is send_speaker_sample_request() returns on a disconnected backend->pusher socket with no log/queue/retry, so the type-105 voice-sample request is silently lost and the speaker profile is never built. Fixing it by mirroring the existing pending_conversation_requests (type-104) pattern: buffer the request and replay it on reconnect, removing each entry only after a confirmed send.

  3. beastoin commented on Jun 10, 2026

    @beastoin
    CollaboratorAuthor

    Closing as not planned per CTO directive (2026-06-10).


    by AI for @beastoin

  4. undivisible commented on Jul 26, 2026

    @undivisible
    Collaborator

    Follow-up fix: #10678 preserves speaker-sample requests not only while disconnected, but also when replay itself hits a transient send failure. The request remains in the bounded queue for the next reconnect.

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

    bugcapturep1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions