Skip to content

fix(app,backend): disconnect nags, WAL opus sync, speech-profile identity - #12893

Merged
Git-on-my-level merged 1 commit into
BasedHardware:mainfrom
apoorvdarshan:fix/mobile-open-issues
Sep 9, 2026
Merged

Git-on-my-level merged 1 commit into
BasedHardware:mainfrom
apoorvdarshan:fix/mobile-open-issues

Conversation

@apoorvdarshan

@apoorvdarshan apoorvdarshan commented Sep 6, 2026 •

Copy link
Copy Markdown
Collaborator

What changed and why

Closes #3328, #5363, and #12765. Rebased onto latest BasedHardware/omi main (force-pushed same branch fix/mobile-open-issues; did not sync the fork main).

Product invariants affected

none

How it was verified

Tests

  • backend/tests/unit/test_wear_device_reminder.py — wear reminder stays off
  • backend/tests/unit/test_user_speaker_embedding.py — enroll fails closed on extract/store failure; upload skipped until voiceprint lands
  • backend/tests/unit/test_speech_profile_wav_decode.py — duration guards still pass with store patch
  • app/test/unit/wal_sync_upload_test.dart / speech_profile_enroll_events_test.dart — name contracts

Failure class (fixes)

Failure-Class: none

Cubic review follow-ups

  1. Short segments hard-coded is_user: False — obsolete; matcher module removed by Speaker identification: measured threshold + margin, live clip pooling, SpeechBrain retirement; carries #12531 without the onboarding-step removal #12935
  2. Per-segment sequential embedding HTTP — obsolete; same retired module
  3. Dead speech_profile_enroll_events.dart — kept as single source of event strings; wired via analytics_manager + onboarding/provider call sites

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 26 files

Confidence score: 5/5

  • app/lib/utils/speech_profile_enroll_events.dart is currently unused because nothing under app/lib imports it, so the defined event types and names have no runtime effect; wire the file into its consumers or remove it to avoid shipping dead code.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="app/lib/utils/speech_profile_enroll_events.dart">

<violation number="1" location="app/lib/utils/speech_profile_enroll_events.dart:6">
P3: This new file is dead code in the app: nothing under `app/lib` imports `speech_profile_enroll_events.dart`, so `SpeechProfileEnrollEvent`, `speechProfileEnrollEventName`, and `speechProfileContinuedEventName` are only exercised by their own unit test. The same five event-name strings are already the canonical definitions in `analytics_manager.dart` (`speechProfileSkipped`, `speechProfileUploadSucceeded`, `speechProfileUploadFailed`, `speechProfileEmbeddingStored`, `speechProfileContinued`), so keeping a second copy invites drift between the two. Either wire the production speech-profile flow through this helper and drop the duplicate strings from `analytics_manager`, or remove this file and its test.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread backend/routers/speech_profile.py Resolved
Comment thread backend/utils/stt/speech_profile.py Resolved
Comment thread backend/utils/stt/speech_profile.py Resolved
Comment thread backend/utils/stt/speech_profile.py Resolved
Comment thread backend/utils/stt/speech_profile.py Resolved
/// `Onboarding Step Speech Profile Completed` used to fire on All Done even
/// when the upload failed or the user skipped. These events are the ones
/// that mean a voiceprint actually did or did not land.
enum SpeechProfileEnrollEvent { skipped, uploadSucceeded, uploadFailed, embeddingStored }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: This new file is dead code in the app: nothing under app/lib imports speech_profile_enroll_events.dart, so SpeechProfileEnrollEvent, speechProfileEnrollEventName, and speechProfileContinuedEventName are only exercised by their own unit test. The same five event-name strings are already the canonical definitions in analytics_manager.dart (speechProfileSkipped, speechProfileUploadSucceeded, speechProfileUploadFailed, speechProfileEmbeddingStored, speechProfileContinued), so keeping a second copy invites drift between the two. Either wire the production speech-profile flow through this helper and drop the duplicate strings from analytics_manager, or remove this file and its test.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At app/lib/utils/speech_profile_enroll_events.dart, line 6:

