Repository navigation
fix(playback): reload rotated media authorization - #236
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📝 WalkthroughWalkthroughProtocol V3 playback recovery now evaluates authorization-header rotation after periodic progress checks. Successful checks can reuse refreshed stream requests for reloads, while unchanged credentials, missing sessions, and transient failures do not reload. ChangesProtocol V3 authentication recovery
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to Protocol V3 playback now reloads the active stream at the current position after a successful progress report detects a rotated authorization bearer. The supplied validation and boundary coverage indicate failed reports and unchanged credentials do not trigger reloads, with no outstanding merge-readiness risk identified. Sequence Diagram(s)sequenceDiagram
participant PeriodicProgressReporter
participant ProtocolV3AuthenticationRecovery
participant shouldReloadAfterProgress
participant ReloadTask
PeriodicProgressReporter->>ProtocolV3AuthenticationRecovery: report progress result
ProtocolV3AuthenticationRecovery->>shouldReloadAfterProgress: evaluate progress success and header changes
shouldReloadAfterProgress-->>ProtocolV3AuthenticationRecovery: return reload eligibility
ProtocolV3AuthenticationRecovery->>ReloadTask: start reload with refreshed stream request
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. |
Problem
Protocol V3 playback freezes its Authorization header when Aether creates the media asset. A periodic progress request can refresh the account bearer successfully while the active media reader continues using the old bearer. In the production tvOS capture, that sequence led to repeated media 401 responses, a generic Aether read failure, and a loading indicator that never recovered.
The app already had bounded same-plan recovery for typed authentication failures, but the current Aether reader does not preserve a midstream HTTP 401 through its VOD failure path. The client therefore could not recognize this specific failure in time.
I audited upstream Aether from the pinned 6.34.0 lineage through 6.64.0. None of those changes adds midstream bearer refresh or preserves a VOD media 401 as a typed authentication failure. The relevant comparison is blurbery/AetherEngine@6.34.0...6.64.0.
Solution
After each successful periodic progress report, rebuild the current authenticated stream request and compare its Authorization header with the header on the active Aether load. If the bearer changed, reuse the existing bounded same-plan authentication reload at the current playback position.
The reload remains limited to negotiated header-authenticated Protocol V3 playback, revalidates the active plan and session after suspension points, and keeps the existing reactive 401 recovery path. Failed progress reports and unchanged credentials do not trigger a reload.
This PR does not update the Aether dependency.
Validation
Risk and follow-up
The proactive reload can cause one brief playback interruption when a bearer rotates, but only after the API transport has successfully refreshed it and only when the active media header differs. A future Aether release that exposes typed midstream HTTP failures could make the proactive check unnecessary, but 6.64.0 does not.
AI disclosure
Developed with OpenAI Codex model gpt-5.6-sol in the T3 Code Codex harness. Claude Opus through CLIProxy was consulted during diagnosis but returned no usable assessment. Validation used XcodeGen, xcodebuild, Git, and GitHub CLI.
Summary by CodeRabbit