Skip to content

tts: scope persistent socket readers - #881

Merged
yisding merged 2 commits into
agent/ws2-tts-runtime-scopefrom
agent/ws2-tts-reader-scope
Aug 7, 2026
Merged

tts: scope persistent socket readers#881
yisding merged 2 commits into
agent/ws2-tts-runtime-scopefrom
agent/ws2-tts-reader-scope

Conversation

@yisding

@yisding yisding commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Problem

The persistent multi-context TTS socket reader is still spawned outside lifecycle ownership. It also cannot be drained at TTS scheduler finalization because the shared socket intentionally remains warm until provider close.

Changes

  • own persistent socket readers under the attached TTS provider RuntimeScope
  • assign them a tts-receive finish cohort in both stop modes
  • cancel and drain the named member during manager close while retaining compatibility for externally supplied test tasks
  • place tts-receive after audio-providers-close in the complete Session.stop phase map
  • remove one raw production task spawn from the source ratchet

Validation

  • just check — 8524 passed, 308 skipped
  • focused TTS matrix — 181 passed, 2 deselected
  • focused Ruff and mypy checks
  • source ratchet — raw task spawns 82 to 81
  • teardown-budget ratchet unchanged

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 720a30f1-72a3-45b9-9370-e6c8405c4248

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9cb77a3815

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/easycat/tts/_multi_context_ws.py
@yisding
yisding force-pushed the agent/ws2-tts-reader-scope branch from 9cb77a3 to fa10ac7 Compare August 5, 2026 16:42
@yisding
yisding merged commit 9ed4d4e into agent/ws2-session-stop-mapping Aug 7, 2026
2 checks passed
@yisding
yisding deleted the agent/ws2-tts-reader-scope branch August 7, 2026 04:15
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.

1 participant