<comment>This new file is dead code in the app: nothing under `app/lib` imports `speech_profile_enroll_events.dart`, so `SpeechProfileEnrollEvent`, `speechProfileEnrollEventName`, and `speechProfileContinuedEventName` are only exercised by their own unit test. The same five event-name strings are already the canonical definitions in `analytics_manager.dart` (`speechProfileSkipped`, `speechProfileUploadSucceeded`, `speechProfileUploadFailed`, `speechProfileEmbeddingStored`, `speechProfileContinued`), so keeping a second copy invites drift between the two. Either wire the production speech-profile flow through this helper and drop the duplicate strings from `analytics_manager`, or remove this file and its test.</comment>

<file context>
@@ -0,0 +1,23 @@
+/// `Onboarding Step Speech Profile Completed` used to fire on All Done even
+/// when the upload failed or the user skipped. These events are the ones
+/// that mean a voiceprint actually did or did not land.
+enum SpeechProfileEnrollEvent { skipped, uploadSucceeded, uploadFailed, embeddingStored }
+
+String speechProfileEnrollEventName(SpeechProfileEnrollEvent event) {
</file context>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed on the rebased tip: speech_profile_enroll_events.dart is the single source for the enroll event-name strings and is imported by analytics_manager.dart. Production onboarding fires them via speechProfileSkipped / speechProfileContinued (wrapper) and speechProfileUploadSucceeded / speechProfileUploadFailed / speechProfileEmbeddingStored (SpeechProfileProvider.finalize). Keeping the helper avoids string drift; removing it would duplicate the names back into analytics_manager.

@Git-on-my-level Git-on-my-level left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @apoorvdarshan - this is a thoughtful bundle. The embedding-stack unification (#12765), the "a 200 means the voiceprint stored" enroll contract, the honest All Done vs enroll-success telemetry, and the honest Android foreground-service Reconnecting/Disconnected states are all real improvements, and the new backend and Flutter unit tests are appreciated. Requesting changes only for the two CI blockers; the rest is feedback.

Blocking (both checks red on this head):

  1. Backend unit suite: tests/unit/test_speaker_person_embedding_recovery.py::test_recovered_embedding_is_usable_for_matching fails with AttributeError: module 'routers.listen.speakers' has no attribute 'SPEAKER_MATCH_THRESHOLD'. This diff swaps that constant for speaker_match_outcome(...) in backend/routers/listen/speakers.py, but the untouched test still reads speakers_mod.SPEAKER_MATCH_THRESHOLD at its assertion. Easiest fix: keep SPEAKER_MATCH_THRESHOLD in the import list alongside the new names, or update the test to speaker_match_outcome(...) == 'accept'.
  2. Formatting: black --check would reformat backend/utils/stt/speaker_embedding.py and backend/tests/unit/test_user_speaker_embedding.py (e.g. the new SPEAKER_EMBEDDING_MODEL_ID = os.getenv(...) block uses single quotes). Running the repo formatter on those two files resolves it.

Should fix / confirm:

  1. app/lib/utils/device_disconnect_notification.dart: shouldNotifyDeviceDisconnect is never called from production - app/lib/providers/device_provider.dart only adds a comment on the disconnect path. As shipped, the #3328 app-side policy is enforced only by its unit test. Please either wire it into the disconnect path (with a persisted lastNotifiedAt), or drop it for now and keep only the backend/Android pieces - an unwired policy helper tends to drift from actual behavior. Same shape for app/lib/utils/speech_profile_enroll_events.dart: nothing under app/lib imports it, and the same five event-name literals are defined again in analytics_manager.dart; having analytics_manager reference these constants (single source of truth) would remove the drift risk the new test currently can't catch.
  2. backend/utils/stt/speech_profile.py: the rewrite replaces one batched hosted call with one /v2/embedding call per segment (the sync path runs them sequentially; the async path gathers under a Semaphore(8)). I could not find a production caller of get_speech_profile_matching_predictions / async_get_speech_profile_matching_predictions anywhere in this repo (only tests import them) - if that's right, please confirm nothing external depends on the old batch contract, and note HOSTED_SPEECH_PROFILE_API_URL is now orphaned in four helm values files (charts/pusher and charts/backend-listen, dev + prod) plus backend/.env.dev.template; a cleanup (here or a follow-up issue) would help. Also flagging a real behavior change: segments shorter than MIN_EMBEDDING_AUDIO_DURATION (0.5s) now resolve to is_user: False without any model decision, where the old classifier saw every segment - fail-closed looks right for identity claims, just want it to be intentional.
  3. backend/routers/speech_profile.py: enroll now persists the Firestore voiceprint before upload_profile_audio; if the GCS upload subsequently throws, the request 500s with the embedding already stored - the inverse of the inconsistency the new ordering comment describes. Consider handling that edge (or documenting it as accepted) so the stored-state invariants stay explainable.

For maintainers (non-blocking for the contributor): backend/utils/other/notifications.py hard-disables the daily "wear your omi" reminder for all users via should_send_wear_device_reminder() -> False, locked by test. That matches #3328's ask and the helper keeps re-enabling cheap, but a blanket off-switch on a re-engagement channel plus the new fail-closed enroll semantics (503 when the embedding API or Firestore is degraded - users can no longer complete speech-profile upload while identity infra is down) deserve an explicit product sign-off before merge.

No split requested - the three concerns are separable but each is small and independently rollbackable; happy to re-review once the two CI items are fixed.


Automated review on behalf of the Omi maintainers. AI-generated feedback; a human maintainer makes the final call.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Git-on-my-level Git-on-my-level added needs-maintainer-review Needs a human maintainer to sign off before merge backend Backend Task (python) labels Sep 7, 2026
@apoorvdarshan

Copy link
Copy Markdown
Collaborator Author

Addressed @Git-on-my-level review on 2d20dc2:

  • Fixed test_recovered_embedding_is_usable_for_matching for speaker_match_outcome
  • Black-formatted the two embedding files
  • Dropped the unwired disconnect-nag policy helper
  • Wired analytics_manager to speech_profile_enroll_events constants
  • Documented accepted enroll write-order edge (embedding before GCS)

Ready for re-review once CI settles.

@apoorvdarshan

Copy link
Copy Markdown
Collaborator Author

@Git-on-my-level ready for re-review — the two CI blockers and the should-fix items from your review are on 2d20dc2 (and earlier follow-ups on this branch):

  • recovery test updated for speaker_match_outcome
  • black formatting on the embedding files
  • unwired disconnect-nag helper removed
  • enroll event names wired through analytics_manager
  • enroll write-order edge documented

CI on the latest head was green when last checked. Happy to address anything else.

@Git-on-my-level Git-on-my-level left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @apoorvdarshan - re-reviewed on 2d20dc2. Both CI blockers from my earlier review are fixed and verified: the recovery test now asserts speaker_match_outcome(...) == 'accept' (backend/tests/unit/test_speaker_person_embedding_recovery.py), and formatting is green on this head. The should-fix items landed too: the unwired disconnect-nag helper and its dead-code allowlist entries are gone, analytics_manager.dart is now the sole consumer of the enroll-event name constants, and the enroll write ordering (extract -> persist voiceprint -> upload audio, with the accepted-inverse comment) is documented in backend/routers/speech_profile.py.

A few things I verified on this head beyond the earlier items:

  • backend/routers/listen/speakers.py: swapping best_distance < SPEAKER_MATCH_THRESHOLD for speaker_match_outcome(best_distance) == 'accept' is behavior-preserving - best_distance is initialized to float('inf') and the math.isfinite rejection matches the old comparison exactly, so only the new telemetry log line changes observable output.
  • app/lib/utils/wal_sync_upload.dart + app/lib/backend/http/api/conversations.dart: I traced the production callers of uploadLocalFilesV2 - WAL names are audio_*.bin by construction (wal.dart getFileName()), local recordings filter audio_omibatch*.bin, and no .part suffix exists in the app, so the new ArgumentError guard should not fire in practice; the sync gate also wraps _uploader in a catch that records a retryable failure rather than crashing.
  • backend/utils/stt/speech_profile.py: decode failures now fail open to _unknown_match() (is_user: False) instead of raising, short segments skip embedding without claiming the user, and the async path gathers per-segment embeddings under Semaphore(8). The sync path still runs per-segment embeddings sequentially - fine while get_speech_profile_matching_predictions has no production caller (still tests-only in this repo).

Remaining non-blocking follow-up: HOSTED_SPEECH_PROFILE_API_URL is now orphaned in backend/charts/pusher/{dev,prod}_omi_pusher_values.yaml, backend/charts/backend-listen/{dev,prod}_omi_backend_listen_values.yaml, and backend/.env.dev.template - worth a small cleanup issue.

For maintainers (non-blocking, pre-merge sign-off): the blanket off-switch on the daily wear reminder in backend/utils/other/notifications.py, the fail-closed enroll semantics (503 while the embedding API or Firestore is degraded), and the removal of the hosted SpeechBrain matching path in favor of the shared /v2/embedding stack are product/infra decisions that deserve an explicit human yes before merge.


Automated review on behalf of the Omi maintainers. AI-generated feedback; a human maintainer makes the final call.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Git-on-my-level
Git-on-my-level dismissed their stale review September 8, 2026 07:09

Both blockers from this review are fixed and verified on the current head (2d20dc2): the person-embedding recovery test asserts speaker_match_outcome(...) == "accept", and formatting is green across the suite. Dismissing as resolved; latest automated review carries the current state.

@Git-on-my-level Git-on-my-level added the positive-signal Automation verified a genuine fix/quality contribution label Sep 8, 2026

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix(app,backend): three real bug fixes (closes #3328, #5363, #12765) with root cause + tests, CI green — would score 4/5 but diff is not scoped (741 lines/24 files across 3 bundled fixes) and PR is DIRTY (merge conflicts); cannot merge, cannot rebase per hard rule. Approve only.

…tity

Rebase onto latest BasedHardware/omi main without syncing the fork main.

- BasedHardware#3328: stop daily wear-your-Omi pushes; Android FGS shows Reconnecting
  only when a BLE retry is scheduled
- BasedHardware#5363: reject decoded WAV on WAL /v2/sync-local-files uploads
- BasedHardware#12765: enroll fails closed until voiceprint stores; honest enroll
  analytics (skip/continue vs upload/embedding stored)

Cubic short-segment / sequential-embedding notes for the retired
utils/stt/speech_profile.py matcher are obsolete after BasedHardware#12935 deleted
that module. speech_profile_enroll_events.dart remains the single source
for event names and is wired through analytics_manager.

Failure-Class: none

Verification:
- backend pytest test_wear_device_reminder + test_user_speaker_embedding
  + test_speech_profile_wav_decode: 36 passed
- Flutter not available on this Linux cloud VM; Dart unit tests deferred
  to CI Mobile App Checks

Co-authored-by: Apoorv Darshan <[email protected]>
@cursor
cursor Bot force-pushed the fix/mobile-open-issues branch from 44c4bf7 to 2ad6c69 Compare September 8, 2026 18:01
@apoorvdarshan

Copy link
Copy Markdown
Collaborator Author

Rebased onto latest BasedHardware/omi main and force-pushed the same head branch (fix/mobile-open-issues). Fork main was not synced.

Also restored the fail-closed enroll ordering that had been lost during earlier "align with main" commits: extract + Firestore voiceprint store happen before GCS upload (503 otherwise), matching the PR claim that a 200 means the voiceprint landed.

Cubic follow-ups answered in-thread (short-segment / sequential-embedding N/A after #12935; enroll-events kept and wired through analytics_manager). Please click resolve on the remaining enroll-events thread if it still shows open — this token cannot resolve review threads.

@Git-on-my-level

Copy link
Copy Markdown
Member

Re-reviewed on 2ad6c69 (rebase onto latest main + restored fail-closed enroll ordering). All previously flagged items verified on this head, several things got materially better, and the product decisions still queued for a maintainer are unchanged from my earlier review.

What the rebase changed, verified against 2d20dc2..2ad6c69 (138 upstream commits, one contributor commit):

  • The entire backend/utils/stt/speech_profile.py matcher (my prior review's third bullet) no longer exists — Speaker identification: measured threshold + margin, live clip pooling, SpeechBrain retirement; carries #12531 without the onboarding-step removal #12935 retired SpeechBrain matching on main. The three old matcher files (routers/listen/speakers.py, utils/stt/speech_profile.py, utils/stt/speaker_embedding.py) are absent from this PR's file list, so the PR is now app + backend/routers/speech_profile.py + notifications only. That also makes my previous HOSTED_SPEECH_PROFILE_API_URL cleanup note moot — zero references remain repo-wide.
  • The fail-closed enroll ordering that the old "align with main" commits had dropped is back: in backend/routers/speech_profile.py upload_profile (POST /v3/upload-audio), extract_embedding → set_user_speaker_embedding → upload_profile_audio → set_speech_profile_duration, with 503s on extract/store failure. That resolves the inverse of cubic's old P2 (voiceprint write failing after GCS upload leaves live audio with no identity): the failure window now precedes the overwrite. The accepted residual edge — GCS upload failing after the voiceprint stored — only stales the identity for the old audio and is documented in-code; agree with that trade.
  • The new test_embedding_store_failure_skips_upload in backend/tests/unit/test_user_speaker_embedding.py pins exactly that: Firestore store raising ⇒ 503, mock_upload and mock_duration never called. The renamed test_extraction_failure_fails_the_request (and its fast_unit_duration_allowlist.txt line) correctly flips the old fail-open contract.

Verified per file on this head:

  • OmiBleForegroundService.kt — handleRetryLogic now returns whether a retry was scheduled; the FGS notification says "Reconnecting..." only in that case, honest "Disconnected" otherwise (skipped during teardown). Fixes the stuck-reconnect nag from cubic's P2 exactly as requested.
  • backend/utils/other/notifications.py — should_send_wear_device_reminder() hard-returns False and gates only send_daily_notification (the 08:00 "wear your omi" push); the bulk-summary notification path is untouched. Covered by backend/tests/unit/test_wear_device_reminder.py.
  • app/lib/utils/wal_sync_upload.dart + the guard call in conversations.dart uploadLocalFilesV2 — traced all entry points on this head: WAL files are audio_*.bin by construction and the local-recordings provider feeds only audio_omibatch*.bin, so the ArgumentError is a should-never-fire invariant, and when it does fire it lands in SyncUploadGate's generic catch (sync_upload_gate.dart), which records a retryable failure and rethrows — no crash of the upload loop, telemetry classified as unknown failure class.
  • wrapper.dart / speech_profile_provider.dart / analytics_manager.dart / speech_profile_enroll_events.dart — "All Done" now emits Onboarding Step Speech Profile Continued, skip emits Speech Profile Skipped, and actual upload/embedding outcomes fire from SpeechProfileProvider.finalize/completeAfterUploadFailure; the old Onboarding Step Speech Profile Completed name is gone (the generic onboardingStepCompleted(step) helper remains for other steps). Event-name strings live in one place (speech_profile_enroll_events.dart) with analytics_manager as the consumer — the drift concern is resolved. Minor nit, non-blocking: speechProfileUploadFailed(reason: ...) only ever receives the same string already carried in notifyError ('TOO_SHORT'/'UPLOAD_FAILED'); the statusCode param is never passed, so real HTTP codes aren't in the funnel yet.
  • device_provider.dart — the Reduce unnecessary notifications for device disconnection #3328 change is the four-line comment only: no disconnect notification is created on this path (the dead policy helper from the first head is gone). Behavior-preserving.

Checks are green on 2ad6c69 (Backend Hermetic Merge Gate, Hermetic Backend E2E, Dart Analyze & Tests, Android Compile Smoke, both stack gauntlets).

Still maintainer calls before merge, same three as before the rebase: the blanket off-switch on the daily wear reminder (a user-facing product choice — #3328 asks for it, but flipping it back on is now a one-line change someone must own), the fail-closed enroll semantics (users get 503s while the embedding API or Firestore is degraded — right for "a 200 means the voiceprint stored", but it's an availability trade), and re-confirming kodjima33's 2026-09-08 approval on the pre-rebase head 2d20dc2 (the force-push rebase + ordering restoration is review-worthy content, and the PR no longer shows dirty).


Automated review on behalf of the Omi maintainers. AI-generated feedback; a human maintainer makes the final call.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-check 2026-09-09: branch was rebased since yesterday's approval (head now 2ad6c69, was 2d20dc2) — diff shrank from 24 files/741 lines to 16 files/269+/25- as parts already landed on main; CI green, but mergeStateStatus is BLOCKED (stale approval dismissed by the push) and not DIRTY. Re-approving; still not merging per BLOCKED state, confidence unchanged at 4/5.

@Git-on-my-level Git-on-my-level left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-verified on squashed head 2ad6c69 against latest main:

  • No overlap with landed work: every remaining hunk is absent from current main. The parts obsoleted by #12935 (short-segment is_user hard-coding, per-segment sequential embedding HTTP against the retired utils/stt/speech_profile.py) are correctly dropped by the rebase.
  • #12765: /v3/upload-audio fail-closed ordering (extract -> Firestore voiceprint store -> GCS upload, 503 on extract/store failure) restored after the rebase and reviewed; app handles the new 503 via completeAfterUploadFailure.
  • #3328: wear-reminder kill-switch gates only the wear push, not the daily summary; FGS notification now honest about whether a retry is scheduled.
  • #5363: WAL filename guard is fail-fast on app-produced audio_*.bin names.
  • CI green on this head (Android Compile Smoke, Backend unit suite, Dart Analyze & Tests, Hermetic E2E).

Merging under maintainer bypass. @mdmohsin7 FYI on the OmiBleForegroundService.kt and device_provider.dart touches — they are comment/notification-state only, no connection-state changes.

@Git-on-my-level
Git-on-my-level merged commit d324a95 into BasedHardware:main Sep 9, 2026
34 checks passed
Git-on-my-level added a commit that referenced this pull request Sep 19, 2026
## Problem

A person label could be written to transcript segments without producing
a durable, versioned person profile. The first concrete broken boundary
was between label assignment and profile publication: sample storage and
embedding storage were separate writes, and the offline cache accepted
legacy vectors without a version contract. A second reproduced boundary
left an embedding behind when one of several samples was deleted.
Adjacent short segments were also verified against only the selected
segment text, so valid expanded speech was rejected before persistence.

Related issues: #7187, #5625, #4455, #5266. PRs #12893 and #12935 are
already merged; this change builds on the current code instead of
repeating them.

## Change

- Publish a verified person sample, transcript, embedding,
`speech_samples_version: 3`, and source conversation/segment IDs in one
Firestore transaction fenced by the person update version.
- Replace old profiles coherently, delete superseded sample blobs, and
invalidate/fence profiles when labels are corrected, samples are
deleted, or the person disappears.
- Reject foreign-person bulk assignments and prevent adjacent sample
expansion from crossing person/user boundaries.
- Require version 3 profiles for offline embedding cache loading and
make missing-embedding recovery version-fenced.
- Add synthetic backend regression coverage for restart/live matching,
offline sync, account isolation, same-ID cross-account isolation,
correction/deletion, failed re-teaching, and in-flight races.
- Add a hermetic mobile journey proving a cached person name renders in
later and offline-synced conversations after provider reload.
- Update the legacy summary fixture to mock the current
duplicate-capture helper used by production.

No model, language threshold, production setting, or customer data was
changed.

## Verification

- `make preflight` — 31 checks passed.
- `BACKEND_UNIT_TEST_FILE_LIST=/tmp/omi-speaker-backend-tests.txt
BACKEND_PYTEST_WORKERS=4 bash backend/test.sh` — all 12 selected backend
files passed (including the new persistence suite).
- `backend/.venv/bin/python -m pytest
backend/tests/unit/test_taught_speaker_persistence.py
backend/tests/unit/test_speaker_identification_language_fallback.py
backend/tests/unit/test_speaker_person_embedding_recovery.py -q` — 19
passed.
- `(cd backend && PYTHON=.venv/bin/python bash scripts/typecheck.sh)` —
0 errors (5997 existing warnings).
- `backend/.venv/bin/python
backend/scripts/check_unit_test_discovery.py` — 1166 selected, 56
policy-covered, 0 orphans.
- `PATH=/Users/dazheng/fvm/versions/3.44.5/bin:$PATH make mobile-verify
ARGS='fast --filter j6'` — 3 executed, 3 passed.
- `(cd app && /Users/dazheng/fvm/versions/3.44.5/bin/dart analyze
integration_test/journeys/j6_persisted_speaker_name_test.dart)` — no
issues found.
- `git diff --check` — passed.

## Remaining checks

Physical-device microphone capture, provider quality on real voices, and
deployment/runtime verification remain for the mobile release lane. This
branch is left reviewable locally and has not been merged or deployed.

Failure-Class: FC-split-mutation-authority
Line-Count-Exception: backend/database/users.py | 2285 -> 2342 | atomic
person speech-profile replacement and invalidation transactions
Line-Count-Exception: backend/routers/conversations.py | 2231 -> 2249 |
authenticated person validation and correction invalidation at the
assignment boundary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend Task (python) needs-maintainer-review Needs a human maintainer to sign off before merge positive-signal Automation verified a genuine fix/quality contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce unnecessary notifications for device disconnection

4 participants