Skip to content

fix(listen): flush tail audio before pusher_close on teardown - #9254

Merged
kodjima33 merged 1 commit into
mainfrom
fix/listen-teardown-tail-audio
Jul 8, 2026
Merged

kodjima33 merged 1 commit into
mainfrom
fix/listen-teardown-tail-audio

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Jul 8, 2026 •

Copy link
Copy Markdown
Member

Merge order & dependencies

PR Dependencies
9250 None — merge first (unblocks CI)
9252 None — parallel with #9253, #9254
9253 None — parallel with #9252, #9254
9254 None — parallel with #9252, #9253; #9255 should merge after this
9255 Merge after #9254 (registers teardown tests). Merge after #9250 recommended.
9256 Independent code PR; PR6b prod deploy after merge. Related #9255 not blocking.
9257 Draft. Merge after #9255 (workflow contract CI).
9258 Draft. Independent; merge after wave 1.
9260 Draft. Independent; merge after wave 1.
9261 Draft. Merge after wave 1; PR10c proxy routing follow-up optional.

Summary

  • Reorder _stream_handler finally so final mix and audio_bytes_send run before pusher_close().
  • Replace bare except with logger.error and add behavioral teardown regression test.

Related: #6952

Test plan

cd backend && .venv/bin/python -m pytest tests/unit/test_transcribe_teardown_flush.py -v
# 3 passed

Merge with a regular merge (no squash).

Closes #9237

Made with Cursor

Review in cubic

@mintlify

mintlify Bot commented Jul 8, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
omi 🟢 Ready View Preview Jul 8, 2026, 1:34 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@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.

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

Reorder _stream_handler teardown so final mix + audio_bytes_send run
before pusher_close(), preventing tail audio loss on multi-channel
sessions. Closes #9237.

Verification:
cd backend && python3 -m pytest tests/unit/test_transcribe_teardown_flush.py tests/unit/test_transcribe_decisions.py -v
(22 passed)

Co-authored-by: Cursor <[email protected]>
@Git-on-my-level

Copy link
Copy Markdown
Member Author

Monitor update for PR #9254:

  • Rebased/pushed the PR branch onto current upstream main (e45992cf4) so CI re-ran on the latest base.
  • No unresolved trusted bot review threads were present on the re-scan.
  • Verification passed locally: git diff --check; VIRTUAL_ENV= uv run pytest tests/unit/test_transcribe_teardown_flush.py tests/unit/utils/test_listen_pusher_session.py -q (10 passed).
  • Post-push GitHub checks are now green: Backend unit suite, Hermetic Backend E2E, Desktop Swift Build & Tests, Public Developer API contract, Static Contracts, Hygiene, Formatting, Mintlify.

@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.

backend bug fix conf 5/5: flush tail audio + final mix before pusher_close on teardown (#6952), test, CI green

@kodjima33
kodjima33 merged commit c69a748 into main Jul 8, 2026
19 checks passed
@kodjima33
kodjima33 deleted the fix/listen-teardown-tail-audio branch July 8, 2026 14:34
Git-on-my-level added a commit that referenced this pull request Jul 9, 2026
## Merge order & dependencies

| PR | Dependencies |
|----|--------------|
| 9250 | None — **merge first** (unblocks CI) |
| 9252 | None — parallel with #9253, #9254 |
| 9253 | None — parallel with #9252, #9254 |
| 9254 | None — parallel with #9252, #9253; **#9255 should merge after
this** |
| 9255 | Merge after #9254 (registers teardown tests). Merge after #9250
recommended. |
| 9256 | Independent code PR; **PR6b prod deploy** after merge. Related
#9255 not blocking. |
| 9257 | **Draft.** Merge after #9255 (workflow contract CI). |
| 9258 | **Draft.** Independent; merge after wave 1. |
| 9260 | **Draft.** Independent; merge after wave 1. |
| 9261 | **Draft.** Merge after wave 1; **PR10c** proxy routing
follow-up optional. |


## Summary
- Register `listen_pusher_pipeline` in `workflow_contracts.json`
including PR4 teardown test.
- Run `check_workflow_contracts.py` from pre-push and
`backend-checks.yml` static-contracts; extend detect-changes.

Related: #9194

## Test plan
```bash
cd backend && .venv/bin/python scripts/check_workflow_contracts.py
cd backend && .venv/bin/python -m pytest tests/unit/test_workflow_contracts.py -v
# 5 passed
```

Merge with a **regular merge** (no squash).

Closes #9238

Made with [Cursor](https://cursor.com)

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/9255?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 Jul 9, 2026
## Merge order & dependencies

| PR | Dependencies |
|----|--------------|
| 9250 | None — **merge first** (unblocks CI) |
| 9252 | None — parallel with #9253, #9254 |
| 9253 | None — parallel with #9252, #9254 |
| 9254 | None — parallel with #9252, #9253; **#9255 should merge after
this** |
| 9255 | Merge after #9254 (registers teardown tests). Merge after #9250
recommended. |
| 9256 | Independent code PR; **PR6b prod deploy** after merge. Related
#9255 not blocking. |
| 9257 | **Draft.** Merge after #9255 (workflow contract CI). |
| 9258 | **Draft.** Independent; merge after wave 1. |
| 9260 | **Draft.** Independent; merge after wave 1. |
| 9261 | **Draft.** Merge after wave 1; **PR10c** proxy routing
follow-up optional. |


## Summary
- Wire `MCP_OAUTH_CLIENTS_JSON` / `MCP_OAUTH_CLAUDE_*` into
`runtime_env.yaml`, Helm secrets, and prod backend-listen values.
- Extend `smoke_mcp_chatgpt_review.py` authorize checks, add
`check_mcp_oauth_deploy_contract.py`, and gate `pre-deploy-check.sh`.
- Remove stale `("oauth_client_id", "omi")` automation fallback in
`MemoryExportService.swift`.

**Deploy follow-up (PR6b):** run backend-listen prod deploy +
`smoke_mcp` after merge (requires deploy credentials; not done in this
PR).

## Test plan
```bash
cd backend && .venv/bin/python scripts/check_mcp_oauth_deploy_contract.py
cd backend && .venv/bin/python -m pytest tests/unit/test_mcp_oauth.py -v -k claude
# 1 passed
```

Merge with a **regular merge** (no squash).

Closes #9149
Closes #8537

Made with [Cursor](https://cursor.com)

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/9256?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. -->

This branch was successfully deployed

1 active deployment
staging - docs — 5643cc5e Deployed Jul 8, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Listen: multi-channel tail audio dropped when teardown runs after pusher_close

2 participants