Repository navigation
Conversation
… stream A server_remux_hls plan with an embedded text subtitle mounted the inventory sidecar, which the server extracts by reading the whole source file: minutes on network storage before the first cue. The client now sends hls_remux_subtitle_renditions_v1 next to hls_subtitle_renditions_v1, like the base token, in the static feature list (the server ignores it where unknown and strips it on /api/v1). The server then carries the selected track as subtitle.hls_rendition on the remux too. - The plan adapter accepts hls_rendition on server_remux_hls with the same checks as on server_transcode_hls. - The load spec and controller already treat the rendition by delivery class (no sidecar declared, the row resolves to AVPlayer's legible option), so the remote-HLS path plays it as it does a transcode's. - Picking another embedded text track on a remux replans instead of mounting its sidecar, but only when the decision's server_features list the remux token; otherwise the server would answer with the same sidecar and the pick stays local. 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 |
|---|---|
Advertise and validate remux-HLS renditions iosApp/iosApp/Screens/Player/ProtocolV3/PlaybackProtocolV3Models.swift, iosApp/iosApp/Screens/Player/ProtocolV3/ApplePlaybackV3Capabilities.swift, iosApp/iosApp/Screens/Player/ProtocolV3/ApplePlaybackV3PlanAdapter.swift, iosApp/Tests/PlaybackProtocolV3Tests.swift |
The client advertises the remux subtitle-rendition capability for video and excludes it from audiobook capabilities. Plan validation accepts rendition delivery for remux HLS. Tests cover capability reporting, plan construction, and contradictory plans. |
Apply embedded subtitle selections iosApp/iosApp/Screens/Player/ProtocolV3/ProtocolV3SubtitleSelection.swift, iosApp/iosApp/Screens/Player/PlayerViewModel.swift, iosApp/Tests/PlaybackProtocolV3Tests.swift |
The local-selection check receives the remux rendition capability. Tests check when another embedded-track selection applies locally and when it requires replanning. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Feature
Possibly related issues
- Issue 880 concerns applying subtitle selections during playback without stopping the session. This change handles remux-HLS selections through replanning, but does not address the issue’s inventory update contract.
Possibly related PRs
- Silo-Server/silo-apple#821: Adds HLS subtitle renditions for transcode HLS, including capability reporting, plan validation, and local-selection replanning.
- Silo-Server/silo-apple#842: Adds server-HLS embedded subtitle-rendition support that this change extends to remux HLS.
Suggested reviewers: rhainland
Merge Risk: 
Minimal · up to c45f5
-
The change enables remuxed HLS subtitle renditions; no concrete merge-blocking issue was identified.
Security architecture risk: 
Low · up to c45f5
-
The change reuses existing playback authorization and session-transition controls. No introduced security bypass was established, but server compatibility and interrupted remux playback were not independently validated end to end.
Retained concerns
No architecture-level concerns identified.Security review details
-
Security Blast Radius
- inferred — The newly exercised client behavior is bounded to an authenticated playback session and its designated media origin. The inspected change does not add credential authority across unrelated sessions or origins.
Security Findings and Attack Paths
- inferred — No PR-specific credential-forwarding bypass was established along the inspected server-plan-to-media-request path. Newly accepted remux renditions use the existing authorization resolver rather than introducing a separate credential-bearing fetch path.
Trust Boundaries and Controls
- observed — The media resolver checks credential-owner identity and confines requests to the established origin and session paths. Rendition authorization permits only a single silo_rendition query with video or subtitles on the existing HLS source path.
Resilience and Maintainability Implications
- observed — The administrator-ended handler pauses playback and schedules dismissal but does not immediately clear pending track changes. The replan defer can drain queued work while an active prepared plan remains. Inspected bridge requests retain the same session and authority; server-side terminal enforcement was not inspected, so session revival is not an established finding.
Hardening Proposals
- proposed — Make administrator-ended state immediately suppress queued replans and invalidate pending track intent, reducing reliance on server rejection during delayed dismissal. This would harden an existing shared transition, not remediate a demonstrated authorization bypass.
-
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 inconclusive Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 33.33% 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 3 functions across 5 files. (1 skipped: 1 too large.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 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
Comment @coderabbitai help to get the list of available commands.
|
The Evidence section still needs a playback capture for this visible change; build and unit-test results do not show subtitle delivery or timing. Add a short before-and-after recording of the same copy-remux case with an embedded text subtitle, including a seek, a track switch, and Off. Identify the device and build, and cover affected Apple devices or explain why a device is unaffected. |
|
Superseded by #970, which combines this change with the rest of the stack for review. |
Problem
Related issue: N/A
Validation tasks: changes #313 C4; changes #314 C4
When the server copy-remuxes a file to HLS (
server_remux_hls) with an embedded text subtitle selected, the app mounts that track's sidecar URL. The server builds the sidecar by reading the whole source file, which takes minutes for a large file on network storage, so the subtitle appears late or not at all. A transcode already avoids this: since #821 the app plays its subtitle as a WebVTT rendition inside the HLS stream. The server does the same for a copy remux once the client sendshls_remux_subtitle_renditions_v1, but the app never sent it and refusedhls_renditionon a remux plan.Approach
hls_remux_subtitle_renditions_v1next tohls_subtitle_renditions_v1; audiobooks don't. It is static like the base token:/api/v1strips it, and a server that doesn't know it ignores it.subtitle.hls_renditiononserver_remux_hlswith the same checks as on a transcode. The load spec and controller already treat the rendition the same for both deliveries, and both use the same master playlist route, so the media credential scope forsilo_renditionalready covers it.server_featureslist the remux token. Otherwise the pick stays a local sidecar mount, as before.Affects iOS, tvOS and macOS (shared player code). The server side is already on silo-server
main.Validation
Evidence
Evidence: https://evidence.siloserver.org/r/silo-apple/pr-953/
Risks
X-TIMESTAMP-MAPagainst fMP4 segments, including EVENT playlists that grow during playback. It needs checking on a device.Checklist
AI Disclosure
xcodebuild, XcodeGen) on a Mac build service🤖 Generated with Claude Code
Note
Add
hlsRemuxSubtitleRenditionsFeatureso HLS remux plans play embedded text subtitlesThe player can now play a copy remux's embedded text subtitle directly from its HLS stream, instead of mounting a sidecar subtitle track.
hlsRemuxSubtitleRenditionsFeaturecapability constant in PlaybackProtocolV3Models.swift; it is advertised for video but not audiobook in ApplePlaybackV3Capabilities.swift and requires the existing HLS subtitle-rendition feature.ApplePlaybackV3PlanAdapter.validatenow accepts an HLS subtitle rendition on remux plans, not just transcode plans.ProtocolV3SubtitleSelection.canApplyLocallytakes a remux-rendition capability flag. An unmounted embedded non-bitmap subtitle is not applied locally on a remux plan when both rendition features are negotiated; the transcode path keeps its existing check.ProtocolV3SubtitleSelection.canApplyLocallyin ProtocolV3SubtitleSelection.swift.Macroscope summarized c45f53c.