Repository navigation
fix(spf): preserve moq retry backoff until fresh media - #50
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
📦 Bundle Size Report🎨 @videojs/html — 1 small size change
Presets (7)
Media (20)
Players (5)
Skins (37)
UI Components (49)
⚛️ @videojs/react — no changesPresets (7)
Media (23)
Players (5)
Skins (26)
UI Components (39)
🧩 @videojs/core — no changesEntries (76)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (13)
📦 @videojs/media
Entries (21)
📦 @videojs/spf — 1 small size change
Entries (11)
ℹ️ How to interpretEach 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 |
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c6fb953b03
ℹ️ 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".
| if (latestMediaLocation === undefined || compareLocations(location, latestMediaLocation) > 0) { | ||
| latestMediaLocation = location; |
There was a problem hiding this comment.
Isolate freshness tracking by subscribe attempt
When an auth refresh starts a new subscription while a subgroup from the previous accepted subscription remains in flight, both attempts still invoke this shared handleObject; MoqtSession removes a request-error record without marking it cancelled, so its subgroup loop can continue delivering objects. Because subscribe() resets largestObject and latestMediaLocation globally, a late object from the old publisher—especially after a publisher restart resets object numbering—can be compared against the new subscription's smaller boundary and set hasFreshFrame, prematurely clearing the recovery backoff even though the replacement delivered nothing. Bind callbacks/frontiers to a subscribe-attempt generation or cancel the prior subscription before resetting them.
Useful? React with 👍 / 👎.
Brings the publisher stack onto mmcc/moq at 2fefce4 (PRs #47, #50, #51): subscriber location framing for moq-relay 0.14.17, isolated subscription recovery attempts with preserved retry backoff, and the moq publishing guide under packages/spf/docs. No publisher-side ports were needed. The LARGEST_OBJECT bare-Location codec change from PR #47 was already on this branch via PR #48, so control-messages.ts and its tests merge to the existing content.
Fixes #49
Summary
A relay can accept a replacement subscription to an ended track and replay cached media, repeatedly resetting the retry delay and preventing a finite retry budget from being exhausted. Preserve retry accounting until the replacement receives a valid media frame beyond its SUBSCRIBE_OK
LARGEST_OBJECTboundary.Changes
Testing
mmcc/moqbase.Browser tests could not launch because Chromium system libraries are missing. Root typecheck reports errors outside SPF in the element/store/HTML dependency chain. Freshness relies on the relay reporting
LARGEST_OBJECTcorrectly; live cached-replay validation remains outstanding.Summary by cubic
Preserves the capped retry backoff for MOQ track recovery so a relay that accepts a replacement subscription and replays cached media can no longer reset a finite retry budget. Recovery now completes only when the replacement delivers a valid media frame beyond its SUBSCRIBE_OK
LARGEST_OBJECTboundary; previously, acceptance or cached replay repeatedly reset the backoff and prevented exhaustion.Behavior changes
hasFreshFrameis latched per subscription, survives buffer drains, and clears when auth refresh retires the subscription.LARGEST_OBJECTcorrectly; live cached-replay validation remains outstanding.Written for commit 3cd94eb. Summary will update on new commits.