Skip to content

feat(spf): complete the moqt-20 publisher cutover (Phase 5) - #42

Merged
mmcc merged 6 commits into
mmcc/moq-publisherfrom
feat/moq-publisher-transport-20
Sep 4, 2026
Merged

mmcc merged 6 commits into
mmcc/moq-publisherfrom
feat/moq-publisher-transport-20

Conversation

@mmcc

@mmcc mmcc commented Sep 4, 2026 •

Copy link
Copy Markdown
Owner

Finishes the publisher side of the moq-transport draft-20 migration begun on mmcc/moq (#41). The merge that brought the codec cutover into mmcc/moq-publisher is the base of this branch; this PR adds the three publisher behaviors the relay's draft-20 upstream join needs.

Changes

  • In-progress-group replay (track-publisher.ts). The actor retains the current group's frames (keyframe + deltas, bound or not, reset on each keyframe) and, on bind, replays them from object 0 under the new alias before continuing live. A subscription joining mid-group — the relay's relative-group 1 upstream join — now decodes instantly instead of waiting a full keyframe interval, and no subgroup stream ever begins partway through a group (the peer drops those). Group-per-frame tracks (catalog, audio) keep using replayLastGroupOnBind; the two paths are mutually exclusive.

  • LARGEST_OBJECT in SUBSCRIBE_OK (§10.2.17). The actor tracks the largest (group, object) it has written on its snapshot; setup-track-publishers passes a getLargestObject reader into registerTrack, and the session reports LARGEST_OBJECT in SUBSCRIBE_OK once content exists, omitting it before. Read at subscribe time, so no snapshot churn. The sandbox loopback relay's SUBSCRIBE_OK parser now skips the parameter block by parity instead of asserting it is empty.

  • Inbound FILL_PARAMETERS (§5.1.3.1). #openAndResetFill opens a uni stream, writes a FETCH_HEADER carrying the initiating Request ID, and resets it — the honest minimum for an origin that serves no fills (a reset is the fill-failure signal; a FIN would falsely claim an empty range). Wired on both the inbound SUBSCRIBE and REQUEST_UPDATE paths, gated on Forward State 1, with FILL_PARAMETERS pulled out of the update's unsupported-parameter set. encodeFetchHeader added to object-stream.ts.

Behavior change

The in-progress-group replay supersedes the old "join at the next keyframe" behavior, so four track-publisher and behavior tests that documented the old join were rewritten. Added actor coverage for Largest Object tracking and session coverage for LARGEST_OBJECT in SUBSCRIBE_OK and the fill open-and-reset.

Verification

All SPF test projects pass (node 353, browser 130). Typecheck, lint, and format clean. Not yet verified live against the relay fleet.

🤖 Generated with Claude Code


Summary by cubic

Completes the publisher side of the moq-transport draft-20 cutover: mid-group subscribers now replay the in-progress group from object 0, SUBSCRIBE_OK carries LARGEST_OBJECT once content exists, and inbound FILL_PARAMETERS is answered with an open-and-reset fill stream. Also adds configurable per-track publisher priorities.

Behavior changes

  • Mid-group subscribers get the full in-progress group replayed from object 0 on bind instead of joining at the next keyframe.
  • SUBSCRIBE_OK includes LARGEST_OBJECT (§10.2.17) once content exists, read from the actor's snapshot at subscribe time.
  • Inbound FILL_PARAMETERS opens a fill fetch stream with the Request ID and resets it — a FIN would falsely claim an empty range. The header survives via writer commit(); without commit(), nonempty fills are rejected with NOT_SUPPORTED, and lingering fills abort when the subscription cancels or ends. Streams open only for nonempty fill ranges (§5.1.3).
  • Track priorities are configurable per track and flow onto subgroup headers and upload send order.

Verification

  • All SPF test projects pass (node 353, browser 130), including a cross-engine A/V alignment test under delayed delivery.
  • Live against relay.mux.dev: the relay's upstream SUBSCRIBE from object 0 opened the first subgroup stream ~1 ms after bind, and the rebind's SUBSCRIBE_OK carried LARGEST_OBJECT without the relay dropping the session.
  • The relay never forwards FILL_PARAMETERS upstream, so open-and-reset stays unit-test-only.
  • Not yet run against sjc.relay.mux.global (needs put+get tokens).

Written for commit 623d4d6. Summary will update on new commits.

Review in cubic

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 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-09-04T15:54:10.943411Z c7770e5 PR opened
ℹ️ 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.

@github-actions

github-actions Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

📦 Bundle Size Report

🎨 @videojs/html

Path Base initial PR initial Initial diff Lazy diff
/media/moq-publish-video 24.34 kB 25.03 kB +708 B (+2.8%) —
Small changes (1, ≤ 300 B)
Path Base initial PR initial Initial diff Lazy diff
/media/simple-moq-video 28.54 kB 28.67 kB +138 B (+0.5%) —
Presets (7)
Entry Initial Lazy
/video (default) 62.57 kB 68.28 kB
/video (default + hls) 201.69 kB 68.28 kB
/video (minimal) 62.31 kB 68.28 kB
/video (minimal + hls) 201.23 kB 68.28 kB
/audio (default) 52.38 kB 68.28 kB
/audio (minimal) 48.31 kB 68.28 kB
/background 12.24 kB 68.28 kB
Media (21)
Entry Initial
/media/mux-video 142.33 kB
/media/mux-audio 142.05 kB
/media/background-video 1.16 kB
/media/cloudflare-video 6.22 kB
/media/dash-video 211.72 kB
/media/google-cast 6.52 kB
/media/hls-audio 22.14 kB
/media/hls-background-video 16.86 kB
/media/hls-video 28.21 kB
/media/hlsjs-video 141.03 kB
/media/moq-publish-video 25.03 kB
/media/mux-background-video 16.87 kB
/media/mux-data 26.70 kB
/media/native-hls-video 7.51 kB
/media/shaka-video 199.21 kB
/media/simple-moq-video 28.67 kB
/media/spotify-audio 6.24 kB
/media/tiktok-video 6.29 kB
/media/twitch-video 6.19 kB
/media/vimeo-video 13.03 kB
/media/youtube-video 6.79 kB
Players (6)
Entry Initial Lazy
/video/player 9.65 kB 68.28 kB
/audio/player 6.10 kB 68.28 kB
/background/player 4.46 kB 68.28 kB
/live-video/player 9.02 kB 68.28 kB
/live-audio/player 6.11 kB 68.28 kB
/publisher/player 6.85 kB 68.28 kB
Skins (41)
Entry Type Initial Lazy
/video/minimal-skin.css css 6.51 kB —
/video/skin.css css 6.32 kB —
/video/minimal-skin js 60.85 kB 68.28 kB
/video/minimal-skin.tailwind js 61.20 kB 68.28 kB
/video/minimal-skin2 js 7.07 kB —
/video/skin js 61.03 kB 68.28 kB
/video/skin.tailwind js 61.37 kB 68.28 kB
/video/skin2 js 6.92 kB —
/audio/minimal-skin.css css 4.88 kB —
/audio/skin.css css 4.81 kB —
/audio/minimal-skin js 46.73 kB 68.28 kB
/audio/minimal-skin.tailwind js 47.07 kB 68.28 kB
/audio/minimal-skin2 js 5.28 kB —
/audio/skin js 50.85 kB 68.28 kB
/audio/skin.tailwind js 51.25 kB 68.28 kB
/audio/skin2 js 5.25 kB —
/background/skin.css css 145 B —
/background/skin js 10.49 kB 68.28 kB
/background/skin2 js 190 B —
/live-video/minimal-skin.css css 6.51 kB —
/live-video/skin.css css 6.32 kB —
/live-video/minimal-skin js 54.71 kB 68.28 kB
/live-video/minimal-skin.tailwind js 54.79 kB 68.28 kB
/live-video/minimal-skin2 js 7.07 kB —
/live-video/skin js 57.55 kB 68.28 kB
/live-video/skin.tailwind js 57.65 kB 68.28 kB
/live-video/skin2 js 6.92 kB —
/live-audio/minimal-skin.css css 4.88 kB —
/live-audio/skin.css css 4.81 kB —
/live-audio/minimal-skin js 40.06 kB 68.28 kB
/live-audio/minimal-skin.tailwind js 39.17 kB 68.28 kB
/live-audio/minimal-skin2 js 5.28 kB —
/live-audio/skin js 43.84 kB 68.28 kB
/live-audio/skin.tailwind js 43.12 kB 68.28 kB
/live-audio/skin2 js 5.25 kB —
/publisher/skin.css css 4.90 kB —
/publisher/skin js 45.74 kB 68.28 kB
/publisher/skin.tailwind js 45.74 kB 68.28 kB
/publisher/skin2 js 5.29 kB —
/global.css css 195 B —
/shared.css css 118 B —
UI Components (60)
Entry Initial Lazy
/ui/airplay-button 11.92 kB 68.28 kB
/ui/alert-dialog 9.13 kB 68.28 kB
/ui/audio-track-radio-group 12.05 kB 68.28 kB
/ui/buffering-indicator 9.32 kB 68.28 kB
/ui/camera-button 12.06 kB 68.28 kB
/ui/camera-radio-group 12.19 kB 68.28 kB
/ui/captions-button 12.15 kB 68.28 kB
/ui/captions-radio-group 12.13 kB 68.28 kB
/ui/capture-placeholder 10.30 kB 68.28 kB
/ui/cast-button 11.90 kB 68.28 kB
/ui/connection-indicator 10.17 kB 68.28 kB
/ui/container 10.19 kB 68.28 kB
/ui/controls 9.54 kB 68.28 kB
/ui/controls-backdrop 1.69 kB 68.28 kB
/ui/controls-content 1.67 kB 68.28 kB
/ui/dialog 9.07 kB 68.28 kB
/ui/dialog-backdrop 1.70 kB 68.28 kB
/ui/dialog-close 2.01 kB 68.28 kB
/ui/dialog-description 1.69 kB 68.28 kB
/ui/dialog-popup 1.87 kB 68.28 kB
/ui/dialog-title 1.70 kB 68.28 kB
/ui/enable-devices-button 12.12 kB 68.28 kB
/ui/error-dialog 13.41 kB 68.28 kB
/ui/fullscreen-button 11.85 kB 68.28 kB
/ui/gesture 10.13 kB 68.28 kB
/ui/hotkey 10.57 kB 68.28 kB
/ui/menu 20.74 kB 68.28 kB
/ui/mic-button 12.05 kB 68.28 kB
/ui/mic-radio-group 12.18 kB 68.28 kB
/ui/mute-button 11.90 kB 68.28 kB
/ui/pip-button 11.87 kB 68.28 kB
/ui/play-button 11.86 kB 68.28 kB
/ui/playback-rate-button 11.97 kB 68.28 kB
/ui/playback-rate-radio-group 12.04 kB 68.28 kB
/ui/popover 8.53 kB 68.28 kB
/ui/poster 9.38 kB 68.28 kB
/ui/publish-badge 10.27 kB 68.28 kB
/ui/publish-button 10.67 kB 68.28 kB
/ui/publish-timer 10.84 kB 68.28 kB
/ui/quality-radio-group 12.64 kB 68.28 kB
/ui/screen-share-button 12.08 kB 68.28 kB
/ui/seek-button 11.91 kB 68.28 kB
/ui/seek-indicator 13.23 kB 68.28 kB
/ui/seek-indicator-value 1.10 kB —
/ui/slider 12.79 kB 68.28 kB
/ui/status-announcer 11.32 kB 68.28 kB
/ui/status-indicator 13.58 kB 68.28 kB
/ui/status-indicator-value 1.10 kB —
/ui/thumbnail 10.50 kB 68.28 kB
/ui/time 11.58 kB 68.28 kB
/ui/time-slider 15.71 kB 68.28 kB
/ui/time-slider-chapter-title 9.48 kB 68.28 kB
/ui/time-slider-chapters 10.44 kB 68.28 kB
/ui/title 8.88 kB 68.28 kB
/ui/tooltip 9.92 kB 68.28 kB
/ui/volume-indicator 13.60 kB 68.28 kB
/ui/volume-indicator-fill 1.11 kB —
/ui/volume-indicator-value 1.10 kB —
/ui/volume-popover 15.43 kB 68.28 kB
/ui/volume-slider 13.44 kB 68.28 kB

⚛️ @videojs/react

Path Base initial PR initial Initial diff Lazy diff
/media/moq-publish-video 22.49 kB 23.24 kB +768 B (+3.3%) —
Presets (7)
Entry Initial Lazy
/video (default) 48.59 kB 68.28 kB
/video (default + hls) 186.43 kB 68.28 kB
/video (minimal) 48.57 kB 68.28 kB
/video (minimal + hls) 186.41 kB 68.28 kB
/audio (default) 37.88 kB 68.28 kB
/audio (minimal) 37.93 kB 68.28 kB
/background 580 B 68.28 kB
Media (24)
Entry Initial
/media/mux-video/hls-js 140.62 kB
/media/mux-video/spf 27.52 kB
/media/mux-audio/hls-js 140.46 kB
/media/mux-audio/spf 21.41 kB
/media/background-video 402 B
/media/cloudflare-video 4.35 kB
/media/dash-video 210.29 kB
/media/google-cast 5.34 kB
/media/hls-audio 20.45 kB
/media/hls-background-video 16.44 kB
/media/hls-video 26.49 kB
/media/hlsjs-video 139.58 kB
/media/moq-publish-video 23.24 kB
/media/mux-audio 140.44 kB
/media/mux-background-video 16.43 kB
/media/mux-data 25.49 kB
/media/mux-video 140.62 kB
/media/native-hls-video 5.76 kB
/media/shaka-video 197.52 kB
/media/spotify-audio 4.22 kB
/media/tiktok-video 4.18 kB
/media/twitch-video 4.30 kB
/media/vimeo-video 11.21 kB
/media/youtube-video 4.86 kB
Players (5)
Entry Initial Lazy
/video/player 7.51 kB 68.28 kB
/audio/player 3.95 kB 68.28 kB
/background/player 2.27 kB 68.28 kB
/live-video/player 6.91 kB 68.28 kB
/live-audio/player 3.96 kB 68.28 kB
Skins (29)
Entry Type Initial Lazy
/video/minimal-skin.css css 6.40 kB —
/video/skin.css css 6.20 kB —
/video/minimal-skin js 48.48 kB 68.28 kB
/video/minimal-skin.tailwind js 55.46 kB 68.28 kB
/video/skin js 48.49 kB 68.28 kB
/video/skin.tailwind js 55.30 kB 68.28 kB
/audio/minimal-skin.css css 4.73 kB —
/audio/skin.css css 4.66 kB —
/audio/minimal-skin js 37.81 kB 68.28 kB
/audio/minimal-skin.tailwind js 42.93 kB 68.28 kB
/audio/skin js 37.79 kB 68.28 kB
/audio/skin.tailwind js 42.92 kB 68.28 kB
/background/skin.css css 90 B —
/background/skin js 277 B —
/live-video/minimal-skin.css css 6.40 kB —
/live-video/skin.css css 6.20 kB —
/live-video/minimal-skin js 40.62 kB 68.28 kB
/live-video/minimal-skin.tailwind js 47.27 kB 68.28 kB
/live-video/skin js 40.64 kB 68.28 kB
/live-video/skin.tailwind js 47.18 kB 68.28 kB
/live-audio/minimal-skin.css css 4.73 kB —
/live-audio/skin.css css 4.66 kB —
/live-audio/minimal-skin js 29.66 kB 68.28 kB
/live-audio/minimal-skin.tailwind js 33.58 kB 68.28 kB
/live-audio/skin js 29.69 kB 68.28 kB
/live-audio/skin.tailwind js 33.71 kB 68.28 kB
/publisher/skin.css css 4.77 kB —
/publisher/skin js 30.93 kB 68.28 kB
/publisher/skin.tailwind js 35.69 kB 68.28 kB
UI Components (50)
Entry Initial Lazy
/ui/airplay-button 11.04 kB 68.28 kB
/ui/alert-dialog 4.41 kB 68.28 kB
/ui/audio-track 8.65 kB 68.28 kB
/ui/audio-track-radio-group 9.82 kB 68.28 kB
/ui/buffering-indicator 8.47 kB 68.28 kB
/ui/camera-button 11.17 kB 68.28 kB
/ui/camera-radio-group 8.65 kB 68.28 kB
/ui/captions-button 11.02 kB 68.28 kB
/ui/captions-radio-group 9.92 kB 68.28 kB
/ui/capture-placeholder 9.20 kB 68.28 kB
/ui/cast-button 11.02 kB 68.28 kB
/ui/connection-indicator 9.14 kB 68.28 kB
/ui/controls 8.26 kB 68.28 kB
/ui/dialog 4.44 kB 68.28 kB
/ui/enable-devices-button 11.27 kB 68.28 kB
/ui/error-dialog 12.19 kB 68.28 kB
/ui/fullscreen-button 10.98 kB 68.28 kB
/ui/gesture 8.55 kB 68.28 kB
/ui/hotkey 8.99 kB 68.28 kB
/ui/live-button 9.45 kB 68.28 kB
/ui/menu 19.67 kB 68.28 kB
/ui/mic-button 11.18 kB 68.28 kB
/ui/mic-radio-group 8.65 kB 68.28 kB
/ui/mute-button 11.04 kB 68.28 kB
/ui/pip-button 10.98 kB 68.28 kB
/ui/play-button 10.96 kB 68.28 kB
/ui/playback-rate 8.69 kB 68.28 kB
/ui/playback-rate-button 10.96 kB 68.28 kB
/ui/playback-rate-radio-group 9.86 kB 68.28 kB
/ui/popover 8.12 kB 68.28 kB
/ui/poster 8.25 kB 68.28 kB
/ui/publish-badge 9.19 kB 68.28 kB
/ui/publish-button 9.71 kB 68.28 kB
/ui/publish-timer 9.73 kB 68.28 kB
/ui/quality 9.14 kB 68.28 kB
/ui/quality-radio-group 10.30 kB 68.28 kB
/ui/screen-share-button 11.20 kB 68.28 kB
/ui/seek-button 10.99 kB 68.28 kB
/ui/seek-indicator 12.52 kB 68.28 kB
/ui/slider 13.36 kB 68.28 kB
/ui/status-announcer 10.77 kB 68.28 kB
/ui/status-indicator 12.80 kB 68.28 kB
/ui/thumbnail 9.37 kB 68.28 kB
/ui/time 10.43 kB 68.28 kB
/ui/time-slider 14.87 kB 68.28 kB
/ui/title 7.94 kB 68.28 kB
/ui/tooltip 8.90 kB 68.28 kB
/ui/volume-indicator 12.92 kB 68.28 kB
/ui/volume-popover 14.89 kB 68.28 kB
/ui/volume-slider 12.79 kB 68.28 kB
🧩 @videojs/core — no changes
Entries (77)
Entry Initial Lazy
. 14.39 kB —
/dom 22.82 kB 68.28 kB
/vjsc 1.74 kB —
/i18n 3.43 kB 68.28 kB
/i18n/locales/all 35.40 kB —
/i18n/locales/ar 1.45 kB —
/i18n/locales/az 1.31 kB —
/i18n/locales/bg 1.53 kB —
/i18n/locales/bn 1.46 kB —
/i18n/locales/bs 1.23 kB —
/i18n/locales/ca 1.29 kB —
/i18n/locales/cs 1.29 kB —
/i18n/locales/cy 1.24 kB —
/i18n/locales/da 1.20 kB —
/i18n/locales/de 1.31 kB —
/i18n/locales/el 1.74 kB —
/i18n/locales/en 993 B —
/i18n/locales/es 1.21 kB —
/i18n/locales/et 1.27 kB —
/i18n/locales/eu 1.24 kB —
/i18n/locales/fa 1.45 kB —
/i18n/locales/fi 1.26 kB —
/i18n/locales/fr 1.29 kB —
/i18n/locales/gd 1.32 kB —
/i18n/locales/gl 1.21 kB —
/i18n/locales/he 1.37 kB —
/i18n/locales/hi 1.54 kB —
/i18n/locales/hr 1.25 kB —
/i18n/locales/hu 1.31 kB —
/i18n/locales/id 1.11 kB —
/i18n/locales/it 1.22 kB —
/i18n/locales/ja 1.41 kB —
/i18n/locales/ko 1.36 kB —
/i18n/locales/lt 1.24 kB —
/i18n/locales/lv 1.30 kB —
/i18n/locales/mr 1.54 kB —
/i18n/locales/nb 1.18 kB —
/i18n/locales/ne 1.52 kB —
/i18n/locales/nl 1.22 kB —
/i18n/locales/nn 1.18 kB —
/i18n/locales/oc 1.29 kB —
/i18n/locales/pl 1.36 kB —
/i18n/locales/pt 1.25 kB —
/i18n/locales/pt-BR 1.25 kB —
/i18n/locales/pt-PT 1.23 kB —
/i18n/locales/ro 1.28 kB —
/i18n/locales/ru 1.63 kB —
/i18n/locales/sk 1.32 kB —
/i18n/locales/sl 1.26 kB —
/i18n/locales/sr 1.29 kB —
/i18n/locales/sv 1.22 kB —
/i18n/locales/te 1.55 kB —
/i18n/locales/th 1.53 kB —
/i18n/locales/tr 1.30 kB —
/i18n/locales/uk 1.64 kB —
/i18n/locales/vi 1.32 kB —
/i18n/locales/zh 1.23 kB —
/i18n/locales/zh-CN 1.23 kB —
/i18n/locales/zh-TW 1.24 kB —
/i18n/text/airplay 101 B —
/i18n/text/buttons 137 B —
/i18n/text/captions 93 B —
/i18n/text/cast 114 B —
/i18n/text/common 90 B —
/i18n/text/container 75 B —
/i18n/text/errors 285 B —
/i18n/text/fullscreen 98 B —
/i18n/text/live 126 B —
/i18n/text/menu 249 B —
/i18n/text/pip 101 B —
/i18n/text/playback 80 B —
/i18n/text/publish 451 B —
/i18n/text/seek 105 B —
/i18n/text/slider 65 B —
/i18n/text/status 222 B —
/i18n/text/time 280 B —
/i18n/text/volume 133 B —
🏷️ @videojs/element — no changes
Entries (2)
Entry Initial
. 1.05 kB
/context 943 B
📦 @videojs/store — no changes
Entries (3)
Entry Initial
. 1.72 kB
/html 703 B
/react 365 B
🔧 @videojs/utils — no changes
Entries (13)
Entry Initial
/array 271 B
/dom 5.02 kB
/events 320 B
/function 386 B
/i18n 249 B
/jwt 176 B
/object 535 B
/predicate 297 B
/percent 281 B
/string 239 B
/style 212 B
/time 976 B
/number 199 B

📦 @videojs/media

Path Base initial PR initial Initial diff Lazy diff
/dom/dash 209.83 kB 3.28 kB -206.54 kB (-98.4%) —
Entries (21)
Entry Initial
. 1.18 kB
/dom 121 B
/dom/dash 3.28 kB
/dom/audio-host 1.10 kB
/dom/cloudflare 3.69 kB
/dom/custom-media-element 2.09 kB
/dom/dash 209.83 kB
/dom/google-cast 4.06 kB
/dom/hls-js 139.17 kB
/dom/media-host 1.20 kB
/dom/media-played-ranges 576 B
/dom/mux 162.77 kB
/dom/native-hls 5.25 kB
/dom/shaka 197.02 kB
/dom/spotify 3.58 kB
/dom/tiktok 3.57 kB
/dom/twitch 3.62 kB
/dom/video-host 1.39 kB
/dom/vimeo 10.62 kB
/dom/youtube 4.25 kB
/media-tracks 2.05 kB

📦 @videojs/spf

Path Base initial PR initial Initial diff Lazy diff
/moq-publish 20.75 kB 21.53 kB +794 B (+3.7%) —
/moq-publish-video 21.91 kB 22.72 kB +831 B (+3.7%) —
Small changes (1, ≤ 300 B)
Path Base initial PR initial Initial diff Lazy diff
/moq 27.09 kB 27.22 kB +132 B (+0.5%) —
Entries (13)
Entry Initial
. 4.55 kB
/dom 6.61 kB
/hls 22.22 kB
/media-tracks 605 B
/moq 27.22 kB
/moq-publish 21.53 kB
/moq-publish-video 22.72 kB
/hls-background-video 15.91 kB
/hls-audio 19.96 kB
/hls-video 26.05 kB
/mux-audio 20.89 kB
/mux-background-video 15.86 kB
/mux-video 26.93 kB

ℹ️ How to interpret

Each entry is independently bundled, minified, and brotli-compressed. Initial size includes its static import graph; lazy dynamic chunks are reported separately.

Entries are not additive because their dependency graphs overlap. Preset rows represent realistic combined bundles.

Changes of 300 B or less across initial, lazy, and total size are collapsed, not discarded.

Run pnpm size locally to check current initial sizes.

@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: c7770e5c1d

ℹ️ 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 on lines +259 to +260
**Phase 5 complete (2026-09-03, `feat/moq-publisher-transport-20` off
`mmcc/moq-publisher`):** the three remaining items landed.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Remove the completed temporary migration plan

This change marks Phase 5 complete but commits the completed implementation notes under .agents/plans/. Repository guidance defines this directory as temporary and requires these notes to be deleted before merge, so retaining and expanding the file leaves stale branch-specific instructions in the repository. Remove the plan rather than recording completion in it.

AGENTS.md reference: AGENTS.md:L70-L70

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Keeping the plan on this branch deliberately, as on #41: this PR targets the long-lived mmcc/moq-publisher feature branch, which already carries .agents/plans/ notes under the same rule, and they get deleted when the feature branches merge to main.

Comment on lines +170 to +173
* Frames of the in-progress group (keyframe + deltas so far), retained for non-`groupPerFrame` tracks — bound or not
* — so a bind mid-group can replay the group from object 0. A fresh subscription (the relay's `relative-group 1`
* upstream join) needs a decodable start, and a subgroup stream that begins partway through a group is dropped by the
* peer. Reset on each keyframe; group-per-frame tracks use `replayLastGroupOnBind` instead.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Update the actor's binding contract

The new retained-group behavior directly contradicts the module header at lines 15–16, which still states that a fresh subscription starts at the next keyframe. That header describes this actor's lifecycle contract, so leaving it stale will mislead callers and future changes about when replay occurs; update it to describe in-progress-group replay on bind.

AGENTS.md reference: AGENTS.md:L16-L16

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Rewritten in 40c22e9: the header now states that groups still never span bindings, but keyframe-grouped tracks replay the retained in-progress group from object 0 on bind, groupPerFrame tracks start at the next frame, and change-driven tracks use replayLastGroupOnBind.

Comment on lines +995 to +996
if (subscribe.parameters.fillParameters !== undefined && subscriber.forwarding) {
this.#openAndResetFill(subscribe.requestId);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Skip fill streams when the computed range is empty

When FILL_PARAMETERS arrives before the track has published any object, or its filter starts after Largest Object, this condition unconditionally opens and resets a fill stream. The pinned draft's §5.1.3 says an empty or post-Largest-Object fill range opens no stream; resetting is only the failure path for a nonempty fill that cannot be served. Evaluate the fill range against track.getLargestObject?.() and skip #openAndResetFill when it is empty, including on the corresponding REQUEST_UPDATE path.

AGENTS.md reference: AGENTS.md:L14-L14

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 40c22e9. isEmptyFetchRange (beside LocationFilter in control-messages.ts) evaluates the fill filter — the one inside FILL_PARAMETERS, else the subscription's, else unfiltered — with the §5.1.2 fetch rules against the track's Largest Object. Both the SUBSCRIBE and REQUEST_UPDATE paths now skip #openAndResetFill when the range is empty: no content yet, Next Object, Next Group (relative-group 0), an absolute start past Largest Object, or a bounded end before its start. Tests cover each shape plus a nonempty control, and a REQUEST_UPDATE case keyed to the update's own Request ID.

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

2 issues found across 11 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/spf/src/publish/session/publish-session.ts">

<violation number="1" location="packages/spf/src/publish/session/publish-session.ts:577">
P3: `#openAndResetFill`'s catch block silently drops failures, so when `openUniStream()` rejects the FILL_PARAMETERS peer gets neither a FETCH_HEADER nor a reset — the very stalled-fill the method was written to prevent. Consider emitting some failure signal (or at least surfacing it) instead of only swallowing; on a dead transport the session teardown may cover it, but the SUBSCRIBE path also opens a fill for already-replaced (`subscriber.finished`) subscriptions that should be skipped.</violation>
</file>

<file name=".agents/plans/moq-transport-20-migration.md">

<violation number="1" location=".agents/plans/moq-transport-20-migration.md:259">
P3: This plan file is a temporary implementation note that AGENTS.md requires be deleted before merge, and the added lines are a completed task log, which the plans README says does not belong in the repository. Remove the plan (including this Phase 5 log) before landing; keep any durable rationale in internal/design or internal/decisions only if explicitly requested.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

publisher's SUBSCRIBE_OK, and open-and-reset for inbound FILL_PARAMETERS.
sandbox's loopback relay pulls upstream with `relative-group 1`.

**Phase 5 complete (2026-09-03, `feat/moq-publisher-transport-20` off

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: This plan file is a temporary implementation note that AGENTS.md requires be deleted before merge, and the added lines are a completed task log, which the plans README says does not belong in the repository. Remove the plan (including this Phase 5 log) before landing; keep any durable rationale in internal/design or internal/decisions only if explicitly requested.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .agents/plans/moq-transport-20-migration.md, line 259:

<comment>This plan file is a temporary implementation note that AGENTS.md requires be deleted before merge, and the added lines are a completed task log, which the plans README says does not belong in the repository. Remove the plan (including this Phase 5 log) before landing; keep any durable rationale in internal/design or internal/decisions only if explicitly requested.</comment>

<file context>
@@ -254,11 +254,37 @@ ID in `publish-session.ts` (reuse is session-fatal; `onRequestUpdate` reports
-publisher's SUBSCRIBE_OK, and open-and-reset for inbound FILL_PARAMETERS.
+sandbox's loopback relay pulls upstream with `relative-group 1`.
+
+**Phase 5 complete (2026-09-03, `feat/moq-publisher-transport-20` off
+`mmcc/moq-publisher`):** the three remaining items landed.
+
</file context>

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Keeping the plan on this branch deliberately, as on #41: this PR targets the long-lived mmcc/moq-publisher feature branch, which already carries .agents/plans/ notes under the same rule, and they get deleted when the feature branches merge to main.


writer = stream.getWriter();
await writer.write(encodeFetchHeader(requestId));
} catch {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: #openAndResetFill's catch block silently drops failures, so when openUniStream() rejects the FILL_PARAMETERS peer gets neither a FETCH_HEADER nor a reset — the very stalled-fill the method was written to prevent. Consider emitting some failure signal (or at least surfacing it) instead of only swallowing; on a dead transport the session teardown may cover it, but the SUBSCRIBE path also opens a fill for already-replaced (subscriber.finished) subscriptions that should be skipped.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/spf/src/publish/session/publish-session.ts, line 577:

<comment>`#openAndResetFill`'s catch block silently drops failures, so when `openUniStream()` rejects the FILL_PARAMETERS peer gets neither a FETCH_HEADER nor a reset — the very stalled-fill the method was written to prevent. Consider emitting some failure signal (or at least surfacing it) instead of only swallowing; on a dead transport the session teardown may cover it, but the SUBSCRIBE path also opens a fill for already-replaced (`subscriber.finished`) subscriptions that should be skipped.</comment>

<file context>
@@ -547,6 +558,30 @@ class MoqtPublishSessionImpl implements MoqtPublishSession {
+
+        writer = stream.getWriter();
+        await writer.write(encodeFetchHeader(requestId));
+      } catch {
+        // Session closing or the peer went away before the header landed.
+      } finally {
</file context>

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Partly. 40c22e9 skips the fill for a subscription already marked finished, folded into a #fillRequested guard alongside Forward State and the new empty-range check. The catch stays as is: openUniStream() only rejects when the transport is closing, at which point there is no channel left to signal the peer and session teardown covers it.

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

All reported issues were addressed across 5 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

mmcc added 6 commits September 4, 2026 23:38
Finishes the publisher side of the moq-transport draft-20 migration begun
on mmcc/moq (PR #41). Three behaviors the relay's draft-20 upstream join
needs:

- In-progress-group replay. `track-publisher.ts` retains the current
  group (keyframe + deltas, bound or not, reset each keyframe) and, on
  bind, replays it from object 0 under the new alias before continuing
  live. A subscription joining mid-group — the relay's `relative-group 1`
  upstream join — now decodes instantly instead of waiting a GOP, and no
  subgroup stream begins partway through a group (the peer drops those).
  Group-per-frame tracks keep using `replayLastGroupOnBind`.

- LARGEST_OBJECT in SUBSCRIBE_OK. The actor tracks the largest
  (group, object) it has written on its snapshot; `setup-track-publishers`
  passes a `getLargestObject` reader into `registerTrack`, and the session
  reports LARGEST_OBJECT (§10.2.17) in SUBSCRIBE_OK once content exists,
  omitting it before. Pulled at subscribe time, so no snapshot churn. The
  sandbox loopback relay's SUBSCRIBE_OK parser now skips the parameter
  block by parity instead of asserting it is empty.

- Inbound FILL_PARAMETERS. `#openAndResetFill` opens a uni stream, writes
  a FETCH_HEADER carrying the initiating Request ID, and resets it — the
  §5.1.3.1 minimum for an origin that serves no fills (reset = failure; a
  FIN would falsely claim an empty range). Wired on the inbound SUBSCRIBE
  and REQUEST_UPDATE paths, gated on Forward State 1, with FILL_PARAMETERS
  pulled out of the update's unsupported-parameter set. `encodeFetchHeader`
  added to `object-stream.ts`.

Tests: rewrote the four track-publisher/behavior tests whose documented
"join at next keyframe" behavior the replay supersedes; added actor
coverage for Largest Object tracking and session coverage for
LARGEST_OBJECT in SUBSCRIBE_OK and the fill open-and-reset. All spf test
projects pass (node 353, browser 130); typecheck, lint, and format clean.
Not yet verified live against the relay fleet.
- Open no fill fetch stream for an empty fill range (§5.1.3): evaluate the
  fill filter — FILL_PARAMETERS' own, else the subscription's — as a fetch
  against the track's Largest Object on both the SUBSCRIBE and
  REQUEST_UPDATE paths, and skip fills for subscriptions already replaced.
  `isEmptyFetchRange` lives beside `LocationFilter` so the deferred
  subscriber-side fills can share it.
- Rewrite the track-publisher header for in-progress-group replay on bind
  and share the counter handlers between `publishing` and `ended`.
- Release the fill-observer reader in the publish-session tests so its
  read loop exits with the session instead of outliving the test.
Headless publisher + viewer against the anonymous relay (fleet on moq-relay
0.14.15): in-progress-group replay opens the first subgroup stream 1 ms after
the relay's upstream SUBSCRIBE from object 0, the rebind's SUBSCRIBE_OK carries
LARGEST_OBJECT and the relay accepts it, and the relay never forwards
FILL_PARAMETERS upstream. Also notes the relay's 30 s upstream idle drop and
the `anon` announce-prefix requirement.
@mmcc
mmcc force-pushed the feat/moq-publisher-transport-20 branch from 5d2cf99 to 623d4d6 Compare September 4, 2026 23:47
@mmcc
mmcc merged commit c44e5b3 into mmcc/moq-publisher Sep 4, 2026
28 of 39 checks passed
@mmcc
mmcc deleted the feat/moq-publisher-transport-20 branch September 4, 2026 23:53
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