Repository navigation
quest: import #5052 and #5101 as no-stitch and fresh TS export restarts - #5108
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou'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. View limit detailsLimit details: You’ve used all 4 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (4)
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. Comment |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7bd56d1005
ℹ️ 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".
| - moq-srt's egress (`rs/moq-srt/src/ts.rs`) follows the same rule and keeps its | ||
| SRT connection across the break. |
There was a problem hiding this comment.
Define how SRT distinguishes a restart from a final End
On older protocol versions the only signal is End followed by Start, but a permanent publisher shutdown produces the same End, and unlike the CLI the SRT egress has no --linger bound. Keeping the connection while waiting for a possible Start can therefore leave every normally ended SRT subscription open indefinitely, while closing on End misses replacements. Specify a deterministic termination/replacement policy for SRT and cover the unreplaced-End case in its tests.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 890da34. SRT egress gets the same --linger as the CLI, defaulting to 0, so an End that nothing replaces within the linger closes the SRT stream. The quest now tests that case alongside the stitch.
(Written by Claude Opus 5.5)
| - Docs: the `--linger` paragraph in `doc/bin/cli.md` and any restart | ||
| behavior in `doc/bin/srt.md`. | ||
|
|
||
| Public API: breaking, `ts::Export::resume` is removed. Wire: none. |
There was a problem hiding this comment.
Account for the API needed to seed replacement exports
The old PAT/PMT version must cross from one Export to another, but both callers named here live outside moq-mux, so carrying that value and identifying the new export as a successor requires a new or changed public constructor/builder/successor operation. Reporting only the removal of resume leaves the required public surface undecided and its impact unreported; specify that surface and include it in this section.
AGENTS.md reference: AGENTS.md:L56-L60
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed, fixed in 890da34. The successor API is now an open question to settle when the quest starts. The recommendation is a method that consumes the old export and returns its successor on a new source (such as Export::stitch(self, source)), so the PSI version never becomes a public knob. The Public API line reports it.
(Written by Claude Opus 5.5)
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 7bd56d10056217dffa9dd8d0a4d9b6b71e4b0b2f.
Direction: enforcing identity in moq-net and creating a fresh TS export on replacement is simpler than extending the partial reset. Scoping hitless output to one epoch is consistent with that design.
The existing P2 SRT termination finding at quest/m0/broadcast-epoch/export-ts.md:32–33 is actionable: specify when an unreplaced End closes the SRT stream and test that alongside End/Start replacement, since SRT currently has no linger bound. No additional actionable bugs found.
Verification: GitHub-only static inspection of all four changed documents, linked plans/issues, and relevant front, exporter, CLI and SRT code. No builds or tests run; this PR is planning-only, and the proposed implementation remains unverified.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Grok review at Code references check out on main: Blocking
Non-blocking
Verdict: ITERATE — reconcile the This is an automated review, not the maintainer's decision |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Re the Grok review's blocking item: it reviewed the PR body before I updated it. After the "TS restart" answer, the maintainer asked whether On naming: @codex review (Written by Claude Opus 5.5) |
|
Follow-up review at What changed: SRT egress linger now defaults to 0, so an unreplaced Still open from the earlier review:
New, non-blocking:
Verdict: ITERATE This is an automated review, not the maintainer's decision |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 890da342c8993ae8570d146343ecd8091f558bf4 (substantive delta since 7bd56d10056217dffa9dd8d0a4d9b6b71e4b0b2f; unchanged base).
The opt-in --stitch split is clearer. The SRT linger default and unreplaced-End test address the termination issue referenced in my previous review. One remaining P2 planning gap is inline: advancing only the PMT version does not cover a changed PAT mapping.
Verification: GitHub-only static inspection of the updated plans, current exporter and relevant TSDuck receiver code. No builds or tests run; proposed behavior is not implemented by this PR.
| `discontinuity_indicator`, the PMT `version_number` advances (the only value | ||
| handed from the old `Export`), and each elementary stream starts at a |
There was a problem hiding this comment.
[P2] Preserve PAT-version advancement across a program switch
Please advance the PAT version as well when the new catalog changes its mapping. Export::build_psi() preserves the catalog's transport-stream ID and PMT PID but initializes the PAT version to zero. Stitching from PMT PID 0x1000 to 0x1001 under the same TSID/program therefore changes the PAT without changing its version. TSDuck's version-caching demux, used by tsp -P zap, ignores that PAT and keeps looking for the old PMT; a discontinuity flag does not clear its table cache. Seed both PSI tables from the carried version, and add a stitch regression retaining TSID while changing PMT PID.
There was a problem hiding this comment.
Addressed in 29769c7. The PAT and PMT versions both carry over and advance on a stitch, with a test that keeps the TSID and moves the PMT PID. Same-epoch continuation and the stitch share one decided operation, ts::Export::follow(self, broadcast). SRT policy lives on moq_srt::Config (linger, stitch). The Public API line reports both.
(Written by Claude Opus 5.5)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 890da342c8
ℹ️ 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".
| - Drive both flags from announcements, as players do: `Start`, `Restart`, and | ||
| `End` with their epochs. An export that fails while its broadcast is still | ||
| announced exits 1 without lingering, as today. | ||
| - Same epoch within `--linger`: re-request it and keep the same `Export`. |
There was a problem hiding this comment.
Define the same-epoch continuation API
Although the successor operation now covers --stitch, this path still has no callable way to rebind the retained Export after its catalog and tracks terminate: the plan deletes Export::resume(), while the CLI and SRT callers cannot replace Export's private source state. Merely keeping the object leaves subsequent next() calls terminal, so specify and report a same-epoch continuation surface or a caller-configurable internal policy for --linger.
AGENTS.md reference: AGENTS.md:L59-L60
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in 29769c7. The PAT and PMT versions both carry over and advance on a stitch, with a test that keeps the TSID and moves the PMT PID. Same-epoch continuation and the stitch share one decided operation, ts::Export::follow(self, broadcast). SRT policy lives on moq_srt::Config (linger, stitch). The Public API line reports both.
(Written by Claude Opus 5.5)
| `discontinuity_indicator`, the PMT `version_number` advances (the only value | ||
| handed from the old `Export`), and each elementary stream starts at a |
There was a problem hiding this comment.
Advance the PAT version during a full program switch
When the replacement catalog keeps the transport-stream ID but changes the program number or PMT PID, the PAT content changes too. Carrying only the PMT version lets the fresh export reuse the old PAT version, so receivers may treat that PAT as unchanged and continue listening on the old PMT PID. Carry the PAT version across the stitch as well and test a replacement whose program mapping changes.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in 29769c7. The PAT and PMT versions both carry over and advance on a stitch, with a test that keeps the TSID and moves the PMT PID. Same-epoch continuation and the stitch share one decided operation, ts::Export::follow(self, broadcast). SRT policy lives on moq_srt::Config (linger, stitch). The Public API line reports both.
(Written by Claude Opus 5.5)
| - moq-srt's egress (`rs/moq-srt/src/ts.rs`) gets the same two options and keeps | ||
| its SRT connection across a stitch. Its linger defaults to 0, like the CLI: |
There was a problem hiding this comment.
Report the SRT egress API needed for these options
The same options cannot be added to SRT egress solely as CLI flags: embedders use the exported moq_srt::Config, Server, and Subscribe::accept interfaces, none of which currently accepts a linger or stitch policy. The planned public API impact lists only the TS-export successor and CLI change, leaving library consumers no specified way to select this behavior; decide where this policy belongs and report that public surface.
AGENTS.md reference: AGENTS.md:L59-L60
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in 29769c7: decided that the policy lives on moq_srt::Config as linger: Duration (default 0) and stitch: bool (default false), mirrored as CLI flags. The Public API line reports it.
(Written by Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Follow-up review at What changed: the open PSI question is settled as a single Still open from earlier reviews:
New, non-blocking:
Verdict: ITERATE This is an automated review, not the maintainer's decision |
|
Summary before merge: imports #5052 as (Written by Claude Opus 5.5) |
Imports the two open issues without the
questlabel.Quests
quest/m0/broadcast-epoch/no-stitch.md[M], from export ts: after re-requesting onto a live route, the first video unit it fetches ends the export ("missed a decode deadline") #5052. On lite-06, a front re-splices a delivered track after an upstream error by re-subscribing through the same relay session. The relay hands it whatever instance now wins upstream, which stitches two epochless publishers together. feat(net)!: restart announce consumers on a replaced broadcast, keep subscriptions sticky #5087 does not change this. After this quest, only a front with an epoch re-splices, and an epochless track ends with the error. Closes export ts: after re-requesting onto a live route, the first video unit it fetches ends the export ("missed a decode deadline") #5052 when it lands.quest/m0/broadcast-epoch/export-ts.md[M].export tsand SRT egress never splice broadcasts unless asked.--linger <dur>waits only for the same epoch to return and continues the same stream. A replacement exits 1, naming--stitch.--stitchbuilds a freshts::Exportwith a full program switch (new PMT version, PCR/CC discontinuity, keyframe start).resume()is deleted, and the stale marker "restart/rewind" naming is fixed inline.quest/m2/ts-hitless.md: identical legs within one epoch only. Identity across a replacement is a non-goal (export ts: two co-started exports stop being byte-identical after a republish in 5 of 13 runs #5101, which is closed as won't fix).quest/m0/broadcast-epoch/README.md: requires both new quests.Decisions
5052 goal: I don't get the export-side guard, does moq-net 5087 just fix this? (Answer after tracing: no. The redispatch arm in
front.rsis untouched, and #5087's held END/START arrives after the 2 ms re-subscribe.)Stitch fix
Placement
Export guard
5101 home
Cutover rule (for
--synclegs across a republish): "I don't really want to cut over? Like maybe we can guarantee identical output for the same epoch, but really we should restart the TS export if there's a new epoch instead of trying to stitch. Can you make sure we're not doing something dumb and trying to make TS export survive across epoch/route changes? It needs to be a new TS broadcast with its own new epoch."TS restart
New epoch (meaning of "its own new epoch")
Hitless guarantee: "I don't think we can support byte identical across restarts?" Recorded as: within one epoch only.
TS placement
SRT egress
Follow-up (plan an audit of in-broadcast marker restarts?)
(The audit found that rewinds are already refused since #3711; markers only declare pauses and forward breaks.)
Markers
TS switch (after asking whether
--lingershould switch broadcasts at all): "hmm, maybe add --stitch and have it make a fresh export with a full program switch? The default would be to not."--stitch: "I think they can be separate?
--lingerwould say how long to wait for a broadcast to restart (could be the same epoch), while--stitchwould allow switching epochs?"This supersedes the earlier TS restart answer (fresh Export on every Restart).
Export API (with
resume()gone)SRT API
Public API / wire
Planning only, no code. The planned quests remove
ts::Export::resumeand renamerestarts()(breaking), addts::Export::followandlinger/stitchonmoq_srt::Config, add--stitchtoexport tsand SRT egress, and change epochless subscriptions to surface upstream errors. No wire change.Mentions #5052 and #5101 without closing keywords.
🤖 Generated with Claude Code
(Written by Claude Opus 5.5)