Skip to content

test(interop): exercise clean media finish across clients - #6307

Merged
kixelated merged 12 commits into
mainfrom
quest/m1/interop-finish
Oct 23, 2026
Merged

kixelated merged 12 commits into
mainfrom
quest/m1/interop-finish

Conversation

@kixelated

@kixelated kixelated commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The interop matrix proves flowing media and raw track tails, but does not exercise a finished media broadcast's late tail, natural ends, withdrawal, and continued session use.

Approach

Add case=finish to the existing runner and finish-only modes to its existing clients. Readers connect first and wait without media demand. After the publisher finishes ten H.264 frames and the catalog and obtains its normal finish handle, the runner releases readers. They require ten nonempty frames, natural media/catalog EOF, exact-path announcement END, and a new untimed health track with complete group/track EOF through the same session. Publishers await the real linger before health and require monotonic elapsed time from before handle creation to cover its returned nonzero duration (no hardcoded duration or tolerance); the FIFO ACK releases teardown only. New finish cells require successful terminal exits and publisher ACK.

GStreamer checks the late tail alone. moqsrc keeps watching a finished broadcast, since an announcement means online/offline, so it has no end, withdrawal, or session to report. Its reader joins once the broadcast has finished, requires exactly ten nonempty video_0 buffers, and stops on an interrupt; the cell passes with the end check marked N/A. No moqsrc lifecycle API is added, since only this test would consume it.

The fixture and its .health sibling share a parent path so one prefix grant covers both, which moq-transport's AUTH extension requires. Pinned moq-transport passes record the finish case as skip: late join, withdrawal, and same-session health after a finish do not yet interoperate there (see Follow-ups).

Rust uses a private example over existing media/model APIs. Browser finish uses finite WebCodecs output and the existing catalog/container APIs; native JS shares its drain assertions. Normal tone, probe, contract, and playback behavior is retained. Finishes quest/m1/interop-finish.md.

Impact

  • Public API: none. Only private interop fixture flags and a Cargo example registration are added.
  • Wire: none. Existing finish, announcement, media/catalog, and raw track formats are exercised.
  • The existing five publishers remain Rust, Python, Go, C++, and browser. GStreamer remains a subscriber only.
  • CI: the cells run in interop.yml's full-matrix step (nightly, and on release PRs that touch the harness). The merge gate is unchanged.

Validation

  • just test interop --all: 169/169 pass, including all 45 finish cells (the five GStreamer cells pass with the end marked N/A).
  • just test interop --finish --all --versions auto,moq-transport-18,moq-transport-20,moq-transport-22 after the prefix grant: lite 45/45; moq-transport fails on every draft, which is why those passes skip (--versions moq-transport-14 then records skip, verified, and the report renders it).
  • Python ruff, native JS/biome via just fix, shellcheck, and quest check --base origin/main pass. just check passes JS, Rust, and quest; its flake check cannot write /proc/self/uid_map on this host (unshare: Operation not permitted).

Alternatives

Preconnect readers instead of increasing retention or adding startup sleeps. Reuse a private Rust fixture instead of adding production CLI flags. Cancellation, transport close, synthetic EOS, or a second health connection cannot prove clean finish. A finite-watch moqsrc mode would have no consumer besides this test. Leaving the moq-transport cells red would fail every nightly on known gaps.

Follow-ups

  • moq-transport finish interop (new): drafts 14 to 19 lose the finished tail on a late join, the half join after a quick finish fixes; drafts 20 and 22 time out on health after withdrawal and native JS refuses a "malformed request stream message". Un-skip the cells when it lands.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

kixelated and others added 9 commits October 22, 2026 05:38
Quest-Claim: f6c2ec75c4873e53
Assert natural media and catalog EOF, exact announcement withdrawal, and continued session use after the finished media lingers. Preflight the reader before publication and keep terminal callbacks owned through teardown.

Co-Authored-By: GPT-6 <gpt-6@openai.com>
Add finish-only hooks around the existing finite media publishers, retain media and catalog readers through natural EOF, and require exact announcement END plus a raw health read over the same session. Completion ACK releases teardown only after the actual broadcast linger.

Validated all four Go/Python publisher and subscriber combinations with ten nonempty frames and 30s linger. Four wrong-count controls reject eleven expected frames. Go build/vet and Python ruff/pyright pass. Required just ci stops on the unchanged Manual.advanceAsync type error addressed by PR6308.

Co-Authored-By: GPT-6 <noreply@openai.com>
Require an untimed health payload, natural group EOF, and then track EOF. Track.ReadFrame only reads the first frame per group, so it cannot establish the group end or reject an extra frame in that group.

Go build and vet pass against the current staged bindings without rebuilding FFI. Required just ci remains blocked by the unchanged Manual.advanceAsync type error covered by PR6308.

Co-Authored-By: GPT-6 <noreply@openai.com>
Match the other finish readers by refusing a timestamp on the raw session health frame. Ruff, formatting and pyright pass; required just ci still stops on the existing Manual.advanceAsync error covered by PR6308.

Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
@kixelated kixelated changed the title Interop covers a clean broadcast finish test(interop): exercise clean media finish across clients Oct 22, 2026
kixelated and others added 3 commits October 22, 2026 14:35
Resolve the audio-tone conflicts (#6284), check GStreamer's finished late tail with its end marked N/A, and retire the quest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…by prefix

moq-transport's AUTH extension carries prefixes alone, so the finish fixture and its health sibling share a parent path. Late join, withdrawal, and same-session health after a finish do not yet interoperate on moq-transport; pinned passes record the case as skipped, tracked by quest/m2/ietf-finish.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review October 22, 2026 22:51
@kixelated

Copy link
Copy Markdown
Collaborator Author

@codex review

(Written by Claude Opus 5.5)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T22:54:45.881884Z 32658f3 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 29 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5a159fdc-4ace-4724-b525-c78ffb1cec9a
📥 Commits

Reviewing files that changed from the base of the PR and between 7928b02 and 32658f3.

📒 Files selected for processing: 18
  • quest/m1/README.md
  • quest/m1/interop-finish.md
  • quest/m1/release-audit/ffi-finished.md
  • quest/m2/README.md
  • quest/m2/ietf-finish.md
  • rs/moq-cli/Cargo.toml
  • test/interop/README.md
  • test/interop/clients/c/subscribe.c
  • test/interop/clients/cpp/main.cpp
  • test/interop/clients/go/main.go
  • test/interop/clients/js-native/finish.ts
  • test/interop/clients/js-native/subscribe.ts
  • test/interop/clients/js/driver.ts
  • test/interop/clients/js/src/finish.ts
  • test/interop/clients/js/src/setup.ts
  • test/interop/clients/python/interop.py
  • test/interop/clients/rust/finish.rs
  • test/interop/interop.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 32658f3135

ℹ️ 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".

@kixelated
kixelated added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit ee1111a Oct 23, 2026
11 checks passed
@kixelated
kixelated deleted the quest/m1/interop-finish branch October 23, 2026 02:28
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