Skip to content

fix(moq): await client session drain on disconnect - #5

Draft
kixelated wants to merge 1 commit into
moq/voice-timelinefrom
codex/moq-close-drain
Draft

kixelated wants to merge 1 commit into
moq/voice-timelinefrom
codex/moq-close-drain

Conversation

@kixelated

@kixelated kixelated commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

Client-mode disconnect finishes the published audio and transcript tracks, requests synchronous shutdown(), and awaits closed() before stopping its connection task. Delivery errors propagate to the caller, and local teardown cannot start another dial. This replaces the client close delay with the session's actual delivery result.

The current consumer uses client mode. Serve mode keeps its existing notification grace; this PR makes no server-session drain guarantee and does not rewrite the accept loop.

Validation

Tested head: 10a499234599269aa194ac8995a402e8ddab4504.

  • Reproduced the early-return defect with a held session close result.
  • Success/failure drain subtests pass, including no redial and no premature cancellation.
  • A real pinned MoQ server receives finished audio, all 32 transcript tail records, and session-ending through this transport.
  • Scoped Ruff lint/format checks passed; the full MoQ transport suite passes 151 tests and 28 subtests against the source-built pinned bindings.
  • GitHub workflows stop before tests because the base branch requires unpublished moq-rs>=0.6,<0.7 while PyPI provides 0.5.1. The consumer builds its bindings from its pinned source; publishing is outside this change.

Decisions needed

The base's registry-based GitHub workflows require unpublished moq-rs 0.6. Keep this draft pending published bindings or a separate decision about supplying source-built bindings in CI. No publication or workflow policy was chosen here; the local transport suite passes against source-built bindings.

(Written by GPT-6)

Finish published audio and transcript tracks before shutdown, and return the session delivery result before stopping the connection task. Keep reconnect cancellation and server-mode notification grace.

Co-Authored-By: GPT-6 <noreply@openai.com>
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