Repository navigation
fix(desktop): detect Telegram calls and gate meeting treatment at finalization - #11832
Merged
Merged
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
…alization Always-listen produced no meeting summary for a 17.5 min Telegram call: MeetingDetector never fired because callAppIsUsingMicrophone() gates on a 9-entry bundle-ID allowlist that omitted Telegram Desktop (com.tdesktop.Telegram), and the browser window-title fallback does not cover it either. The CoreAudio signal was available and discarded. Add Telegram's shipping and legacy bundle IDs to the native call catalog, shared with ProactiveAssistantOrchestrationPolicy so the two catalogs cannot drift independently. Keep conversation_role as OPEN-time session provenance committed locally and to the backend. Introduce a separate backend-owned meeting_treatment_eligible result computed at finalization, and gate meeting Chat arrival and desktop completion notification on it. Meeting treatment requires >=5 min wall-clock and >=60s of deduplicated transcribed speech; short or mostly silent calls still finalize as ordinary conversations without rewriting their role. Speech is counted as the union of non-empty transcript intervals, so the simultaneous microphone and system-audio streams — which emit twins for the same remote speech — cannot roughly double the measure. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]>
Git-on-my-level
force-pushed
the
codex/meeting-detect-reliability
branch
from
August 19, 2026 00:06
4849940 to
e5be633
Compare
Git-on-my-level
added a commit
that referenced
this pull request
Aug 19, 2026
#11832 threaded meetingTreatmentEligible into postMeetingCompletionIfReady and returned early whenever it was non-nil. uploadLocalSegments always returns a non-nil value, so the local-fallback recovery path stopped calling waitForFinalizationProjectionIfNeeded. The threaded value cannot be authoritative: it comes from the from-segments response, which returns before the backend finalizes the conversation, so it carries the default false rather than a decided verdict. That both suppressed the notification and skipped the real check. waitForFinalizationProjectionIfNeeded already reads the finalization projection, applies the same rule via shouldWakeMeetingCompletion, and fails closed on 404 so a short meeting cannot bypass backend policy. Defer to it unconditionally: the >=5 min gate stays enforced, and the wake waits for the projection as it did before #11832. testRecoverPendingFinalizationsProcessesExhaustedBackendBoundLocalFallback already asserts the /finalization request on this path and caught the regression in CI; it is the guard for this fix. Failure-Class: none Co-Authored-By: Claude Opus 5 <[email protected]>
Git-on-my-level
added a commit
that referenced
this pull request
Aug 19, 2026
…ifying (#11836) ## What and why `#11832` threaded `meetingTreatmentEligible` into `postMeetingCompletionIfReady` and returned early whenever it was non-nil: ```swift if let meetingTreatmentEligible { guard meetingTreatmentEligible else { return } scheduleMeetingCompletionNotification(conversationID: conversationID) return // skips the projection wait } guard await waitForFinalizationProjectionIfNeeded(...) else { return } ``` `uploadLocalSegments` always returns a non-nil value, so on the local-fallback recovery path the new branch always won and `waitForFinalizationProjectionIfNeeded` never ran. That wait is what guarantees the backend has projected the conversation before the user is told it is ready. Skipping it can schedule a meeting-completion notification that opens an unhydrated conversation — the same class of failure `#11832` set out to fix. This gates on eligibility without discarding the wait. A known-ineligible finalization (short or mostly silent call) still returns early and never notifies; an eligible one waits for the projection exactly as it did before `#11832`. ## Failure class Failure-Class: none ## Verification - `testRecoverPendingFinalizationsProcessesExhaustedBackendBoundLocalFallback` (`desktop/macos/Desktop/Tests/TranscriptionFinalizationStateMachineTests.swift:606`) asserts the `/v1/conversations/{id}/finalization` request on this exact path. It predates `#11832`, passed on main before it, and failed in CI afterwards with `("[]") is not equal to ("["/v1/conversations/local-fallback-conversation/finalization"]")`. It is the guard for this fix; no new test is added because the existing one already covers the boundary. - `make preflight` — see CI. - The Swift suite could not be run locally: `desktop/macos/scripts/run-swift-ci.sh` requires Xcode 16.4 and rejects the installed Xcode 26.2 regardless of `OMI_SWIFT_CI_XCODE_APP`. **CI is the verifier for this change.** ## Context `#11832` was merged while its 45-minute `Desktop Swift Static & Test Contracts` job was still running; the failure surfaced after the merge. Everything else in that PR — the Telegram catalog fix and the finalization-time meeting-treatment gate — passed CI and is unaffected by this change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/11836?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
Git-on-my-level
added a commit
that referenced
this pull request
Aug 19, 2026
…ibility policy Integrates with the meeting-detection track (#11832, #11836), merged into this branch from main. conversation_role is open-time durable identity, not the treatment decision. Enrichment gated on the role alone would spend a Google Calendar read, a screen-activity query, and a stored-meetings row on a 90-second call that the authoritative finalization policy has already ruled out — and that row would then be visible to our own time-overlap resolver for unrelated conversations in the same window. Desktop meeting-role conversations now defer to is_meeting_treatment_eligible; every other source keeps its prior behaviour. The existing wiring fixture was a zero-segment 'meeting', which the gate correctly skips, so it now carries qualifying speech. That is a fixture correction, not a weakened assertion: a silent conversation was never eligible for meeting treatment. Also folds the bare-meeting-code title pattern ('Meet - amc-iajq-asx') into ConferencingApps as browserCallTitlePattern/isBrowserCallTitle. #11832 consolidated two divergent conferencing catalogs; leaving this pattern in the extractor would have made a third. Failure-Class: none Verified per-file: enrichment_wiring 10, meeting_context_resolution 28, meeting_treatment 4, screen_activity_identity 19, notes_v2 5, usage_context 33, action_item_date_validation 26, structure_timezone 16. All four contract surfaces regenerate with no diff after the merge. Co-Authored-By: Claude Opus 5 <[email protected]>
This was referenced Aug 27, 2026
This branch was successfully deployed
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.
What and why
com.tdesktop.Telegram, normalized to lowercase) and legacyru.keepcoder.telegramID to native call detection. The proactive chat-app policy consumes the same Telegram ID set so the catalogs cannot drift independently.conversation_roleas OPEN-time session provenance. Introduce a separate backend-ownedmeeting_treatment_eligiblefinalization result, persist it with the durable finalization job, and expose it through both the finalization-status and synchronous from-segments responses.Meeting treatment requires at least five minutes of wall-clock duration and at least 60 seconds of deduplicated transcribed speech. Five minutes filters quick calls that should remain ordinary conversations. The smaller speech floor still admits listening-heavy meetings and natural pauses while rejecting long hold/silence captures with only a brief accidental transcription. Interval union makes the floor independent of whether one or both desktop audio streams transcribed the same remote speech.
Line-count exception
Line-Count-Exception: backend/routers/developer.py | 2111 -> 2115 | propagates the new meeting_treatment_eligible field through the existing conversation response model and its two projection sites; splitting this router is unrelated to this fix and would make the change unreviewable.
Failure class
Failure-Class: none
No registered failure class matches this macOS native-process catalog omission or the separate finalization-time treatment boundary.
FC-meeting-trigger-title-identity-driftis a Windows browser-title/event identity contract. The productionisNativeCallAppregression and shared Telegram ID set guard the catalog boundary; backend behavioral tests guard duration, deduplicated speech, finalization persistence, Chat arrival, and response projection.Verification
PYTHON=/Users/dazheng/workspace/omi/upstream-keep-clean/backend/.venv/bin/python bash test-preflight.sh(frombackend/) — 17 passed, 9 optional warnings, 0 failed.PYTHON=/Users/dazheng/workspace/omi/upstream-keep-clean/backend/.venv/bin/python BACKEND_PYTEST_WORKERS=6 BACKEND_UNIT_TEST_FILE_LIST=../.backend-meeting-test-files.txt bash test.sh(frombackend/; the temporary selector listed the six changed/new backend test files and was then deleted) — 195 passed, including the four dedicated meeting-treatment policy tests.PYTHON=/Users/dazheng/workspace/omi/upstream-keep-clean/backend/.venv/bin/python BACKEND_PYTEST_WORKERS=10 bash test.sh(frombackend/) — all 856 backend unit-test files were selected and the runner progressed through nearly the entire suite, but one remaining file produced no output for several minutes and the file-isolated runner has no per-file timeout. The run was interrupted and did not produce a terminal pass/fail summary; full-suite status is therefore unverified../scripts/run-swift-ci.sh --test(fromdesktop/macos/) — could not start because the pinned/Applications/Xcode_16.4.apptoolchain is unavailable in this environment.CLANG_MODULE_CACHE_PATH=/Volumes/scratch/tmp/meeting-detect-swift-cache/clang SWIFTPM_MODULECACHE_OVERRIDE=/Volumes/scratch/tmp/meeting-detect-swift-cache/clang xcrun swift test --jobs 1 -Xswiftc -j1 --disable-index-store --disable-sandbox --skip-update --disable-build-manifest-caching --manifest-cache none --cache-path /Volumes/scratch/tmp/meeting-detect-swift-cache/swiftpm-cache --config-path /Volumes/scratch/tmp/meeting-detect-swift-cache/swiftpm-config --security-path /Volumes/scratch/tmp/meeting-detect-swift-cache/swiftpm-security --scratch-path /private/tmp/meeting-swift-build --package-path desktop/macos/Desktop --filter 'ConferencingAppsTests|TranscriptionFinalizationStateMachineTests|ProactiveAssistantOrchestrationPolicyTests|APIClientConversationCountTests'— SwiftPM reached the debug build and then failed with opaqueerror: fatalError; tests did not execute.CLANG_MODULE_CACHE_PATH=/Volumes/scratch/tmp/meeting-detect-swift-cache/harness-clang SWIFTPM_MODULECACHE_OVERRIDE=/Volumes/scratch/tmp/meeting-detect-swift-cache/harness-clang xcrun swiftc -module-cache-path /Volumes/scratch/tmp/meeting-detect-swift-cache/harness-clang desktop/macos/Desktop/Sources/ConferencingApps.swift .meeting-detect-catalog-harness.swift -o /private/tmp/meeting-detect-catalog-harness && /private/tmp/meeting-detect-catalog-harness— directly compiled the production classifier; both Telegram IDs classified as native call apps and Omi did not. PrintedTelegram catalog classification passed; the temporary source was deleted.python3 scripts/check_desktop_test_quality.py(fromdesktop/macos/) — passed with no new source-reading tests, trapping dictionary initializers, or wall-clock waits.scripts/swift-format-wrapper.sh lint <nine changed Swift files>(fromdesktop/macos/) — passed.make preflight— all 11 manifest checks passed. Because the changes were still uncommitted, the preflight runner reportedfiles=0; rerun after the commit so diff-scoped selection is meaningful.git diff --check— passed.Verification limits
Follow-ups
isRunningOutputmeans an active output stream, not audible speech; games, DAWs, and media apps can satisfy it, while split-process Electron/browser calls can fail a same-process input+output rule.stopTranscription(), so an independent idle race could stop always-on capture.🤖 Generated with Claude Code