Repository navigation
Description
Summary
Desktop /v4/listen sessions can be rebound to stale backend conversation IDs from older conversations.
User-visible behavior
A new desktop recording can receive an old memory_created / memory_processing_started event, get completed locally against that stale backend ID, and then fail final reconciliation when stop/finalize returns a different backend conversation.
Typical result:
- the local session is marked completed too early against an unrelated backend ID
- stop/finalize returns a different backend conversation ID
- timestamp reconciliation fails
- the local row ends up in a broken state such as
failed | in_progress - the backend conversation often ends up as a discarded or mismatched result
Why this is distinct
This is not the same issue as #6954.
#6954is about/v4/listengetting starved of audio before STT produces segments- this issue is about stale backend lifecycle/conversation IDs being injected into a newer recording session
It also differs from narrow post-stop reconciliation issues because the session can already be corrupted before normal stop/reconcile flow finishes.
Evidence
Current backend code still allows transcript memory_id to overwrite the authoritative active conversation ID:
backend/routers/pusher.py:446-457
Current test coverage still encodes that same behavior:
backend/tests/unit/test_listen_pipeline.py:636-644
Current transcribe-path code still forwards current_conversation_id through paths that were previously patched for rollover races:
backend/routers/transcribe.py:2528-2540
There is also repo history showing this exact class of bug was already fixed in earlier commits, but those fixes are not ancestors of current HEAD.
Most likely root cause
The listen/pusher pipeline is treating transcript memory_id as authoritative conversation state and allowing it to overwrite current_conversation_id.
Once a stale backend conversation ID is emitted into a fresh session, the desktop client amplifies the problem by trusting memory_created and persisting that ID immediately.
Expected behavior
- transcript payloads should not mutate the authoritative active conversation ID for the current listen/pusher session
- stale lifecycle events from older conversations should not be accepted as belonging to a newer recording session
- conversation binding across reconnect / rollover should remain session-scoped and deterministic
Proposed direction
- restore the
pusher.pybehavior where transcriptmemory_iddoes not overwritecurrent_conversation_id - restore or re-apply the earlier rollover-race protections (
resolve_transcript_conversation_id, per-segment conversation mapping, non-stale speaker-assignment routing) - make
/v4/listenlifecycle events session-scoped so stale events cannot complete a newer session - harden the desktop client so
memory_createdalone is not enough to complete the current local session without session correlation
Activity
fix: prevent stale memory_id from overwriting active conversation_id
fix: prevent stale memory_id from overwriting active conversation_id
fix: prevent stale memory_id from overwriting active conversation_id
fix: prevent stale memory_id from overwriting active conversation_id
fix(backend): stale transcript memory_id rebinds active /v4/listen co…
fix(listen): bind recordings by client identity (BasedHardware#9349)