Repository navigation
fix(sync): converge speakers across jobs and follow bridged conversations - #19432
Merged
Git-on-my-level merged 11 commits intoSep 27, 2026
Merged
Conversation
…ls-and-bridge-redirect
…ls-and-bridge-redirect
…ls-and-bridge-redirect
…ls-and-bridge-redirect
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Git-on-my-level
deleted the
fix/sync-speaker-labels-and-bridge-redirect
branch
September 27, 2026 18:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Incident and cause
On 2026-09-27, independent WAL jobs appended to one roughly 20-minute conversation. Each chunk has its own
speaker_id_scope;ConversationSpeakerIdAllocatorintentionally allocates a new conversation-local number for each scope/provider label. The conversation-wide voice pass is supposed to reconcile them. Production logs show four successful reprocessing runs for that ID but no speaker-resolution result; the pre-change resolver did not logno_audio,unaligned_audio, orno_embeddings, so logs cannot identify the exact early gate. Legacy sync scopes were incorrectly rejected as unaligned. This patch admits those scopes and exposes future gate outcomes. Audio-free conversations remainunavailableand are displayed as such; this PR does not invent a voice match without audio evidence.Another sync conversation was bridged at 11:42:17Z, while iOS continued sending eight speaker PATCHes to its retired ID at 11:43:33–50Z. The stored tombstone was treated as deleted by both the detail route and the assignment transaction, yielding 404. The survivor may renumber a donor's
speaker_id, so simply substituting the survivor ID could label a different voice. The transaction now follows the bridge and selects by stable segment IDs.The same account had live UUID conversations and sync conversations in the pendant window. Logs confirm nine successful Parakeet backfill jobs with 33 successful speech segments across the account's observed 11:35–11:45Z downloads. They do not link the live sessions' STT usage or exact audio spans to those jobs, so they do not establish a numeric duplicate-billing amount. Replaying a WAL against already transcribed live audio can consume STT compute twice; this PR leaves provider routing and paid STT input unchanged.
The per-UID sequencer (#19362, merged during this work) will reduce overlapping backfill job/bridge races, but cannot merge chunk-local speaker identities or make a retired ID in an already open shipped client work. A Parakeet-first live lane could change marginal provider cost and perhaps the number of live stubs; it does not remove the need for conversation-wide voice resolution, bridge redirects, or audio-level deduplication.
Failure class
Failure-Class: none
These are two concrete contracts: conversation-wide speaker identity requires aligned audio evidence, and a server-authored bridge alias must preserve the user's open conversation actions. The shared primitives are the speaker resolver's scope gate and the owner-scoped redirect/assignment transaction; route-only 404 special cases would not preserve the selected voice.
Product invariants
None selected by
scripts/pr-preflight --suggest.Line-Count-Exception: app/lib/providers/conversation_provider.dart | 1951 -> 1979 | reason: replace a retired sync donor with its survivor in the authoritative conversation and search list cache.
Line-Count-Exception: backend/database/conversations.py | 3099 -> 3166 | reason: keep redirect resolution and manual speaker writes in the existing conversation database authority, with transactional regression tests.
Line-Count-Exception: backend/routers/conversations.py | 2157 -> 2169 | reason: preserve the released detail and speaker-assignment routes while accepting the shipped app's segment IDs.
Verification
BACKEND_UNIT_TEST_FILE_LIST=.local/speaker-bridge-tests.txt BACKEND_PYTEST_WORKERS=4 bash backend/test.sh: 107 focused tests passed across five files, including the assignment route compatibility suite.flutter test --no-pub test/widgets/transcript_test.dart test/unit/ui_format/speaker_names_test.dart test/providers/speaker_summary_refresh_test.dart test/widgets/name_speaker_sheet_test.dart: 38 tests passed.backend-sync-backfill,backend-sync, andbackend; no Firestore user document or API reads.OMI_PR_BODY_FILE=.local/pr-body-speakers-bridge.md make preflight: passed; pre-push ran 54 selected checks. CI status will be verified on the exact PR head.