Repository navigation
fix(jellycompat): reject remote starts that ignore MPEG-TS copy packaging - #3358
Conversation
…ging A Jellyfin-compat video copy packaged as MPEG-TS asks the transcode node for copy_video_mpegts, but the start never checked the node's reply. A node built before MPEG-TS copies ignores the field and writes fMP4, while the API still serves the stream on the remux-ts-v1 route. Check the attestation like the native start does, stop the remote job, and return the retryable start error. Closes #3355 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
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. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Validate remote MPEG-TS copy attestation internal/jellycompat/handlers_playback.go, internal/jellycompat/audio_selection_test.go |
Remote startup validates the MPEG-TS copy attestation after the keyframe-playlist check. On failure, it stops the remote transcode and wraps the validation error as errRemoteTranscodeStartFailed. Tests cover missing audio and MPEG-TS attestations, retryable start failures, and cleanup. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers: neurekadev
Merge Risk: 
Minimal · up to fabd6
-
MPEG-TS copy starts now reject nodes that do not attest support. No actionable merge-blocking risk remains.
Security architecture risk: 
Low · up to fabd6
-
The change rejects incompatible remote starts before accepting their execution results, without adding authority or widening access. Risk is limited, but remote cleanup remains best-effort when a node cannot confirm cancellation.
Retained concerns
No architecture-level concerns identified.Security review details
-
Security Blast Radius
- observed — The added failure action targets the selected node and the same upstream session identifier used for startup. It introduces no bulk cancellation operation or additional node-selection authority.
Trust Boundaries and Controls
- observed — Remote start and stop requests retain the existing node-signing control. The new response check narrows acceptance of an executor's result without changing credentials, request destinations, or privileges.
Resilience and Maintainability Implications
- observed — Existing per-session serialization and publication ownership checks contain competing starts. Compensating deletion is independent of caller cancellation and treats an absent job as success, while leaving local live-map state untouched.
-
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Check name Status Explanation Title check The title clearly identifies the main change: rejecting remote starts that lack MPEG-TS copy packaging attestation. Linked Issues check Issue #3355requires Jellyfin-compatible remote starts to validate theCopyVideoMPEGTSattestation. The change callstranscodenode.ValidateCopyVideoMPEGTSAttestation(reqBody, nodeResponse)in `sta…Out of Scope Changes check The diff contains one production change for issue #3355and focused regression-test changes. The test also preserves coverage for the existing audio-recipe attestation behavior. No unrelated productio…Description check The description explains a concrete defect and fix: jellycompat remote transcode starts do not check the node's copy_video_mpegts attestation, so pre-#3026 nodes can serve fMP4 under an MPEG-TS route.… Full details: Linked Issues check
-
Explanation
Issue
#3355requires Jellyfin-compatible remote starts to validate theCopyVideoMPEGTSattestation. The change callstranscodenode.ValidateCopyVideoMPEGTSAttestation(reqBody, nodeResponse)instartRemoteTranscodeWithToneMapMode. On failure, it stops/transcode/upstream-1and wraps the error witherrRemoteTranscodeStartFailed. The table-driven regression test covers the missing MPEG-TS attestation and checks both results. The change satisfies the linked issue coding requirements.
Full details: Out of Scope Changes check
-
Explanation
The diff contains one production change for issue
#3355and focused regression-test changes. The test also preserves coverage for the existing audio-recipe attestation behavior. No unrelated production behavior or unrelated files appear in the reviewed diff.
Full details: Description check
-
Explanation
The description explains a concrete defect and fix: jellycompat remote transcode starts do not check the node's copy_video_mpegts attestation, so pre-#3026 nodes can serve fMP4 under an MPEG-TS route. It names the new ValidateCopyVideoMPEGTSAttestation call, the errRemoteTranscodeStartFailed handling, the regression test, and the validation runs. It is clearly related to the changeset.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Problem
Closes #3355
Related issue: N/A
Validation tasks: none
A Jellyfin-compat client that gets an MPEG-TS video copy from a remote transcode node can receive fMP4 segments on an MPEG-TS stream. This happens when the node was built before MPEG-TS copies (#3026). That node ignores the
copy_video_mpegtsrequest field and writes fMP4. The API never checks the node's reply, so it still publishes the stream on theremux-ts-v1route withTranscodingContainer: ts.Today this reaches Roku video copies and webOS Dolby Vision copies during a rolling upgrade or on a mixed-version node pool. #3341 extends MPEG-TS copies to every client that lists the source codecs only for MPEG-TS HLS, so more clients will hit it.
Approach
The jellycompat remote start now calls
transcodenode.ValidateCopyVideoMPEGTSAttestationnext to its other attestation checks. On a mismatch it stops the remote job and returnserrRemoteTranscodeStartFailed, the same handling as the audio, throttle, and keyframe-playlist checks, so the start is treated as a failed remote start. The native start and the native rehome already run this check. Nodes built since #3026 echo the field, so a same-version pool is unaffected.Validation
copy_video_mpegts. On main the row fails because the start returns no error. With the fix, the start fails with the retryable error and the node gets the stop request.go test ./internal/jellycompat/ ./internal/transcodenode/: pass.make lint-changed: 0 issues.Evidence
No user-visible change. The page holds the test runs on main and on this branch.
Evidence: https://evidence.siloserver.org/r/silo-server/issue-3355/
Risks
During a rolling upgrade, a jellycompat MPEG-TS copy placed on a node that predates #3026 now fails like the other attestation mismatches (
502 TranscodeStartFailedwhen the start can't be placed elsewhere) instead of playing fMP4 segments under an MPEG-TS playlist. The native API already behaves this way.Checklist
AI Disclosure
🤖 Generated with Claude Code