Skip to content

fix(watch): keep supported renditions available - #6896

Merged
kixelated merged 3 commits into
mainfrom
quest/m1/cut-audit/watch-source-robust
Oct 27, 2026
Merged

kixelated merged 3 commits into
mainfrom
quest/m1/cut-audit/watch-source-robust

Conversation

@kixelated

@kixelated kixelated commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

A rejected audio support probe aborted the catalog's whole probe pass, leaving healthy siblings unavailable or an old selection stale. Video rankings with disjoint partial metadata selected nothing even when supported renditions existed.

Approach

  • Refuse a failed audio rendition probe individually, then publish the remaining supported set. Preserve cancellation and clear stale selections when the new set is empty.
  • Keep the existing common-ranking selection; when the rankings conflict, use the first ranking's preferred rendition as the quest specifies.
  • Exercise actual browser decoder probes with an empty audio codec and conflicting video metadata. Register that regression in the existing browser harness.

Impact

  • Public API: none. Existing <moq-watch> and Player sources keep healthy alternatives available; no names or signatures change.
  • Wire: none. Catalog shape and validity rules are unchanged.

Validation

  • Reproduced all three failures before the fix: a bad audio rendition suppressed healthy siblings, an all-bad replacement retained old availability, and conflicting video rankings returned no track.
  • 23 focused audio/video source tests and all 43 audio decoder tests pass, including stale-state removal, later recovery, and shared startup after a rejected probe.
  • Chromium's real AudioDecoder rejects the empty codec while the healthy audio remains selected. Both video renditions pass the real decoder probe, and the picture survives disjoint rankings. An all-bad audio update clears selection, then a healthy update recovers without page errors.
  • Actual just dev playback through the local relay decoded video and had live audio with both source selectors populated. No page errors; all owned demo processes stopped.
  • just fix, clean committed-head just ci, quest validation, and diff hygiene pass.

Alternatives

Refusing the entire catalog would discard healthy siblings. Sharing audio/video support caches would broaden this correctness fix; the existing per-rendition video failure-isolation pattern is sufficient, and caching behavior is unchanged.

Follow-ups

The completed quest and its parent link are removed. No new follow-up quest is needed. API PRs moq-dev/moq#6750 and moq-dev/moq#6751 change a separate livePlayback block in js/watch/src/audio/decoder.test.ts; this PR only adapts the rejected-probe regression to the new refusal behavior.

(Written by GPT-6 (Codex))

kixelated and others added 3 commits October 26, 2026 17:00
Co-Authored-By: GPT-6 (Codex) <noreply@openai.com>
Co-Authored-By: GPT-6 (Codex) <noreply@openai.com>
@kixelated kixelated changed the title One bad rendition never leaves the player with nothing fix(watch): keep supported renditions available Oct 27, 2026
@kixelated
kixelated marked this pull request as ready for review October 27, 2026 00:23
@coderabbitai

coderabbitai Bot commented Oct 27, 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 11 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: 1652d7e4-83a9-4c3d-a68d-ddcd0785cc59
Commits

Reviewing files that changed from the base of the PR and between a8cab1e and 605516d.

Files selected for processing: 12
  • js/watch/src/audio/decoder.test.ts
  • js/watch/src/audio/source.test.ts
  • js/watch/src/audio/source.ts
  • js/watch/src/video/source.test.ts
  • js/watch/src/video/source.ts
  • quest/m1/cut-audit/README.md
  • quest/m1/cut-audit/watch-source-robust.md
  • test/interop/clients/js/source-selection.browser.ts
  • test/interop/clients/js/source-selection/index.html
  • test/interop/clients/js/source-selection/main.ts
  • test/interop/clients/js/tsconfig.json
  • test/justfile
  • 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

chatgpt-codex-connector Bot commented Oct 27, 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-27T00:24:50.049843Z 605516d Draft marked ready
ℹ️ 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.

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed 605516de7bfc5aa78ff5ecc1cd7a4ea5206f2ced against base a8cab1ea4dd41edfffa1abf6cde30af1fe4fd80a.

No actionable bugs found. The per-rendition audio catch preserves cancellation and publishes an empty supported set when appropriate, allowing effect cleanup to clear stale selection. The video fallback remains restricted to supported, enabled, highest-preference renditions and matches the stated first-ranking policy.

Direction and complexity look appropriate: sharing audio/video caches would broaden this small correctness fix without being necessary. The added source, shared-startup, and browser scenarios cover the intended refusal, fallback, and recovery paths.

GitHub-only static review of the diff and relevant signal/decoder/harness context; I did not execute tests or independently verify the reported runtime results. The independent Codex summary also reports no findings.

(Written by OpenAI Codex)

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary for head 605516de7bfc5aa78ff5ecc1cd7a4ea5206f2ced:

  • Changes: a rejected audio probe now refuses only that rendition (cancellation preserved, stale selection cleared when nothing is supported); video falls back to the first ranking's preferred rendition when rankings conflict; browser regression added to the existing harness; finished quest watch-source-robust removed.
  • Reviews: Codex 👍 and an automated review with no findings, both on this head. No unresolved threads. CodeRabbit was rate-limited and is optional.
  • Local: just check passed on this head (js check/test incl. @moq/watch 402 pass, markdown, gh, quest, shell, large_files, toml, nix, justfile). quest check against current main passes; merge with main is clean.
  • No decisions pending; no follow-ups.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 6d55fb4 Oct 27, 2026
11 checks passed
@kixelated
kixelated deleted the quest/m1/cut-audit/watch-source-robust branch October 27, 2026 04:45
kixelated added a commit that referenced this pull request Oct 27, 2026
Resolve the cut-audit README conflict as the union of removals: this
branch finishes flate-budget and main (#6896) finished watch-source-robust.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant